source: opengl-game/game-gui-glfw.hpp@ 5edbd58

feature/imgui-sdl points-test
Last change on this file since 5edbd58 was d8cb15e, checked in by Dmitry Portnoy <dmitry.portnoy@…>, 5 years ago

Implement GetError() in game-gui-glfw and start using game-gui-glfw in opengl-game to show a window

  • Property mode set to 100644
File size: 853 bytes
RevLine 
[0e6ecf3]1#ifndef _GAME_GUI_GLFW_H
2#define _GAME_GUI_GLFW_H
3
4#include "game-gui.hpp"
5
[4eb4d0a]6#ifdef GAMEGUI_INCLUDE_VULKAN
7 #define GLFW_INCLUDE_VULKAN
8#endif
9
[0e6ecf3]10#include <GLFW/glfw3.h>
11
12class GameGui_GLFW : public GameGui {
13 public:
[d8cb15e]14 string& GetError();
15
16 static string s_errorMessage; // Has to be public so that glfw_error_callback can access it
17
[0e6ecf3]18 bool Init();
19 void Shutdown();
20
21 void* CreateWindow(const string& title, unsigned int width, unsigned int height);
22 void DestroyWindow();
23
[4eb4d0a]24#ifdef GAMEGUI_INCLUDE_VULKAN
[0e6ecf3]25 bool CreateVulkanSurface(VkInstance instance, VkSurfaceKHR* surface);
[4eb4d0a]26#endif
27
[8667f76]28 vector<const char*> GetRequiredExtensions();
29 void GetWindowSize(int* width, int* height);
[0e6ecf3]30
31 private:
32 GLFWwindow* window;
33};
34
[d8cb15e]35void glfw_error_callback(int error, const char* description);
36
[0e6ecf3]37#endif // _GAME_GUI_GLFW_H
Note: See TracBrowser for help on using the repository browser.