Debian Codegraph @

projects/scripts/core_basic_window.c

raw symbols SCIP
1 /*******************************************************************************************
2 *
3 * raylib [core] example - Basic window
4 *
5 * Welcome to raylib!
6 *
7 * You can find all basic examples on C:\raylib\raylib\examples folder or
8 * raylib official webpage: www.raylib.com
9 *
10 * Enjoy using raylib. :)
11 *
12 * This example has been created using raylib 1.0 (www.raylib.com)
13 * It has been re-confirmed with raylib 3.7.0
14 * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
15 *
16 * Copyright (c) 2013-2016 Ramon Santamaria (@raysan5)
17 * Simple adjustments on 2021-10-01
18 *
19 ********************************************************************************************/
20
21 #include "raylib.h"
22
23 int main(void)
24 {
25 // Initialization
26 //--------------------------------------------------------------------------------------
27 int screenWidth = 800;
28 int screenHeight = 450;
29
30 InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
31
32 SetTargetFPS(60);
33 //--------------------------------------------------------------------------------------
34
35 // Main game loop
36 while (!WindowShouldClose()) // Detect window close button or ESC key
37 {
38 // Update
39 //----------------------------------------------------------------------------------
40 // TODO: Update your variables here
41 //----------------------------------------------------------------------------------
42
43 // Draw
44 //----------------------------------------------------------------------------------
45 BeginDrawing();
46
47 ClearBackground(RAYWHITE);
48
49 DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
50
51 EndDrawing();
52 //----------------------------------------------------------------------------------
53 }
54
55 // De-Initialization
56 //--------------------------------------------------------------------------------------
57 CloseWindow(); // Close window and OpenGL context
58 //--------------------------------------------------------------------------------------
59
60 return 0;
61 }