Debian Codegraph @

projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/main.c

raw symbols SCIP
1 /*******************************************************************************************
2 *
3 * raylib [core] example - Basic window
4 *
5 * This example has been created using raylib 3.8 (www.raylib.com)
6 * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
7 *
8 * Example contributed by <user_name> (@<user_github>) and reviewed by Ramon Santamaria (@raysan5)
9 *
10 * Copyright (c) 2021 <user_name> (@<user_github>)
11
12 * Adapt for Visual Studio: Vadim Boev (Kronka Dev)
13 *
14 ********************************************************************************************/
15 #include "android_native_app_glue.h"
16
17 #include "../../../../src/raylib.h"
18
19 int main(void)
20 {
21 // Initialization
22 //--------------------------------------------------------------------------------------
23 const int screenWidth = 800;
24 const int screenHeight = 450;
25
26 InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
27
28 // TODO: Load resources / Initialize variables at this point
29
30 SetTargetFPS(60);
31 //--------------------------------------------------------------------------------------
32
33 // Main game loop
34 while (!WindowShouldClose()) // Detect window close button or ESC key
35 {
36 // Update
37 //----------------------------------------------------------------------------------
38 // TODO: Update variables / Implement example logic at this point
39 //----------------------------------------------------------------------------------
40
41 // Draw
42 //----------------------------------------------------------------------------------
43 BeginDrawing();
44
45 ClearBackground(RAYWHITE);
46
47 // TODO: Draw everything that requires to be drawn at this point:
48
49 DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY); // Example
50
51 EndDrawing();
52 //----------------------------------------------------------------------------------
53 }
54
55 // De-Initialization
56 //--------------------------------------------------------------------------------------
57
58 // TODO: Unload all loaded resources at this point
59
60 CloseWindow(); // Close window and OpenGL context
61 //--------------------------------------------------------------------------------------
62
63 return 0;
64 }