source: opengl-game/opengl-game.hpp@ 3de31cf

feature/imgui-sdl points-test
Last change on this file since 3de31cf was 3de31cf, checked in by Dmitry Portnoy <dmp1488@…>, 5 years ago

Add and begin implementing an OpenGL version of the GraphicsPipeline class

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