feature/imgui-sdl
points-test
Last change
on this file since 203ab1b was 27c40ce, checked in by Dmitry Portnoy <dmp1488@…>, 5 years ago |
Update vulkangame to correctly display a window in Windows and add some commented-out code for a generic system for processing UI events
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | #ifndef _GAME_GUI_H
|
---|
2 | #define _GAME_GUI_H
|
---|
3 |
|
---|
4 | #include <string>
|
---|
5 | #include <vector>
|
---|
6 |
|
---|
7 | #ifdef GAMEGUI_INCLUDE_VULKAN
|
---|
8 | #include <vulkan/vulkan.h>
|
---|
9 | #endif
|
---|
10 |
|
---|
11 | // TODO: Remove the line below once the couts in the game-gui-* files are moved
|
---|
12 | #include <iostream>
|
---|
13 |
|
---|
14 | using namespace std;
|
---|
15 |
|
---|
16 | /*
|
---|
17 | struct MouseEvent {
|
---|
18 | int button;
|
---|
19 | int action;
|
---|
20 | int x;
|
---|
21 | int y;
|
---|
22 | };
|
---|
23 | */
|
---|
24 |
|
---|
25 | class GameGui {
|
---|
26 | public:
|
---|
27 | virtual ~GameGui() {};
|
---|
28 |
|
---|
29 | virtual string& getError() = 0;
|
---|
30 |
|
---|
31 | virtual bool init() = 0;
|
---|
32 | virtual void shutdown() = 0;
|
---|
33 |
|
---|
34 | virtual void* createWindow(const string& title, int width, int height, bool fullscreen) = 0;
|
---|
35 | virtual void destroyWindow() = 0;
|
---|
36 |
|
---|
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 |
|
---|
46 | #ifdef GAMEGUI_INCLUDE_VULKAN
|
---|
47 | virtual bool createVulkanSurface(VkInstance instance, VkSurfaceKHR* surface) = 0;
|
---|
48 | #endif
|
---|
49 |
|
---|
50 | virtual vector<const char*> getRequiredExtensions() = 0;
|
---|
51 | virtual void getWindowSize(int* width, int* height) = 0;
|
---|
52 | };
|
---|
53 |
|
---|
54 | #endif // _GAME_GUI_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.