source: opengl-game/opengl-game.hpp@ 6fc24c7

feature/imgui-sdl points-test
Last change on this file since 6fc24c7 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
RevLine 
[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"
8
9class OpenGLGame {
10 public:
11 OpenGLGame();
12 ~OpenGLGame();
13
[b6e60b4]14 void run(int width, int height, unsigned char guiFlags);
[d02c25f]15
16 private:
[d8cb15e]17 GameGui* gui;
18 GLFWwindow* window;
19
[b6e60b4]20 bool initWindow(int width, int height, unsigned char guiFlags);
[d8cb15e]21 void initOpenGL();
22 void mainLoop();
[f133da0]23 void renderScene();
24 void renderUI();
[d8cb15e]25 void cleanup();
[d02c25f]26};
27
[92cbc6a]28void 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
[d02c25f]38#endif // _OPENGL_GAME_H
Note: See TracBrowser for help on using the repository browser.