SimpleGL  1.1.0
A framework for platform independent rendering
Public Member Functions | List of all members
sgl::WindowVK Class Reference

This class provides a GLFW window with a Vulkan instance. More...

#include <glfw_window_vk.hpp>

Inheritance diagram for sgl::WindowVK:
sgl::Window

Public Member Functions

 WindowVK (int width, int height, std::string title)
 Creates a new window with the specified parameters. More...
 
 ~WindowVK (void)
 Destroys the window. More...
 
void swapBuffers () override
 Swaps the framebuffers of this window. More...
 
- Public Member Functions inherited from sgl::Window
 ~Window (void)
 Destroys the window. More...
 
GLFWwindow * getHandle ()
 Returns the handle of the window. More...
 
int getWidth ()
 Returns the width of the drawing area. More...
 
void setWidth (int width)
 Sets the width of the drawing area. More...
 
int getHeight ()
 Returns the height of the drawing area. More...
 
void setHeight (int height)
 Sets the height of the drawing area. More...
 
glm::ivec2 getSize ()
 Returns the size of the drawing area. More...
 
void setSize (glm::ivec2 size)
 Sets the size of the drawing area. More...
 
std::string getTitle ()
 Returns the window title. More...
 
void setTitle (std::string title)
 Sets this windows title. More...
 
void showInfoTitle ()
 Shows informations in the title. More...
 
void centerWindow ()
 Centers the window on the primary screen. More...
 
void setKeyCallback (KeyCallback *callback)
 Set the key callback. More...
 
void setMouseButtonCallback (MouseButtonCallback *callback)
 Set the mouse button callback. More...
 
void update ()
 Convenience method to swap buffers and poll events in one call. More...
 
bool shouldClose ()
 Checks the close flag for the window. More...
 
void sync (int fps)
 Syncs the window framerate to specified FPS. More...
 
glm::dvec2 getCursorPos ()
 Gets the cursor position. More...
 
double getCursorX ()
 Gets the cursor's X-position. More...
 
double getCursorY ()
 Gets the cursor's Y-position. More...
 

Additional Inherited Members

- Protected Member Functions inherited from sgl::Window
 Window (void)
 Initializes a new window. More...
 
- Protected Attributes inherited from sgl::Window
GLFWwindow * handle
 The handle for the GLFW window. More...
 
glm::ivec2 size
 The size of the drawing area. More...
 
std::string title
 The title for the GLFW window. More...
 

Detailed Description

This class provides a GLFW window with a Vulkan instance.

Definition at line 29 of file glfw_window_vk.hpp.

Constructor & Destructor Documentation

sgl::WindowVK::WindowVK ( int  width,
int  height,
std::string  title 
)

Creates a new window with the specified parameters.

Parameters
widthThe width of the window.
heightThe height of the window.
titleThe title of the window.

Definition at line 22 of file glfw_window_vk.cpp.

sgl::WindowVK::~WindowVK ( void  )

Destroys the window.

Definition at line 69 of file glfw_window_vk.cpp.

Member Function Documentation

void sgl::WindowVK::swapBuffers ( )
overridevirtual

Swaps the framebuffers of this window.

Implements sgl::Window.

Definition at line 77 of file glfw_window_vk.cpp.


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