Represent an OS window and its associated rendering context.
More...
#include <Window.hpp>
|
|
RenderingConfig & | _config |
| | The window configuration.
|
| |
|
GLFWwindow * | _window = nullptr |
| | Internal window handle.
|
| |
|
std::unique_ptr< Swapchain > | _swapchain |
| | The swapchain displaying backbuffers.
|
| |
|
ImGui_ImplVulkan_InitInfo * | _imgui = nullptr |
| | ImGui setup information.
|
| |
|
bool | _frameStarted = false |
| | Has a frame been started.
|
| |
|
bool | _allowEscape = false |
| | Can the window be closed by pressing escape.
|
| |
Represent an OS window and its associated rendering context.
◆ Action
System actions that can be executed by the window.
| Enumerator |
|---|
| None | Do nothing.
|
| Quit | Quit the application.
|
| Fullscreen | Switch the window from/to fullscreen mode.
|
| Vsync | Switch the v-sync on/off.
|
◆ Window() [1/3]
| Window::Window |
( |
const std::string & |
name, |
|
|
RenderingConfig & |
config, |
|
|
bool |
escapeQuit = true, |
|
|
bool |
hidden = false |
|
) |
| |
Create a new window backed by a GPU context.
- Parameters
-
| name | the name of the window |
| config | the configuration to use (additional info will be added to it) |
| escapeQuit | allows the user to close the window by pressing escape |
| hidden | should the window be hidden (for preprocess for instance) |
- Note
- We might want to impose the configured size here. This means the monitor could be set in a non-native mode.
◆ Window() [2/3]
| Window::Window |
( |
const Window & |
| ) |
|
|
delete |
◆ Window() [3/3]
◆ ~Window()
Destructor. Clean resources, delete the window and its context.
◆ color()
- Returns
- the backbuffer color texture
◆ nextFrame()
| bool Window::nextFrame |
( |
| ) |
|
Start registering GUI items.
- Returns
- true if the next frame is valid.
- Note
- If the frame is invalid, the window should be cleaned and closed.
◆ operator=() [1/2]
Copy assignment.
- Returns
- a reference to the object assigned to
◆ operator=() [2/2]
Move assignment.
- Returns
- a reference to the object assigned to
◆ perform()
| void Window::perform |
( |
Action |
action | ) |
|
Execute an action related to the windowing system.
- Parameters
-
| action | the system action to perform |
◆ setupImGui()
| void Window::setupImGui |
( |
| ) |
|
|
private |
Setup ImGui with the proper callbacks and style.
◆ setViewport()
| void Window::setViewport |
( |
| ) |
|
Set the viewport to the window dimensions
The documentation for this class was generated from the following files:
- src/engine/system/Window.hpp
- src/engine/system/Window.cpp