mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-14 16:09:06 +07:00
bind_context window function. move vsync option to swap_buffers.
This commit is contained in:
@@ -10,8 +10,7 @@ using namespace e2d;
|
||||
int e2d_main() {
|
||||
input& i = modules::initialize<input>();
|
||||
debug& d = modules::initialize<debug>();
|
||||
window& w = modules::initialize<window>(
|
||||
v2u{640, 480}, "Enduro2D", true, false);
|
||||
window& w = modules::initialize<window>(v2u{640, 480}, "Enduro2D", false);
|
||||
|
||||
d.add_sink<debug_console_sink>();
|
||||
w.register_event_listener<window_input_source>(i);
|
||||
@@ -24,7 +23,7 @@ int e2d_main() {
|
||||
const keyboard& k = i.keyboard();
|
||||
while ( !w.should_close() && !k.is_key_just_released(keyboard_key::escape) ) {
|
||||
i.frame_tick();
|
||||
w.swap_buffers();
|
||||
w.swap_buffers(true);
|
||||
window::frame_tick();
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user