/******************************************************************************* * This file is part of the "Enduro2D" * For conditions of distribution and use, see copyright notice in LICENSE.md * Copyright (C) 2018 Matvey Cherevko ******************************************************************************/ #include "../common.hpp" using namespace e2d; int e2d_main() { modules::initialize(); modules::initialize(); modules::initialize(v2u{640, 480}, "Enduro2D", false); the().add_sink(); the().register_event_listener(the()); the().register_event_listener(the()); the() .trace("SAMPLE: window real size: %0", the().real_size()) .trace("SAMPLE: window virtual size: %0", the().virtual_size()) .trace("SAMPLE: window framebuffer size: %0", the().framebuffer_size()); const keyboard& k = the().keyboard(); while ( !the().should_close() && !k.is_key_just_released(keyboard_key::escape) ) { the().swap_buffers(true); the().frame_tick(); window::poll_events(); } return 0; }