Changed draw.odin, removed DearImgui
This commit is contained in:
+9
-4
@@ -8,8 +8,8 @@ import im "shared:odin-imgui"
|
||||
import "shared:odin-imgui/imgui_impl_glfw"
|
||||
import "shared:odin-imgui/imgui_impl_opengl3"
|
||||
import gl "vendor:OpenGL"
|
||||
import "core:fmt"
|
||||
import "vendor:glfw"
|
||||
import draw "shared:Edit2D/draw"
|
||||
import "core:reflect"
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import "core:reflect"
|
||||
engine_state :: struct
|
||||
{
|
||||
window : glfw.WindowHandle,
|
||||
draw : Draw,
|
||||
draw : draw.Draw,
|
||||
restart, pause : bool,
|
||||
substep_count : u32,
|
||||
|
||||
@@ -139,7 +139,7 @@ engine_init :: proc($GameType : typeid, state: ^engine_state)
|
||||
imgui_impl_glfw.InitForOpenGL(state.window, true)
|
||||
imgui_impl_opengl3.Init("#version 150")
|
||||
|
||||
state.draw.cam = camera_init()
|
||||
state.draw.cam = draw.camera_init()
|
||||
|
||||
display_w, display_h := glfw.GetFramebufferSize(state.window)
|
||||
state.draw.cam.width = display_w
|
||||
@@ -147,7 +147,7 @@ engine_init :: proc($GameType : typeid, state: ^engine_state)
|
||||
state.draw.cam.zoom = 15
|
||||
state.draw.show_ui = true
|
||||
|
||||
draw_create(&state.draw, &state.draw.cam)
|
||||
draw.draw_create(&state.draw, &state.draw.cam)
|
||||
|
||||
cbor.tag_register_type({
|
||||
marshal = proc(_: ^cbor.Tag_Implementation, e: cbor.Encoder, v: any) -> cbor.Marshal_Error {
|
||||
@@ -236,6 +236,11 @@ is_key_released :: #force_inline proc(state: ^engine_state, key : i32) -> bool{
|
||||
}
|
||||
|
||||
|
||||
draw_flush :: proc(d: ^draw.Draw)
|
||||
{
|
||||
draw.draw_flush(d)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user