| 17 | extern int g_scene_id; |
| 18 | |
| 19 | struct Tutorial : public TutorialApplication |
| 20 | { |
| 21 | Tutorial() |
| 22 | : TutorialApplication(NAME, FEATURES) |
| 23 | { |
| 24 | /* set start camera */ |
| 25 | camera.from = Vec3f(2, 2, 2); |
| 26 | camera.to = Vec3f(0, 0, 0); |
| 27 | } |
| 28 | |
| 29 | #if defined(USE_GLFW) |
| 30 | |
| 31 | void drawGUI() override |
| 32 | { |
| 33 | static const char* items[] = { "full scene", "right half", "left half" }; |
| 34 | ImGui::Combo("##scene_id",&g_scene_id,items,IM_ARRAYSIZE(items)); |
| 35 | } |
| 36 | |
| 37 | void keypressed(int key) override |
| 38 | { |
| 39 | if (key == ' ') |
| 40 | g_scene_id = (g_scene_id+1)%3; |
| 41 | else |
| 42 | TutorialApplication::keypressed(key); |
| 43 | } |
| 44 | #endif |
| 45 | |
| 46 | }; |
| 47 | |
| 48 | } |
| 49 | |