feature/imgui-sdl
points-test
|
Last change
on this file since 9546928 was d8cb15e, checked in by Dmitry Portnoy <dmitry.portnoy@…>, 6 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
|
| Line | |
|---|
| 1 | #ifndef _GAME_GUI_GLFW_H
|
|---|
| 2 | #define _GAME_GUI_GLFW_H
|
|---|
| 3 |
|
|---|
| 4 | #include "game-gui.hpp"
|
|---|
| 5 |
|
|---|
| 6 | #ifdef GAMEGUI_INCLUDE_VULKAN
|
|---|
| 7 | #define GLFW_INCLUDE_VULKAN
|
|---|
| 8 | #endif
|
|---|
| 9 |
|
|---|
| 10 | #include <GLFW/glfw3.h>
|
|---|
| 11 |
|
|---|
| 12 | class GameGui_GLFW : public GameGui {
|
|---|
| 13 | public:
|
|---|
| 14 | string& GetError();
|
|---|
| 15 |
|
|---|
| 16 | static string s_errorMessage; // Has to be public so that glfw_error_callback can access it
|
|---|
| 17 |
|
|---|
| 18 | bool Init();
|
|---|
| 19 | void Shutdown();
|
|---|
| 20 |
|
|---|
| 21 | void* CreateWindow(const string& title, unsigned int width, unsigned int height);
|
|---|
| 22 | void DestroyWindow();
|
|---|
| 23 |
|
|---|
| 24 | #ifdef GAMEGUI_INCLUDE_VULKAN
|
|---|
| 25 | bool CreateVulkanSurface(VkInstance instance, VkSurfaceKHR* surface);
|
|---|
| 26 | #endif
|
|---|
| 27 |
|
|---|
| 28 | vector<const char*> GetRequiredExtensions();
|
|---|
| 29 | void GetWindowSize(int* width, int* height);
|
|---|
| 30 |
|
|---|
| 31 | private:
|
|---|
| 32 | GLFWwindow* window;
|
|---|
| 33 | };
|
|---|
| 34 |
|
|---|
| 35 | void glfw_error_callback(int error, const char* description);
|
|---|
| 36 |
|
|---|
| 37 | #endif // _GAME_GUI_GLFW_H
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.