mirror of
https://github.com/enduro2d/enduro2d-bootstrap.git
synced 2025-12-12 19:18:32 +07:00
Merge pull request #6 from enduro2d/hotfix/update_modules
Hotfix/update modules
This commit is contained in:
@@ -21,14 +21,6 @@ matrix:
|
||||
dist: trusty
|
||||
addons: { apt: { sources: ubuntu-toolchain-r-test, packages: ["xorg-dev", "g++-8"] } }
|
||||
env: MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||
- os: linux
|
||||
dist: trusty
|
||||
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.6"], packages: ["xorg-dev", "clang-3.6", "g++-5"] } }
|
||||
env: MATRIX_EVAL="CC=clang-3.6 && CXX=clang++-3.6"
|
||||
- os: linux
|
||||
dist: trusty
|
||||
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.7"], packages: ["xorg-dev", "clang-3.7", "g++-5"] } }
|
||||
env: MATRIX_EVAL="CC=clang-3.7 && CXX=clang++-3.7"
|
||||
- os: linux
|
||||
dist: trusty
|
||||
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["xorg-dev", "clang-3.8", "g++-5"] } }
|
||||
|
||||
Submodule modules/enduro2d updated: 1efe30ec16...8e269e10b6
@@ -7,27 +7,28 @@
|
||||
#include <enduro2d/enduro2d.hpp>
|
||||
using namespace e2d;
|
||||
|
||||
int e2d_main() {
|
||||
{
|
||||
modules::initialize<vfs>()
|
||||
.register_scheme<filesystem_file_source>("file");
|
||||
modules::initialize<debug>()
|
||||
.register_sink<debug_console_sink>();
|
||||
modules::initialize<input>();
|
||||
modules::initialize<window>(v2u{640, 480}, "Enduro2D", false)
|
||||
.register_event_listener<window_input_source>(the<input>());
|
||||
modules::initialize<render>(the<debug>(), the<window>());
|
||||
}
|
||||
{
|
||||
const keyboard& k = the<input>().keyboard();
|
||||
while ( !the<window>().should_close() && !k.is_key_just_released(keyboard_key::escape) ) {
|
||||
namespace
|
||||
{
|
||||
class game final : public application {
|
||||
public:
|
||||
bool frame_tick() final {
|
||||
const keyboard& k = the<input>().keyboard();
|
||||
while ( the<window>().should_close() || k.is_key_just_released(keyboard_key::escape) ) {
|
||||
return false;
|
||||
}
|
||||
the<render>().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<input>().frame_tick();
|
||||
window::poll_events();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
int e2d_main(int argc, char *argv[]) {
|
||||
auto params = engine::parameters("bootstrap", "enduro2d")
|
||||
.timer_params(engine::timer_parameters()
|
||||
.maximal_framerate(100));
|
||||
modules::initialize<engine>(argc, argv, params).start<game>();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user