|
SimpleGL
1.1.0
A framework for platform independent rendering
|
This class provides a GLFW window with OpenGL context. More...
#include <glfw_window_gl.hpp>
Public Member Functions | |
| WindowGL (int width, int height, std::string title, bool vsync=false) | |
| Creates a new window with the specified parameters. More... | |
| void | setVSync (bool vsync) |
| Enables or disables vertical synchronization. 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... | |
This class provides a GLFW window with OpenGL context.
Definition at line 24 of file glfw_window_gl.hpp.
| sgl::WindowGL::WindowGL | ( | int | width, |
| int | height, | ||
| std::string | title, | ||
| bool | vsync = false |
||
| ) |
Creates a new window with the specified parameters.
By default vertical synchronization is disabled.
| width | The width of the window. |
| height | The height of the window. |
| title | The title of the window. |
| vsync | Set this to true, if you want to have vertical synchronization enabled. |
Definition at line 22 of file glfw_window_gl.cpp.
| void sgl::WindowGL::setVSync | ( | bool | vsync | ) |
Enables or disables vertical synchronization.
| vsync | Set this to true, if you want to have vertical synchronization enabled. |
Definition at line 67 of file glfw_window_gl.cpp.
|
overridevirtual |
Swaps the framebuffers of this window.
Implements sgl::Window.
Definition at line 75 of file glfw_window_gl.cpp.
1.8.11