source: opengl-game/opengl-game.hpp@ 83b5b4b

feature/imgui-sdl points-test
Last change on this file since 83b5b4b was 83b5b4b, checked in by Dmitry Portnoy <dmitry.portnoy@…>, 6 years ago

Handle window resize events in openglgame

  • Property mode set to 100644
File size: 875 bytes
RevLine 
[d02c25f]1#ifndef _OPENGL_GAME_H
2#define _OPENGL_GAME_H
3
[83b5b4b]4#include <glm/glm.hpp>
5
[f133da0]6#include "IMGUI/imgui.h"
7#include "imgui_impl_glfw_gl3.h"
8
[d02c25f]9#include "game-gui-glfw.hpp"
[3de31cf]10#include "graphics-pipeline_opengl.hpp"
[d02c25f]11
12class OpenGLGame {
13 public:
14 OpenGLGame();
15 ~OpenGLGame();
16
[b6e60b4]17 void run(int width, int height, unsigned char guiFlags);
[d02c25f]18
19 private:
[d8cb15e]20 GameGui* gui;
[83b5b4b]21 Viewport viewport;
[3de31cf]22
23 vector<GraphicsPipeline_OpenGL> graphicsPipelines;
24
[d8cb15e]25 GLFWwindow* window;
26
[b6e60b4]27 bool initWindow(int width, int height, unsigned char guiFlags);
[d8cb15e]28 void initOpenGL();
29 void mainLoop();
[f133da0]30 void renderScene();
31 void renderUI();
[d8cb15e]32 void cleanup();
[d02c25f]33};
34
[92cbc6a]35void APIENTRY opengl_debug_callback(
36 GLenum source,
37 GLenum type,
38 GLuint id,
39 GLenum severity,
40 GLsizei length,
41 const GLchar* message,
42 const void* userParam
43);
44
[d02c25f]45#endif // _OPENGL_GAME_H
Note: See TracBrowser for help on using the repository browser.