Changeset c61323a in opengl-game for game-gui-glfw.hpp


Ignore:
Timestamp:
Sep 13, 2019, 2:51:30 AM (5 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
1fcca9e
Parents:
f6521fb
Message:

Implement processEvents() and pollEvent() for GameGui_GLFW and re-implement the main loop in opengl-game using those functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • game-gui-glfw.hpp

    rf6521fb rc61323a  
    11#ifndef _GAME_GUI_GLFW_H
    22#define _GAME_GUI_GLFW_H
     3
     4#include <queue>
    35
    46#include "game-gui.hpp"
     
    1416      static string s_errorMessage; // Has to be public so that glfw_error_callback can access it
    1517
    16       // Both have to be public so that glfw_key_callback can access them
    17       // TODO: Implement a more generic public api over this to get the key state
    18       static int s_keyState[GLFW_KEY_LAST];
    19       static bool s_keyDown[GLFW_KEY_LAST];
     18      // Has to be public so that glfw_key_callback can access it
     19      static queue<UIEvent> s_events;
    2020
    2121      string& getError();
     
    2727      void destroyWindow();
    2828
    29       /*
    3029      void processEvents();
    31 
    32       unsigned char getKeyEvent(unsigned int key);
    33       bool isKeyPressed(unsigned int key);
    34 
    35       int pollMouseEvent(MouseEvent* event);
    36       */
     30      int pollEvent(UIEvent* event);
    3731
    3832#ifdef GAMEGUI_INCLUDE_VULKAN
     
    4741
    4842      int windowWidth, windowHeight;
    49       static queue<UIEvent> s_events;
    5043};
    5144
Note: See TracChangeset for help on using the changeset viewer.