TeaPacket v0.0.1
Multiplatform Game Engine
|
Represents a singular viewable area. More...
#include <Display.hpp>
Public Member Functions | |
bool | Resize (unsigned short newWidth, unsigned short newHeight) |
void | PresentDisplay () |
Present and update all changes made to the contained Viewport (via rendering). | |
void | DeInitialize () |
De-initializes the Display and its graphics. | |
Static Public Member Functions | |
static Display * | RegisterDisplay (unsigned short width=0, unsigned short height=0, const std::string &name="Window") |
Registers a new display. | |
Public Attributes | |
unsigned short | width |
Width of the Display in pixels. | |
unsigned short | height |
Height of the Display in pixels. | |
std::string | name |
Name of the display. Will be shown to the user on platforms that allow. | |
Viewport | viewport |
The contained viewport of the Display. Render to the viewport to render to the Display. | |
PlatformDisplay | platformDisplay |
Private platform-dependent data. | |
Static Public Attributes | |
static std::vector< Display > | Displays = std::vector<Display>() |
A list of all displays in existence. Displays MUST be registered to this list upon creation. | |
Represents a singular viewable area.
On Desktop platforms, there can be any number of displays, each representing one Window on the OS.
On non-desktop platforms, this is typically only one display representing the screen.
Some specific platforms may have a fixed number that is more than 1, if the system has, for example, a second screen.
void TeaPacket::Graphics::Display::DeInitialize | ( | ) |
De-initializes the Display and its graphics.
void TeaPacket::Graphics::Display::PresentDisplay | ( | ) |
Present and update all changes made to the contained Viewport (via rendering).
|
static |
Registers a new display.
Has different effects depending on the platform.
On desktop platforms, this will create a new window.
On platforms with multiple screens, this must be called to utilize them. (Ex. on Wii U, this must be called to register the Gamepad screen.)
On any other platforms, it will return nullptr
width | The width of the display. Only matters on desktop platforms. |
height | The height of the display. Only matters on desktop platforms. |
name | The name of the display. Only matters on desktop platforms. |
bool TeaPacket::Graphics::Display::Resize | ( | unsigned short | newWidth, |
unsigned short | newHeight ) |
A list of all displays in existence. Displays MUST be registered to this list upon creation.
unsigned short TeaPacket::Graphics::Display::height |
Height of the Display in pixels.
std::string TeaPacket::Graphics::Display::name |
Name of the display. Will be shown to the user on platforms that allow.
PlatformDisplay TeaPacket::Graphics::Display::platformDisplay |
Private platform-dependent data.
Viewport TeaPacket::Graphics::Display::viewport |
unsigned short TeaPacket::Graphics::Display::width |
Width of the Display in pixels.