/******************************************************************************* * 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 using namespace e2d; int e2d_main() { { modules::initialize() .register_scheme("file"); modules::initialize() .register_sink(); modules::initialize(); modules::initialize(v2u{640, 480}, "Enduro2D", false) .register_event_listener(the()); modules::initialize(the(), the()); } { const keyboard& k = the().keyboard(); while ( !the().should_close() && !k.is_key_just_released(keyboard_key::escape) ) { the().execute(render::command_block<64>() .add_command(render::clear_command() .color_value({1.f, 0.4f, 0.f, 1.f})) .add_command(render::swap_command(true))); the().frame_tick(); window::poll_events(); } } return 0; }