feature/imgui-sdl
points-test
Last change
on this file since 92cbc6a was 92cbc6a, checked in by Dmitry Portnoy <dmp1488@…>, 5 years ago |
In openglgame, initialize OpenGL using glew, register the OpenGL debug callback, and clear the screen to black
|
-
Property mode
set to
100644
|
File size:
619 bytes
|
Line | |
---|
1 | #ifndef _OPENGL_GAME_H
|
---|
2 | #define _OPENGL_GAME_H
|
---|
3 |
|
---|
4 | #include "game-gui-glfw.hpp"
|
---|
5 |
|
---|
6 | class OpenGLGame {
|
---|
7 | public:
|
---|
8 | OpenGLGame();
|
---|
9 | ~OpenGLGame();
|
---|
10 |
|
---|
11 | void run(int width, int height, unsigned char guiFlags);
|
---|
12 |
|
---|
13 | private:
|
---|
14 | GameGui* gui;
|
---|
15 | GLFWwindow* window;
|
---|
16 |
|
---|
17 | bool initWindow(int width, int height, unsigned char guiFlags);
|
---|
18 | void initOpenGL();
|
---|
19 | void mainLoop();
|
---|
20 | void cleanup();
|
---|
21 | };
|
---|
22 |
|
---|
23 | void APIENTRY opengl_debug_callback(
|
---|
24 | GLenum source,
|
---|
25 | GLenum type,
|
---|
26 | GLuint id,
|
---|
27 | GLenum severity,
|
---|
28 | GLsizei length,
|
---|
29 | const GLchar* message,
|
---|
30 | const void* userParam
|
---|
31 | );
|
---|
32 |
|
---|
33 | #endif // _OPENGL_GAME_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.