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

Represents a singular renderable area. These can be used as textures, or blit to Displays to present to the user. More...

#include <Viewport.hpp>

Public Member Functions

 Viewport (unsigned short width, unsigned short height)
 
void Initialize ()
 Initializes the Viewport using its parameters.
 
void DeInitialize ()
 De-Initializes the Viewport. Must be called.
 

Static Public Member Functions

static Viewport CreateViewport (unsigned short width, unsigned short height)
 

Public Attributes

unsigned short width
 The width of the viewport.
 
unsigned short height
 The height of the viewport.
 
PlatformViewport platformViewport
 Platform data.
 
Texture texture
 The contained Texture of the viewport. May be used as a resource elsewhere.
 

Static Public Attributes

static std::vector< ViewportViewports = std::vector<Viewport>()
 A list of all existing viewports.
 

Detailed Description

Represents a singular renderable area. These can be used as textures, or blit to Displays to present to the user.

Constructor & Destructor Documentation

◆ Viewport()

TeaPacket::Graphics::Viewport::Viewport ( unsigned short width,
unsigned short height )

Creates a Viewport, but does not Initialize it.

Parameters
widthThe width of the Viewport.
heightThe height of the Viewport

Member Function Documentation

◆ CreateViewport()

static Viewport TeaPacket::Graphics::Viewport::CreateViewport ( unsigned short width,
unsigned short height )
static

Creates and initializes a Viewport

Parameters
widthThe width of the Viewport to be created.
heightThe height of the Viewport to be created.
Returns
The Viewport that was created.

◆ DeInitialize()

void TeaPacket::Graphics::Viewport::DeInitialize ( )

De-Initializes the Viewport. Must be called.

◆ Initialize()

void TeaPacket::Graphics::Viewport::Initialize ( )

Initializes the Viewport using its parameters.

Member Data Documentation

◆ height

unsigned short TeaPacket::Graphics::Viewport::height

The height of the viewport.

◆ platformViewport

PlatformViewport TeaPacket::Graphics::Viewport::platformViewport

Platform data.

◆ texture

Texture TeaPacket::Graphics::Viewport::texture

The contained Texture of the viewport. May be used as a resource elsewhere.

◆ Viewports

std::vector<Viewport> TeaPacket::Graphics::Viewport::Viewports = std::vector<Viewport>()
inlinestatic

A list of all existing viewports.

◆ width

unsigned short TeaPacket::Graphics::Viewport::width

The width of the viewport.


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