initial
This commit is contained in:
commit
ded8dbba8c
199 changed files with 367950 additions and 0 deletions
31
program.odin
Normal file
31
program.odin
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
init :: proc() {
|
||||
rl.SetTraceLogLevel(.WARNING)
|
||||
rl.SetConfigFlags({.WINDOW_RESIZABLE, .VSYNC_HINT})
|
||||
rl.InitWindow(WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_CAPTION)
|
||||
rl.SetTargetFPS(WINDOW_FRAMERATE)
|
||||
}
|
||||
|
||||
update :: proc() {
|
||||
rl.BeginDrawing()
|
||||
rl.ClearBackground(rl.BLACK)
|
||||
rl.DrawText("Hello world", 4, 4, 32, rl.WHITE)
|
||||
rl.EndDrawing()
|
||||
free_all(context.temp_allocator)
|
||||
}
|
||||
|
||||
parent_window_size_changed :: proc(w, h: int) {
|
||||
rl.SetWindowSize(i32(w), i32(h))
|
||||
}
|
||||
|
||||
shutdown :: proc() {
|
||||
rl.CloseWindow()
|
||||
}
|
||||
|
||||
should_run :: proc() -> bool {
|
||||
when ODIN_OS != .JS {
|
||||
if rl.WindowShouldClose() {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue