A interface for rendering. Includes both top and bottoms screens as targets.
More...
#include <RenderWindow.hpp>
|
| void | InitPrintScreen (SCREEN screen) |
| | Initializes a screen to use for printing. Note that if a screen is initialized for printing and then rendered to, it will render garbage.
|
| |
| void | print (std::string str, int x, int y) |
| | Prints text to the screen. A screen must be initialized using RenderWindow::InitPrintScreen for this to work.
|
| |
| void | clear (SCREEN screen, Color color=dl::Color(0, 0, 0)) |
| | Clears a screen and prepares it for rendering. Note that RenderWindow::draw and RenderWindow::display will target the screen last cleared.
|
| |
| void | draw (dl::Drawable &drawable) |
| | Draws a drawable to the screen.
|
| |
|
void | display () |
| | Displays rendered objects to the screen. Note that this will only display the objects drawn on the last cleared screen. Screens must be cleared, drawn to, and displayed separately.
|
| |
| bool | isOpen () |
| | A function that should be used as a main loop. It also handles the updating of input.
|
| |
| void | setView (const dl::View &view) |
| | Sets a view to the screen.
|
| |
| void | set3dActive (bool active) |
| | Determines whether the stereoscopic 3d effect should be active or not.
|
| |
| dl::Vector2f | getCurrentViewOffset () |
| | Gets the current render offset in pixels that the current view causes.
|
| |
A interface for rendering. Includes both top and bottoms screens as targets.
◆ clear()
| void dl::RenderWindow::clear |
( |
SCREEN | screen, |
|
|
Color | color = dl::Color(0,0,0) ) |
Clears a screen and prepares it for rendering. Note that RenderWindow::draw and RenderWindow::display will target the screen last cleared.
- Parameters
-
| screen | The screen to clear |
| color | The clear color |
◆ draw()
Draws a drawable to the screen.
- Parameters
-
| drawable | The drawable object to draw to the screen |
◆ getCurrentViewOffset()
Gets the current render offset in pixels that the current view causes.
- Returns
- The render offset in pixels that the current view causes
◆ InitPrintScreen()
| void dl::RenderWindow::InitPrintScreen |
( |
dl::SCREEN | screen | ) |
|
Initializes a screen to use for printing. Note that if a screen is initialized for printing and then rendered to, it will render garbage.
- Parameters
-
| screen | Screen to initizalize printing for |
◆ isOpen()
| bool dl::RenderWindow::isOpen |
( |
| ) |
|
A function that should be used as a main loop. It also handles the updating of input.
- Returns
- Whether the program is open or not.
◆ print()
| void dl::RenderWindow::print |
( |
std::string | str, |
|
|
int | x, |
|
|
int | y ) |
Prints text to the screen. A screen must be initialized using RenderWindow::InitPrintScreen for this to work.
- Parameters
-
| str | The string to print |
| x | X position of text |
| y | Y position of text |
◆ set3dActive()
| void dl::RenderWindow::set3dActive |
( |
bool | active | ) |
|
Determines whether the stereoscopic 3d effect should be active or not.
- Parameters
-
| active | Whether the effect is active |
◆ setView()
| void dl::RenderWindow::setView |
( |
const dl::View & | view | ) |
|
Sets a view to the screen.
- Parameters
-
The documentation for this class was generated from the following files: