Changeset 7bf5433 in opengl-game for game-gui-glfw.hpp


Ignore:
Timestamp:
Sep 12, 2019, 5:23:28 AM (5 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
d2f607c
Parents:
27c40ce
Message:

Create a new OpenGLGame project for a refactor of the original OpenGL game to make copying its logic over to the Vulkan implementation easier

File:
1 edited

Legend:

Unmodified
Added
Removed
  • game-gui-glfw.hpp

    r27c40ce r7bf5433  
    1010#include <GLFW/glfw3.h>
    1111
    12 #define NUM_KEYS (512)
    13 
    1412class GameGui_GLFW : public GameGui {
    1513   public:
     
    1816      // Both have to be public so that glfw_key_callback can access them
    1917      // 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];
    2220
    2321      string& getError();
     
    2826      void* createWindow(const string& title, int width, int height, bool fullscreen);
    2927      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      */
    3037
    3138#ifdef GAMEGUI_INCLUDE_VULKAN
     
    4350
    4451void glfw_error_callback(int error, const char* description);
     52void glfw_mouse_button_callback(GLFWwindow* window, int button, int action, int mods);
    4553void glfw_key_callback(GLFWwindow* window, int key, int scancode, int action, int mods);
    4654
Note: See TracChangeset for help on using the changeset viewer.