TeaPacket v0.0.1
Multiplatform Game Engine
Loading...
Searching...
No Matches
TeaPacket::Graphics::Display Class Reference

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 DisplayRegisterDisplay (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< DisplayDisplays = std::vector<Display>()
 A list of all displays in existence. Displays MUST be registered to this list upon creation.
 

Detailed Description

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.

Member Function Documentation

◆ DeInitialize()

void TeaPacket::Graphics::Display::DeInitialize ( )

De-initializes the Display and its graphics.

◆ PresentDisplay()

void TeaPacket::Graphics::Display::PresentDisplay ( )

Present and update all changes made to the contained Viewport (via rendering).

◆ RegisterDisplay()

static Display * TeaPacket::Graphics::Display::RegisterDisplay ( unsigned short width = 0,
unsigned short height = 0,
const std::string & name = "Window" )
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

Parameters
widthThe width of the display. Only matters on desktop platforms.
heightThe height of the display. Only matters on desktop platforms.
nameThe name of the display. Only matters on desktop platforms.
Returns
The Display that was created. Will be nullptr if creating a display isn't possible.

◆ Resize()

bool TeaPacket::Graphics::Display::Resize ( unsigned short newWidth,
unsigned short newHeight )

Member Data Documentation

◆ Displays

std::vector<Display> TeaPacket::Graphics::Display::Displays = std::vector<Display>()
inlinestatic

A list of all displays in existence. Displays MUST be registered to this list upon creation.

◆ height

unsigned short TeaPacket::Graphics::Display::height

Height of the Display in pixels.

◆ name

std::string TeaPacket::Graphics::Display::name

Name of the display. Will be shown to the user on platforms that allow.

◆ platformDisplay

PlatformDisplay TeaPacket::Graphics::Display::platformDisplay

Private platform-dependent data.

◆ viewport

Viewport TeaPacket::Graphics::Display::viewport

The contained viewport of the Display. Render to the viewport to render to the Display.

◆ width

unsigned short TeaPacket::Graphics::Display::width

Width of the Display in pixels.


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