Fix position of new entities
This commit is contained in:
+6
-4
@@ -306,8 +306,6 @@ end_frame :: proc(state: ^engine_state)
|
||||
|
||||
}
|
||||
|
||||
glfw.SwapBuffers(state.window)
|
||||
__e2d_interal.viewport_changed = false
|
||||
}
|
||||
|
||||
cleanup :: proc(state: ^engine_state)
|
||||
@@ -356,13 +354,14 @@ is_key_released :: #force_inline proc(state: ^engine_state, key : i32) -> bool{
|
||||
}
|
||||
|
||||
|
||||
draw_flush :: proc(d: ^e2_draw.Draw)
|
||||
draw_flush :: proc(state: ^engine_state)
|
||||
{
|
||||
d := &state.draw
|
||||
if __e2d_interal.viewport_changed
|
||||
{
|
||||
d.glyph.atlas_width = d.cam.width
|
||||
d.glyph.atlas_height = d.cam.height
|
||||
d.glyph.font_size_pt = 9
|
||||
d.glyph.font_size_pt = 12
|
||||
d.glyph.width = d.cam.width
|
||||
d.glyph.height = d.cam.height
|
||||
|
||||
@@ -370,5 +369,8 @@ draw_flush :: proc(d: ^e2_draw.Draw)
|
||||
|
||||
}
|
||||
e2_draw.draw_flush(d, __e2d_interal.viewport_changed)
|
||||
|
||||
glfw.SwapBuffers(state.window)
|
||||
__e2d_interal.viewport_changed = false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user