mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
Created Working on VSCode (markdown)
35
Working-on-VSCode.md
Normal file
35
Working-on-VSCode.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#include "raylib.h"
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
InitWindow(800, 600, "DustRunner - Ball Adventure");
|
||||||
|
|
||||||
|
Camera3D camera = { 0 };
|
||||||
|
camera.position = { 4.0f, 2.0f, 4.0f };
|
||||||
|
camera.target = { 0.0f, 0.0f, 0.0f };
|
||||||
|
camera.up = { 0.0f, 1.0f, 0.0f };
|
||||||
|
camera.fovy = 45.0f;
|
||||||
|
camera.projection = CAMERA_PERSPECTIVE;
|
||||||
|
|
||||||
|
SetCameraMode(camera, CAMERA_FREE);
|
||||||
|
|
||||||
|
SetTargetFPS(60);
|
||||||
|
|
||||||
|
while (!WindowShouldClose()) {
|
||||||
|
UpdateCamera(&camera);
|
||||||
|
|
||||||
|
BeginDrawing();
|
||||||
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
|
BeginMode3D(camera);
|
||||||
|
DrawSphere((Vector3){ 0.0f, 1.0f, 0.0f }, 1.0f, BLUE); // The ball
|
||||||
|
DrawPlane((Vector3){ 0.0f, 0.0f, 0.0f }, (Vector2){ 50.0f, 50.0f }, BEIGE); // Ground
|
||||||
|
DrawGrid(20, 1.0f);
|
||||||
|
EndMode3D();
|
||||||
|
|
||||||
|
DrawText("Travel as far as you can!", 10, 10, 20, DARKGRAY);
|
||||||
|
EndDrawing();
|
||||||
|
}
|
||||||
|
|
||||||
|
CloseWindow();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user