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

Function main

examples/core/core_basic_window_web.cpp:36–56  ·  view source on GitHub ↗

---------------------------------------------------------------------------------- Main Enry Point ----------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

34// Main Enry Point
35//----------------------------------------------------------------------------------
36int main()
37{
38 // Initialization
39 //--------------------------------------------------------------------------------------
40 raylib::Window window(screenWidth, screenHeight, "raylib-cpp [core] example - basic window");
41
42#if defined(PLATFORM_WEB)
43 emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
44#else
45 SetTargetFPS(60); // Set our game to run at 60 frames-per-second
46 //--------------------------------------------------------------------------------------
47
48 // Main game loop
49 while (!window.ShouldClose()) // Detect window close button or ESC key
50 {
51 UpdateDrawFrame();
52 }
53#endif
54
55 return 0;
56}
57
58//----------------------------------------------------------------------------------
59// Module Functions Definition

Callers

nothing calls this directly

Calls 2

ShouldCloseMethod · 0.80
UpdateDrawFrameFunction · 0.70

Tested by

no test coverage detected