feature/imgui-sdl
points-test
|
Last change
on this file since 054d9ed was a6f6833, checked in by Dmitry Portnoy <dmp1488@…>, 6 years ago |
|
Remove getWindowSize() from game-gui and instead add getWindowWidth(), getWindowHeight(), and refreshWindowSize() (which updates the internal variables returned by the first two functions)
|
-
Property mode
set to
100644
|
|
File size:
917 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 | #include <SDL2/SDL_image.h>
|
|---|
| 8 | #include <SDL2/SDL_ttf.h>
|
|---|
| 9 |
|
|---|
| 10 | #ifdef GAMEGUI_INCLUDE_VULKAN
|
|---|
| 11 | #include <SDL2/SDL_vulkan.h>
|
|---|
| 12 | #endif
|
|---|
| 13 |
|
|---|
| 14 | class GameGui_SDL : public GameGui {
|
|---|
| 15 | public:
|
|---|
| 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* event);
|
|---|
| 26 |
|
|---|
| 27 | void refreshWindowSize();
|
|---|
| 28 | int getWindowWidth();
|
|---|
| 29 | int getWindowHeight();
|
|---|
| 30 |
|
|---|
| 31 | #ifdef GAMEGUI_INCLUDE_VULKAN
|
|---|
| 32 | bool createVulkanSurface(VkInstance instance, VkSurfaceKHR* surface);
|
|---|
| 33 | vector<const char*> getRequiredExtensions();
|
|---|
| 34 | #endif
|
|---|
| 35 |
|
|---|
| 36 | private:
|
|---|
| 37 | SDL_Window* window;
|
|---|
| 38 | int windowWidth, windowHeight;
|
|---|
| 39 |
|
|---|
| 40 | static string s_errorMessage;
|
|---|
| 41 | };
|
|---|
| 42 |
|
|---|
| 43 | #endif // _GAME_GUI_SDL_H
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.