source: opengl-game/game-gui-sdl.hpp@ a79be34

feature/imgui-sdl points-test
Last change on this file since a79be34 was a6f6833, checked in by Dmitry Portnoy <dmp1488@…>, 5 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
RevLine 
[0e6ecf3]1#ifndef _GAME_GUI_SDL_H
2#define _GAME_GUI_SDL_H
3
[98f3232]4#include "game-gui.hpp"
[f898c5f]5
[0e6ecf3]6#include <SDL2/SDL.h>
[5f3dba8]7#include <SDL2/SDL_image.h>
8#include <SDL2/SDL_ttf.h>
[a6f6833]9
10#ifdef GAMEGUI_INCLUDE_VULKAN
11 #include <SDL2/SDL_vulkan.h>
12#endif
[0e6ecf3]13
[98f3232]14class GameGui_SDL : public GameGui {
[f898c5f]15 public:
[7fc5e27]16 string& getError();
[d5f2b42]17
[7fc5e27]18 bool init();
19 void shutdown();
[0e6ecf3]20
[7fc5e27]21 void* createWindow(const string& title, int width, int height, bool fullscreen);
22 void destroyWindow();
[0e6ecf3]23
[f6521fb]24 void processEvents();
25 int pollEvent(UIEvent* event);
26
[a6f6833]27 void refreshWindowSize();
28 int getWindowWidth();
29 int getWindowHeight();
30
[4eb4d0a]31#ifdef GAMEGUI_INCLUDE_VULKAN
[7fc5e27]32 bool createVulkanSurface(VkInstance instance, VkSurfaceKHR* surface);
33 vector<const char*> getRequiredExtensions();
[a6f6833]34#endif
[0e6ecf3]35
36 private:
37 SDL_Window* window;
[a6f6833]38 int windowWidth, windowHeight;
[d5f2b42]39
40 static string s_errorMessage;
[0e6ecf3]41};
42
43#endif // _GAME_GUI_SDL_H
Note: See TracBrowser for help on using the repository browser.