vengine  0.1.0
3D graphics engine made with Vulkan
Loading...
Searching...
No Matches
ven::Window Class Reference

#include <Window.hpp>

+ Collaboration diagram for ven::Window:

Public Member Functions

 Window (const uint32_t width, const uint32_t height, const std::string &title)
 
 ~Window ()
 
GLFWwindow * createWindow (uint32_t width, uint32_t height, const std::string &title)
 
void createWindowSurface (VkInstance instance, VkSurfaceKHR *surface) const
 
GLFWwindow * getGLFWindow () const
 
VkExtent2D getExtent () const
 
bool wasWindowResized () const
 
void resetWindowResizedFlag ()
 

Static Private Member Functions

static void framebufferResizeCallback (GLFWwindow *window, int width, int height)
 

Private Attributes

GLFWwindow * m_window {nullptr}
 
uint32_t m_width
 
uint32_t m_height
 
bool m_framebufferResized = false
 

Detailed Description

Definition at line 17 of file Window.hpp.

Constructor & Destructor Documentation

◆ Window()

ven::Window::Window ( const uint32_t width,
const uint32_t height,
const std::string & title )
inline

Definition at line 21 of file Window.hpp.

◆ ~Window()

ven::Window::~Window ( )
inline

Definition at line 22 of file Window.hpp.

References m_window.

Member Function Documentation

◆ createWindow()

GLFWwindow * ven::Window::createWindow ( uint32_t width,
uint32_t height,
const std::string & title )
nodiscard

Definition at line 5 of file window.cpp.

References framebufferResizeCallback().

+ Here is the call graph for this function:

◆ createWindowSurface()

void ven::Window::createWindowSurface ( VkInstance instance,
VkSurfaceKHR * surface ) const

Definition at line 24 of file window.cpp.

Referenced by ven::Device::createSurface().

+ Here is the caller graph for this function:

◆ framebufferResizeCallback()

void ven::Window::framebufferResizeCallback ( GLFWwindow * window,
int width,
int height )
staticprivate

Definition at line 31 of file window.cpp.

References m_framebufferResized.

Referenced by createWindow().

+ Here is the caller graph for this function:

◆ getExtent()

VkExtent2D ven::Window::getExtent ( ) const
inlinenodiscard

Definition at line 29 of file Window.hpp.

References m_height, and m_width.

◆ getGLFWindow()

GLFWwindow * ven::Window::getGLFWindow ( ) const
inlinenodiscard

Definition at line 27 of file Window.hpp.

References m_window.

Referenced by ven::Engine::createSurface().

+ Here is the caller graph for this function:

◆ resetWindowResizedFlag()

void ven::Window::resetWindowResizedFlag ( )
inline

Definition at line 31 of file Window.hpp.

References m_framebufferResized.

◆ wasWindowResized()

bool ven::Window::wasWindowResized ( ) const
inlinenodiscard

Definition at line 30 of file Window.hpp.

References m_framebufferResized.

Member Data Documentation

◆ m_framebufferResized

bool ven::Window::m_framebufferResized = false
private

Definition at line 41 of file Window.hpp.

Referenced by framebufferResizeCallback(), resetWindowResizedFlag(), and wasWindowResized().

◆ m_height

uint32_t ven::Window::m_height
private

Definition at line 39 of file Window.hpp.

Referenced by getExtent().

◆ m_width

uint32_t ven::Window::m_width
private

Definition at line 38 of file Window.hpp.

Referenced by getExtent().

◆ m_window

GLFWwindow* ven::Window::m_window {nullptr}
private

Definition at line 37 of file Window.hpp.

Referenced by getGLFWindow(), and ~Window().


The documentation for this class was generated from the following files: