diff options
author | chai <chaifix@163.com> | 2018-10-24 22:08:46 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-24 22:08:46 +0800 |
commit | d8d7963b9b658799b806d516bbd6b44c4baa28f8 (patch) | |
tree | 4a8c7c247e5c429a4ee50baf3b5be2032575aab6 /examples/particle_system/main.cpp | |
parent | e98acfb0d497e9c4560554cba73eb5c313ea034a (diff) |
+粒子系统测试
Diffstat (limited to 'examples/particle_system/main.cpp')
-rw-r--r-- | examples/particle_system/main.cpp | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/examples/particle_system/main.cpp b/examples/particle_system/main.cpp new file mode 100644 index 0000000..05eddc1 --- /dev/null +++ b/examples/particle_system/main.cpp @@ -0,0 +1,58 @@ +#include "jin.h" + +using namespace JinEngine::Game; +using namespace JinEngine::Graphics; +using namespace JinEngine::Input; + +ParticleSystem* p; + +void onLoad() +{ + +} + +void onEvent(Event* e) +{ + static Game* game = Game::get(); + if (e->type == EventType::QUIT) + game->stop(); +} + +void onUpdate(int ms) +{ +} + +void onDraw() +{ + glClear(GL_COLOR_BUFFER_BIT); + +} + +int main(int argc, char* argv[]) +{ + Game* game = Game::get(); + Game::Setting setting; + setting.loader = onLoad; + setting.eventHandler = onEvent; + setting.updater = onUpdate; + setting.drawer = onDraw; + game->init(&setting); + + Window* wnd = Window::get(); + Window::Setting wndSetting; + wndSetting.width = 600; + wndSetting.height = 512; + wndSetting.title = "Jin v0.1.1"; + wndSetting.fps = 60; + wndSetting.vsync = false; + wndSetting.fullscreen = false; + wndSetting.resizable = false; + wnd->init(&wndSetting); + + game->run(); + + game->quit(); + wnd->quit(); + + return 0; +}
\ No newline at end of file |