TDME2 1.9.121
Public Member Functions | Private Attributes | List of all members
Texture2DRenderShader Class Referencefinal

Texture 2D render shader. More...

#include <tdme/engine/subsystems/texture2D/Texture2DRenderShader.h>

Collaboration diagram for Texture2DRenderShader:
Collaboration graph

Public Member Functions

 Texture2DRenderShader (Renderer *renderer)
 Public constructor. More...
 
 ~Texture2DRenderShader ()
 Public destructor. More...
 
bool isInitialized ()
 
void initialize ()
 Initialize. More...
 
void useProgram ()
 Use render program. More...
 
void unUseProgram ()
 Un use render program. More...
 
void renderTexture (Engine *engine, const Vector2 &position, const Vector2 &dimension, int textureId, int width=-1, int height=-1)
 Render texture. More...
 

Private Attributes

Rendererrenderer { nullptr }
 
int32_t vertexShaderId { -1 }
 
int32_t fragmentShaderId { -1 }
 
int32_t programId { -1 }
 
int32_t uniformTextureUnit { -1 }
 
int32_t vboVertices { -1 }
 
int32_t vboTextureCoordinates {-1 }
 
bool initialized
 
bool isRunning
 

Detailed Description

Texture 2D render shader.

Author
Andreas Drewke
Version
$Id$

Definition at line 19 of file Texture2DRenderShader.h.

Constructor & Destructor Documentation

◆ Texture2DRenderShader()

Public constructor.

Parameters
rendererrenderer

Definition at line 22 of file Texture2DRenderShader.cpp.

◆ ~Texture2DRenderShader()

Public destructor.

Definition at line 29 of file Texture2DRenderShader.cpp.

Member Function Documentation

◆ initialize()

void initialize ( )

Initialize.

Definition at line 39 of file Texture2DRenderShader.cpp.

◆ isInitialized()

bool isInitialized ( )
Returns
if initialized and ready to use

Definition at line 34 of file Texture2DRenderShader.cpp.

◆ renderTexture()

void renderTexture ( Engine engine,
const Vector2 position,
const Vector2 dimension,
int  textureId,
int  width = -1,
int  height = -1 
)

Render texture.

Parameters
engineengine to use
position2D position on screen
dimension2D dimenson on screen
textureIdtexture id
widthoptional render target width
heightoptional render target height

Definition at line 93 of file Texture2DRenderShader.cpp.

◆ unUseProgram()

void unUseProgram ( )

Un use render program.

Definition at line 88 of file Texture2DRenderShader.cpp.

◆ useProgram()

void useProgram ( )

Use render program.

Definition at line 79 of file Texture2DRenderShader.cpp.

Member Data Documentation

◆ fragmentShaderId

int32_t fragmentShaderId { -1 }
private

Definition at line 25 of file Texture2DRenderShader.h.

◆ initialized

bool initialized
private

Definition at line 30 of file Texture2DRenderShader.h.

◆ isRunning

bool isRunning
private

Definition at line 31 of file Texture2DRenderShader.h.

◆ programId

int32_t programId { -1 }
private

Definition at line 26 of file Texture2DRenderShader.h.

◆ renderer

Renderer* renderer { nullptr }
private

Definition at line 23 of file Texture2DRenderShader.h.

◆ uniformTextureUnit

int32_t uniformTextureUnit { -1 }
private

Definition at line 27 of file Texture2DRenderShader.h.

◆ vboTextureCoordinates

int32_t vboTextureCoordinates {-1 }
private

Definition at line 29 of file Texture2DRenderShader.h.

◆ vboVertices

int32_t vboVertices { -1 }
private

Definition at line 28 of file Texture2DRenderShader.h.

◆ vertexShaderId

int32_t vertexShaderId { -1 }
private

Definition at line 24 of file Texture2DRenderShader.h.


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