vengine  0.0.1
3D graphics engine
Loading...
Searching...
No Matches
ven::Window Class Reference

Class for window. More...

#include <Window.hpp>

+ Collaboration diagram for ven::Window:

Public Member Functions

 Window (const uint32_t width=DEFAULT_WIDTH, const uint32_t height=DEFAULT_HEIGHT)
 
 ~Window ()
 
 Window (const Window &)=delete
 
Windowoperator= (const Window &)=delete
 
 Window (Window &&)=delete
 
Windowoperator= (Window &&)=delete
 
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 ()
 
void setFullscreen (bool fullscreen, uint32_t width, uint32_t height)
 
void setWindowIcon (const std::string &path)
 

Static Private Member Functions

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

Private Attributes

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

Detailed Description

Class for window.

Definition at line 26 of file Window.hpp.

Constructor & Destructor Documentation

◆ Window() [1/3]

ven::Window::Window ( const uint32_t width = DEFAULT_WIDTH,
const uint32_t height = DEFAULT_HEIGHT )
inlineexplicit

Definition at line 30 of file Window.hpp.

References setWindowIcon().

+ Here is the call graph for this function:

◆ ~Window()

ven::Window::~Window ( )
inline

Definition at line 31 of file Window.hpp.

References m_window.

◆ Window() [2/3]

ven::Window::Window ( const Window & )
delete

◆ Window() [3/3]

ven::Window::Window ( Window && )
delete

Member Function Documentation

◆ createWindow()

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

Definition at line 8 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 27 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 34 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 43 of file Window.hpp.

References m_height, and m_width.

Referenced by ven::Gui::rendererSection().

+ Here is the caller graph for this function:

◆ getGLFWindow()

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

Definition at line 41 of file Window.hpp.

References m_window.

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

+ Here is the caller graph for this function:

◆ operator=() [1/2]

Window & ven::Window::operator= ( const Window & )
delete

◆ operator=() [2/2]

Window & ven::Window::operator= ( Window && )
delete

◆ resetWindowResizedFlag()

void ven::Window::resetWindowResizedFlag ( )
inline

Definition at line 45 of file Window.hpp.

References m_framebufferResized.

◆ setFullscreen()

void ven::Window::setFullscreen ( bool fullscreen,
uint32_t width,
uint32_t height )

Definition at line 42 of file window.cpp.

Referenced by ven::Gui::rendererSection().

+ Here is the caller graph for this function:

◆ setWindowIcon()

void ven::Window::setWindowIcon ( const std::string & path)

Definition at line 62 of file window.cpp.

Referenced by Window().

+ Here is the caller graph for this function:

◆ wasWindowResized()

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

Definition at line 44 of file Window.hpp.

References m_framebufferResized.

Member Data Documentation

◆ m_framebufferResized

bool ven::Window::m_framebufferResized = false
private

Definition at line 58 of file Window.hpp.

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

◆ m_height

uint32_t ven::Window::m_height {0}
private

Definition at line 56 of file Window.hpp.

Referenced by getExtent().

◆ m_width

uint32_t ven::Window::m_width {0}
private

Definition at line 55 of file Window.hpp.

Referenced by getExtent().

◆ m_window

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

Definition at line 54 of file Window.hpp.

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


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