feature/imgui-sdl
points-test
Last change
on this file since 4d84c72 was f133da0, checked in by Dmitry Portnoy <dmp1488@…>, 5 years ago |
Add renderScene and renderUI functions to openglgame and use IMGUI to render the main menu
|
-
Property mode
set to
100644
|
File size:
727 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 |
|
---|
9 | class OpenGLGame {
|
---|
10 | public:
|
---|
11 | OpenGLGame();
|
---|
12 | ~OpenGLGame();
|
---|
13 |
|
---|
14 | void run(int width, int height, unsigned char guiFlags);
|
---|
15 |
|
---|
16 | private:
|
---|
17 | GameGui* gui;
|
---|
18 | GLFWwindow* window;
|
---|
19 |
|
---|
20 | bool initWindow(int width, int height, unsigned char guiFlags);
|
---|
21 | void initOpenGL();
|
---|
22 | void mainLoop();
|
---|
23 | void renderScene();
|
---|
24 | void renderUI();
|
---|
25 | void cleanup();
|
---|
26 | };
|
---|
27 |
|
---|
28 | void APIENTRY opengl_debug_callback(
|
---|
29 | GLenum source,
|
---|
30 | GLenum type,
|
---|
31 | GLuint id,
|
---|
32 | GLenum severity,
|
---|
33 | GLsizei length,
|
---|
34 | const GLchar* message,
|
---|
35 | const void* userParam
|
---|
36 | );
|
---|
37 |
|
---|
38 | #endif // _OPENGL_GAME_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.