From d8d7963b9b658799b806d516bbd6b44c4baa28f8 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 24 Oct 2018 22:08:46 +0800 Subject: =?UTF-8?q?+=E7=B2=92=E5=AD=90=E7=B3=BB=E7=BB=9F=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/particle_system/main.cpp | 58 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 examples/particle_system/main.cpp (limited to 'examples/particle_system') 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 -- cgit v1.1-26-g67d0