A window that the game can be drawn to.
More...
#include <renderWindow.h>
A window that the game can be drawn to.
- Author
- Thomas Montano
- Date
- April 20 2020
◆ RenderWindow()
rune::RenderWindow::RenderWindow |
( |
int |
newWidth, |
|
|
int |
newHeight, |
|
|
std::string const & |
title |
|
) |
| |
Default constructor to give an openGL context and window.
- Parameters
-
newWidth | The width of the window in pixels to be created. |
newHeight | The height of the window in pixels to be created. |
title | The title of the window to be displayed at the top. |
◆ clear()
void rune::RenderWindow::clear |
( |
rune::Color |
clearColor | ) |
|
Clear the entire screen with a single color.
- Parameters
-
clearColor | The color that the screen should be cleared with. |
◆ draw()
void rune::RenderWindow::draw |
( |
Drawable & |
drawObject | ) |
|
Renders a drawable to the screen.
- Parameters
-
drawObject | Drawable that should be displayed on the screen. |
◆ enableVsync()
void rune::RenderWindow::enableVsync |
( |
bool |
enable | ) |
|
Enables or disables Vsync.
- Parameters
-
enable | Whether or not Vsync should be turned on. |
◆ GetGLWindow()
GLFWwindow * rune::RenderWindow::GetGLWindow |
( |
| ) |
|
Return a pointer to the OpenGL window.
- Returns
- A pointer for the GLFW window.
◆ getSize()
◆ isOpen()
bool rune::RenderWindow::isOpen |
( |
void |
| ) |
|
Tell whether or not the window is open.
- Returns
- Whether or not the RenderWindow is currently open.
◆ setWindowTitle()
void rune::RenderWindow::setWindowTitle |
( |
std::string const & |
newTitle | ) |
|
Set the window title.
- Parameters
-
newTitle | The title that should be displayed on the window. |
The documentation for this class was generated from the following files: