source:
opengl-game/game-gui.hpp@
d2f607c
Last change on this file since d2f607c was 27c40ce, checked in by , 5 years ago | |
---|---|
|
|
File size: 1.1 KB |
Rev | Line | |
---|---|---|
[0e6ecf3] | 1 | #ifndef _GAME_GUI_H |
2 | #define _GAME_GUI_H | |
3 | ||
[9546928] | 4 | #include <string> |
5 | #include <vector> | |
6 | ||
[4eb4d0a] | 7 | #ifdef GAMEGUI_INCLUDE_VULKAN |
8 | #include <vulkan/vulkan.h> | |
9 | #endif | |
[0e6ecf3] | 10 | |
[1ce9afe] | 11 | // TODO: Remove the line below once the couts in the game-gui-* files are moved |
12 | #include <iostream> | |
13 | ||
[0e6ecf3] | 14 | using namespace std; |
15 | ||
[27c40ce] | 16 | /* |
17 | struct MouseEvent { | |
18 | int button; | |
19 | int action; | |
20 | int x; | |
21 | int y; | |
22 | }; | |
23 | */ | |
24 | ||
[f898c5f] | 25 | class GameGui { |
26 | public: | |
[98f3232] | 27 | virtual ~GameGui() {}; |
28 | ||
[7fc5e27] | 29 | virtual string& getError() = 0; |
[d5f2b42] | 30 | |
[7fc5e27] | 31 | virtual bool init() = 0; |
32 | virtual void shutdown() = 0; | |
[0e6ecf3] | 33 | |
[7fc5e27] | 34 | virtual void* createWindow(const string& title, int width, int height, bool fullscreen) = 0; |
35 | virtual void destroyWindow() = 0; | |
[0e6ecf3] | 36 | |
[27c40ce] | 37 | /* |
38 | virtual void processEvents() = 0; | |
39 | ||
40 | virtual int pollMouseEvent(MouseEvent* event) = 0; | |
41 | ||
42 | virtual unsigned char getKeyEvent(unsigned int key) = 0; | |
43 | virtual bool isKeyPressed(unsigned int key) = 0; | |
44 | */ | |
45 | ||
[4eb4d0a] | 46 | #ifdef GAMEGUI_INCLUDE_VULKAN |
[7fc5e27] | 47 | virtual bool createVulkanSurface(VkInstance instance, VkSurfaceKHR* surface) = 0; |
[4eb4d0a] | 48 | #endif |
49 | ||
[7fc5e27] | 50 | virtual vector<const char*> getRequiredExtensions() = 0; |
51 | virtual void getWindowSize(int* width, int* height) = 0; | |
[0e6ecf3] | 52 | }; |
53 | ||
[27c40ce] | 54 | #endif // _GAME_GUI_H |
Note:
See TracBrowser
for help on using the repository browser.