Provides an abstract interface for window implementations.
More...
#include <Window.h>
|
| void | mousePositionCallback (double xpos, double ypos) |
| |
| void | mouseScrollCallback (double xoffset, double yoffset) |
| |
|
void | mouseButtonPressedCallback (bool left_pressed, bool right_pressed, bool middle_pressed) |
| | Callback which gets the current status of mouse buttons.
|
| |
|
void | keyboardButtonPressedCallback (int scancode, const KeyboardInput::KeyInfo &key_info) |
| |
|
|
uint32_t | width |
| | The current width of the window.
|
| |
|
uint32_t | height |
| | The current height of the window.
|
| |
|
uint32_t | framebuffer_width |
| | The width of the window's framebuffer.
|
| |
|
uint32_t | framebuffer_height |
| | The height of the window's framebuffer.
|
| |
|
std::string | title |
| | The title of the window.
|
| |
|
bool | full_screen |
| | Whether or not the window is set to full screen.
|
| |
| bool | size_changed |
| |
|
std::shared_ptr< MouseInput > | mouse_input |
| | The MouseInput instance connected to this Window.
|
| |
|
std::shared_ptr< KeyboardInput > | keyboard_input |
| | The KeyboardInput instance connect to this Window.
|
| |
Provides an abstract interface for window implementations.
◆ Window()
| VulkanEngine::Window::Window |
( |
uint32_t |
_width, |
|
|
uint32_t |
_height, |
|
|
const std::string & |
_title, |
|
|
bool |
_full_screen |
|
) |
| |
Contructor.
- Parameters
-
| _width | The desired initial width of the window. |
| _height | The desired initial height of the window. |
| _title | The title of the window. |
| _full_screen | If true the window will be initialized to full screen. |
◆ getFramebufferHeight()
| uint32_t VulkanEngine::Window::getFramebufferHeight |
( |
| ) |
const |
- Returns
- The width of the window's framebuffer.
◆ getFramebufferWidth()
| uint32_t VulkanEngine::Window::getFramebufferWidth |
( |
| ) |
const |
- Returns
- The width of the window's framebuffer.
◆ getHeight()
| uint32_t VulkanEngine::Window::getHeight |
( |
| ) |
const |
- Returns
- The height of the window.
◆ getRequiredVulkanInstanceExtensions()
| virtual const std::vector< const char * > VulkanEngine::Window::getRequiredVulkanInstanceExtensions |
( |
| ) |
const |
|
pure virtual |
- Returns
- A list of vulkan extensions required by the underlying windowing system.
Implemented in VulkanEngine::GLFWWindow.
◆ getTitle()
| const std::string & VulkanEngine::Window::getTitle |
( |
| ) |
const |
- Returns
- The window's title.
◆ getVkSurface()
| virtual vk::SurfaceKHR VulkanEngine::Window::getVkSurface |
( |
| ) |
|
|
pure virtual |
Create and return a vk::SurfaceKHR instance.
- Parameters
-
| instance | The vk::Instance to create the surface for. |
- Returns
- The created vk::SurfaceKHR.
Implemented in VulkanEngine::GLFWWindow.
◆ getWidth()
| uint32_t VulkanEngine::Window::getWidth |
( |
| ) |
const |
- Returns
- The width of the window.
◆ initialize()
| virtual bool VulkanEngine::Window::initialize |
( |
bool |
invisible = false | ) |
|
|
pure virtual |
◆ isFullScreen()
| bool VulkanEngine::Window::isFullScreen |
( |
| ) |
const |
- Returns
- True if the window is in full screen mode.
◆ mousePositionCallback()
| void VulkanEngine::Window::mousePositionCallback |
( |
double |
xpos, |
|
|
double |
ypos |
|
) |
| |
|
protected |
Callback which sets the current position of the mouse
- Parameters
-
| xpos | The x position of the mouse |
| ypos | The y position of the mouse |
◆ mouseScrollCallback()
| void VulkanEngine::Window::mouseScrollCallback |
( |
double |
xoffset, |
|
|
double |
yoffset |
|
) |
| |
|
protected |
Callback which sets the current scroll offset of the mouse
- Parameters
-
| xoffset | The scroll offset along x |
| yoffset | The scroll offset along y |
◆ setHeight()
| void VulkanEngine::Window::setHeight |
( |
uint32_t |
_height | ) |
|
|
virtual |
◆ setTitle()
| void VulkanEngine::Window::setTitle |
( |
const std::string & |
new_title | ) |
|
|
virtual |
◆ setWidth()
| void VulkanEngine::Window::setWidth |
( |
uint32_t |
_width | ) |
|
|
virtual |
◆ shouldClose()
| virtual bool VulkanEngine::Window::shouldClose |
( |
| ) |
|
|
pure virtual |
◆ sizeHasChanged()
| bool VulkanEngine::Window::sizeHasChanged |
( |
| ) |
const |
- Returns
- True if the size has changed.
◆ update()
| virtual void VulkanEngine::Window::update |
( |
| ) |
|
|
pure virtual |
◆ size_changed
| bool VulkanEngine::Window::size_changed |
|
protected |
If true the window or framebuffer size has changed. Reset when calling sizeHasChanged().
The documentation for this class was generated from the following files:
- include/VulkanEngine/Window.h
- src/Window.cpp