Prepping to add ui
This commit is contained in:
parent
a2a70a0f33
commit
af82f9c2d4
6 changed files with 120 additions and 589 deletions
42
main.odin
Normal file
42
main.odin
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
package main
|
||||
|
||||
import rl "libraries/raylib"
|
||||
import "base:runtime"
|
||||
|
||||
WINDOW_WIDTH :: 1280
|
||||
WINDOW_HEIGHT :: 720
|
||||
WINDOW_FRAMERATE :: 30
|
||||
WINDOW_CAPTION :: "Transformation Visualizer"
|
||||
|
||||
init :: proc() {
|
||||
rl.SetTraceLogLevel(.WARNING)
|
||||
rl.SetConfigFlags({.VSYNC_HINT})
|
||||
rl.InitWindow(WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_CAPTION)
|
||||
rl.SetTargetFPS(WINDOW_FRAMERATE)
|
||||
program_init()
|
||||
}
|
||||
|
||||
update :: proc() {
|
||||
rl.BeginDrawing()
|
||||
defer rl.EndDrawing()
|
||||
rl.ClearBackground(rl.BLACK)
|
||||
program_update()
|
||||
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