-
Notifications
You must be signed in to change notification settings - Fork 2
/
core_basic_window.um
53 lines (43 loc) · 2.13 KB
/
core_basic_window.um
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*******************************************************************************************
*
* raylib-umka [core] example - Basic window
*
* Welcome to raylib!
*
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2022 Rob Loach (@RobLoach)
*
********************************************************************************************/
import "raylib"
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
fn main() {
// Initialization
//--------------------------------------------------------------------------------------
screenWidth := 800
screenHeight := 450
raylib.InitWindow(screenWidth, screenHeight, "raylib-umka [core] example - basic window")
raylib.SetTargetFPS(60) // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
for !raylib.WindowShouldClose() {
// Update
//----------------------------------------------------------------------------------
// TODO: Update your variables here
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
raylib.BeginDrawing()
raylib.ClearBackground(raylib.RAYWHITE)
raylib.DrawText("Congrats! You created your first raylib-umka window!", 150, 200, 20, raylib.LIGHTGRAY)
raylib.EndDrawing()
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
raylib.CloseWindow() // Close window and OpenGL context
//--------------------------------------------------------------------------------------
}