feature/imgui-sdl
Last change
on this file since 756162f was cb6fabb, checked in by Dmitry Portnoy <dportnoy@…>, 3 years ago |
Update the build instructions and makefile to work with OSX again
|
-
Property mode
set to
100644
|
File size:
980 bytes
|
Line | |
---|
1 | #ifndef _GAME_GUI_SDL_H
|
---|
2 | #define _GAME_GUI_SDL_H
|
---|
3 |
|
---|
4 | #include "game-gui.hpp"
|
---|
5 |
|
---|
6 | #include <SDL2/SDL.h>
|
---|
7 |
|
---|
8 | #ifdef GAMEGUI_INCLUDE_VULKAN
|
---|
9 | #include <SDL2/SDL_vulkan.h>
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | class GameGui_SDL : public GameGui {
|
---|
13 | public:
|
---|
14 | GameGui_SDL();
|
---|
15 |
|
---|
16 | string& getError();
|
---|
17 |
|
---|
18 | bool init();
|
---|
19 | void shutdown();
|
---|
20 |
|
---|
21 | void* createWindow(const string& title, int width, int height, bool fullscreen);
|
---|
22 | void destroyWindow();
|
---|
23 |
|
---|
24 | void processEvents();
|
---|
25 | int pollEvent(UIEvent* uiEvent);
|
---|
26 | bool keyPressed(unsigned int key);
|
---|
27 |
|
---|
28 | void refreshWindowSize();
|
---|
29 | int getWindowWidth();
|
---|
30 | int getWindowHeight();
|
---|
31 |
|
---|
32 | #ifdef GAMEGUI_INCLUDE_VULKAN
|
---|
33 | bool createVulkanSurface(VkInstance instance, VkSurfaceKHR* surface);
|
---|
34 | vector<const char*> getRequiredExtensions();
|
---|
35 | #endif
|
---|
36 |
|
---|
37 | SDL_Window* window;
|
---|
38 |
|
---|
39 | private:
|
---|
40 | // SDL_Window* window;
|
---|
41 | int windowWidth, windowHeight;
|
---|
42 | const Uint8* keyState;
|
---|
43 |
|
---|
44 | string s_errorMessage;
|
---|
45 | };
|
---|
46 |
|
---|
47 | #endif // _GAME_GUI_SDL_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.