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

Functionality relating to drawing graphics to the screen. More...

Classes

class  Display
 Represents a singular viewable area. More...
 
class  Model
 Represents a piece of render-able geometry. More...
 
class  Shader
 A combined shader (or program) in the rendering pipeline. Used to interpret and render Model data. More...
 
struct  ShaderVariable
 
struct  ShaderVariableType
 Represents a variable within a shader. More...
 
union  ShaderVariableValue
 
class  Texture
 
class  Viewport
 Represents a singular renderable area. These can be used as textures, or blit to Displays to present to the user. More...
 

Enumerations

enum  ShaderVariableBaseType : unsigned char { SHADER_VAR_TYPE_FLOAT , SHADER_VAR_TYPE_INT , SHADER_VAR_TYPE_UINT , SHADER_VAR_TYPE_TEXTURE }
 Type for Vertex Attributes. More...
 
enum  TextureFilterType : unsigned char { TEXTURE_FILTER_POINT , TEXTURE_FILTER_LINEAR }
 
enum  TextureWrapType : unsigned char { TEXTURE_WRAP_REPEAT , TEXTURE_WRAP_MIRROR , TEXTURE_WRAP_CLAMP }
 
enum  TextureFormat : unsigned short { TEXTURE_FORMAT_RGBA8 , TEXTURE_FORMAT_RGB8 }
 

Functions

bool Initialize ()
 Initializes any Graphics related systems.
 
void DeInitialize ()
 Deinitializes all Graphics related systems.
 
void SetRenderTarget (Viewport &viewport)
 Begins rendering to a specified Interface::Display.
 
void SetRenderTarget (Display &display)
 Sets the active viewport to the viewport contained within a display.
 
void FinishRenderTarget ()
 Concludes rendering to the current Interface::Display.
 
void ClearScreen (const Color4 &color)
 Clears the active Display with a color.
 

Variables

bool initialized = false
 Whether all Interface functionality has been initialized.
 
ViewportcurrentViewport = nullptr
 The current Interface::Display being rendered to.
 

Detailed Description

Functionality relating to drawing graphics to the screen.

Enumeration Type Documentation

◆ ShaderVariableBaseType

Type for Vertex Attributes.

Enumerator
SHADER_VAR_TYPE_FLOAT 

Single-precision float.

SHADER_VAR_TYPE_INT 

Signed Integer.

SHADER_VAR_TYPE_UINT 

Unsigned Integer.

SHADER_VAR_TYPE_TEXTURE 

Texture/Sampler.

◆ TextureFilterType

Enumerator
TEXTURE_FILTER_POINT 
TEXTURE_FILTER_LINEAR 

◆ TextureFormat

enum TeaPacket::Graphics::TextureFormat : unsigned short
Enumerator
TEXTURE_FORMAT_RGBA8 
TEXTURE_FORMAT_RGB8 

◆ TextureWrapType

Enumerator
TEXTURE_WRAP_REPEAT 
TEXTURE_WRAP_MIRROR 
TEXTURE_WRAP_CLAMP 

Function Documentation

◆ ClearScreen()

void TeaPacket::Graphics::ClearScreen ( const Color4 & color)

Clears the active Display with a color.

◆ DeInitialize()

void TeaPacket::Graphics::DeInitialize ( )

Deinitializes all Graphics related systems.

◆ FinishRenderTarget()

void TeaPacket::Graphics::FinishRenderTarget ( )

Concludes rendering to the current Interface::Display.

◆ Initialize()

bool TeaPacket::Graphics::Initialize ( )

Initializes any Graphics related systems.

◆ SetRenderTarget() [1/2]

void TeaPacket::Graphics::SetRenderTarget ( Display & display)

Sets the active viewport to the viewport contained within a display.

◆ SetRenderTarget() [2/2]

void TeaPacket::Graphics::SetRenderTarget ( Viewport & viewport)

Begins rendering to a specified Interface::Display.

Sets the active viewport to be rendered to. Must always be followed by a call to FinishRenderToDisplay()

Variable Documentation

◆ currentViewport

Viewport* TeaPacket::Graphics::currentViewport = nullptr
inline

The current Interface::Display being rendered to.

Will be nullptr when no Interface::Display is being rendered to.

◆ initialized

bool TeaPacket::Graphics::initialized = false
inline

Whether all Interface functionality has been initialized.