mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-14 17:12:59 -07:00
git subrepo clone (merge) https://github.com/HarbourMasters/otrgui.git OTRGui
subrepo: subdir: "OTRGui" merged: "a6066a251" upstream: origin: "https://github.com/HarbourMasters/otrgui.git" branch: "master" commit: "a6066a251" git-subrepo: version: "0.4.1" origin: "???" commit: "???"
This commit is contained in:
parent
442a88f03b
commit
f52a2a6406
1018 changed files with 511803 additions and 0 deletions
39
OTRGui/libs/raylib/projects/4coder/main.c
Normal file
39
OTRGui/libs/raylib/projects/4coder/main.c
Normal file
|
@ -0,0 +1,39 @@
|
|||
#include <math.h>
|
||||
#include "raylib.h"
|
||||
|
||||
int main() {
|
||||
int screenWidth = 800;
|
||||
int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib");
|
||||
|
||||
Camera cam;
|
||||
cam.position = (Vector3){ 0.0f, 10.0f, 8.f };
|
||||
cam.target = (Vector3){ 0.0f, 0.0f, 0.0f };
|
||||
cam.up = (Vector3){ 0.0f, 1.f, 0.0f };
|
||||
cam.fovy = 60.0f;
|
||||
cam.type = CAMERA_PERSPECTIVE;
|
||||
|
||||
Vector3 cubePos = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
SetTargetFPS(60);
|
||||
|
||||
while (!WindowShouldClose()) {
|
||||
cam.position.x = sin(GetTime()) * 10.0f;
|
||||
cam.position.z = cos(GetTime()) * 10.0f;
|
||||
|
||||
BeginDrawing();
|
||||
ClearBackground(RAYWHITE);
|
||||
BeginMode3D(cam);
|
||||
DrawCube(cubePos, 2.f, 2.f, 2.f, RED);
|
||||
DrawCubeWires(cubePos, 2.f, 2.f, 2.f, MAROON);
|
||||
DrawGrid(10, 1.f);
|
||||
EndMode3D();
|
||||
DrawText("This is a raylib example", 10, 40, 20, DARKGRAY);
|
||||
DrawFPS(10, 10);
|
||||
EndDrawing();
|
||||
}
|
||||
|
||||
CloseWindow();
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue