What a graphics backend asks of the window it draws into: the window's one tie to an API.
More...
#include <window_surface.h>
|
|
virtual void | hint () const =0 |
| | Ask GLFW for this surface, after glfwInit and before the window is created.
|
| virtual std::string | describe () const =0 |
| | What hint() asks for, for a log line when the window cannot be made.
|
| virtual void | attach (GLFWwindow *window)=0 |
| | Take the window it was hinted for and load the API on it, with vsync off.
|
| virtual void | present (GLFWwindow *window)=0 |
| | Show the frame drawn into window.
|
| virtual void | setVSync (GLFWwindow *window, bool enabled)=0 |
| | Wait for the display's refresh before presenting, or not.
|
What a graphics backend asks of the window it draws into: the window's one tie to an API.
The window needs to know its surface before it exists - a context of some version, or none - and hands the window over once it does; presenting a frame and the swap interval are the API's too. A backend implements this beside its RenderBackend, and a host hands it to WindowManager::createWindow, so nothing in the engine names an API.
◆ describe()
| virtual std::string Vkm::Engine::WindowSurface::describe |
( |
| ) |
const |
|
pure virtual |
What hint() asks for, for a log line when the window cannot be made.
- Returns
- The API and version the hints ask for.
◆ attach()
| virtual void Vkm::Engine::WindowSurface::attach |
( |
GLFWwindow * | window | ) |
|
|
pure virtual |
Take the window it was hinted for and load the API on it, with vsync off.
- Parameters
-
- Exceptions
-
| std::runtime_error | when the API cannot be loaded on it. |
◆ present()
| virtual void Vkm::Engine::WindowSurface::present |
( |
GLFWwindow * | window | ) |
|
|
pure virtual |
Show the frame drawn into window.
- Parameters
-
◆ setVSync()
| virtual void Vkm::Engine::WindowSurface::setVSync |
( |
GLFWwindow * | window, |
|
|
bool | enabled ) |
|
pure virtual |
Wait for the display's refresh before presenting, or not.
- Parameters
-
| window | The window attach() took. |
| enabled | Whether to wait. |
The documentation for this class was generated from the following file: