Changeset 7bf5433 in opengl-game for game-gui-glfw.hpp
- Timestamp:
- Sep 12, 2019, 5:23:28 AM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- d2f607c
- Parents:
- 27c40ce
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
game-gui-glfw.hpp
r27c40ce r7bf5433 10 10 #include <GLFW/glfw3.h> 11 11 12 #define NUM_KEYS (512)13 14 12 class GameGui_GLFW : public GameGui { 15 13 public: … … 18 16 // Both have to be public so that glfw_key_callback can access them 19 17 // 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];18 static int s_keyState[GLFW_KEY_LAST]; 19 static bool s_keyDown[GLFW_KEY_LAST]; 22 20 23 21 string& getError(); … … 28 26 void* createWindow(const string& title, int width, int height, bool fullscreen); 29 27 void destroyWindow(); 28 29 /* 30 void processEvents(); 31 32 unsigned char getKeyEvent(unsigned int key); 33 bool isKeyPressed(unsigned int key); 34 35 int pollMouseEvent(MouseEvent* event); 36 */ 30 37 31 38 #ifdef GAMEGUI_INCLUDE_VULKAN … … 43 50 44 51 void glfw_error_callback(int error, const char* description); 52 void glfw_mouse_button_callback(GLFWwindow* window, int button, int action, int mods); 45 53 void glfw_key_callback(GLFWwindow* window, int key, int scancode, int action, int mods); 46 54
Note:
See TracChangeset
for help on using the changeset viewer.