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

feature/imgui-sdl
Last change on this file since cb6fabb 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
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>
[a6f6833]7
8#ifdef GAMEGUI_INCLUDE_VULKAN
9 #include <SDL2/SDL_vulkan.h>
10#endif
[0e6ecf3]11
[98f3232]12class GameGui_SDL : public GameGui {
[f898c5f]13 public:
[cd1cb0f]14 GameGui_SDL();
15
[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();
[d8cf709]25 int pollEvent(UIEvent* uiEvent);
[cd1cb0f]26 bool keyPressed(unsigned int key);
[f6521fb]27
[a6f6833]28 void refreshWindowSize();
29 int getWindowWidth();
30 int getWindowHeight();
31
[4eb4d0a]32#ifdef GAMEGUI_INCLUDE_VULKAN
[7fc5e27]33 bool createVulkanSurface(VkInstance instance, VkSurfaceKHR* surface);
34 vector<const char*> getRequiredExtensions();
[a6f6833]35#endif
[0e6ecf3]36
37 SDL_Window* window;
[cb6fabb]38
39 private:
40 // SDL_Window* window;
[a6f6833]41 int windowWidth, windowHeight;
[cd1cb0f]42 const Uint8* keyState;
[d5f2b42]43
[c324d6a]44 string s_errorMessage;
[0e6ecf3]45};
46
47#endif // _GAME_GUI_SDL_H
Note: See TracBrowser for help on using the repository browser.