MCPcopy Create free account
hub / github.com/RobLoach/raylib-cpp / main

Function main

projects/VSCode/FirstPerson.cpp:28–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28int main() {
29
30 const int screenWidth = 800;
31 const int screenHeight = 450;
32
33 raylib::Window window(screenWidth, screenHeight);
34
35
36 raylib::Vector3 position(10.0f, 10.0f, 8.0f);
37 raylib::Vector3 target(0.0f, 0.0f, 0.0f);
38 raylib::Vector3 up (0.0f, 1.0f, 0.0f);
39
40 float fovy = 60.0f;
41 raylib::Camera3D cam(position, target, up, fovy, CAMERA_PERSPECTIVE);
42
43 window.SetTargetFPS(60);
44
45 while (!window.ShouldClose()) {
46 UpdateFrame(window, cam);
47 }
48
49 window.Close();
50 return EXIT_SUCCESS;
51}

Callers

nothing calls this directly

Calls 3

UpdateFrameFunction · 0.85
ShouldCloseMethod · 0.80
CloseMethod · 0.45

Tested by

no test coverage detected