Changeset 1ce9afe in opengl-game for game-gui-glfw.hpp
- Timestamp:
- Sep 2, 2019, 7:40:49 PM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 7fc5e27
- Parents:
- 301d0d4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
game-gui-glfw.hpp
r301d0d4 r1ce9afe 10 10 #include <GLFW/glfw3.h> 11 11 12 #define NUM_KEYS (512) 13 12 14 class GameGui_GLFW : public GameGui { 13 15 public: 16 static string s_errorMessage; // Has to be public so that glfw_error_callback can access it 17 18 // Both have to be public so that glfw_key_callback can access them 19 // TODO: Implement a more generic public api over this to get the key state 20 static int s_keyState[NUM_KEYS]; 21 static bool s_keyDown[NUM_KEYS]; 22 14 23 string& GetError(); 15 16 static string s_errorMessage; // Has to be public so that glfw_error_callback can access it17 24 18 25 bool Init(); 19 26 void Shutdown(); 20 27 21 void* CreateWindow(const string& title, unsigned int width, unsigned int height );28 void* CreateWindow(const string& title, unsigned int width, unsigned int height, bool fullscreen); 22 29 void DestroyWindow(); 23 30 … … 34 41 35 42 void glfw_error_callback(int error, const char* description); 43 void glfw_key_callback(GLFWwindow* window, int key, int scancode, int action, int mods); 36 44 37 45 #endif // _GAME_GUI_GLFW_H
Note:
See TracChangeset
for help on using the changeset viewer.