feature/imgui-sdl
points-test
Last change
on this file since ee75487 was 3de31cf, checked in by Dmitry Portnoy <dmp1488@…>, 6 years ago |
Add and begin implementing an OpenGL version of the GraphicsPipeline class
|
-
Property mode
set to
100644
|
File size:
826 bytes
|
Rev | Line | |
---|
[d02c25f] | 1 | #ifndef _OPENGL_GAME_H
|
---|
| 2 | #define _OPENGL_GAME_H
|
---|
| 3 |
|
---|
[f133da0] | 4 | #include "IMGUI/imgui.h"
|
---|
| 5 | #include "imgui_impl_glfw_gl3.h"
|
---|
| 6 |
|
---|
[d02c25f] | 7 | #include "game-gui-glfw.hpp"
|
---|
[3de31cf] | 8 | #include "graphics-pipeline_opengl.hpp"
|
---|
[d02c25f] | 9 |
|
---|
| 10 | class OpenGLGame {
|
---|
| 11 | public:
|
---|
| 12 | OpenGLGame();
|
---|
| 13 | ~OpenGLGame();
|
---|
| 14 |
|
---|
[b6e60b4] | 15 | void run(int width, int height, unsigned char guiFlags);
|
---|
[d02c25f] | 16 |
|
---|
| 17 | private:
|
---|
[d8cb15e] | 18 | GameGui* gui;
|
---|
[3de31cf] | 19 |
|
---|
| 20 | vector<GraphicsPipeline_OpenGL> graphicsPipelines;
|
---|
| 21 |
|
---|
[d8cb15e] | 22 | GLFWwindow* window;
|
---|
| 23 |
|
---|
[b6e60b4] | 24 | bool initWindow(int width, int height, unsigned char guiFlags);
|
---|
[d8cb15e] | 25 | void initOpenGL();
|
---|
| 26 | void mainLoop();
|
---|
[f133da0] | 27 | void renderScene();
|
---|
| 28 | void renderUI();
|
---|
[d8cb15e] | 29 | void cleanup();
|
---|
[d02c25f] | 30 | };
|
---|
| 31 |
|
---|
[92cbc6a] | 32 | void 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 |
|
---|
[d02c25f] | 42 | #endif // _OPENGL_GAME_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.