ScummVM API documentation
OpenGL::ShaderPipeline Class Reference
Inheritance diagram for OpenGL::ShaderPipeline:
OpenGL::Pipeline OpenGL::CLUT8LookUpPipeline

Public Member Functions

 ShaderPipeline (Shader *shader)
 
void setColor (GLfloat r, GLfloat g, GLfloat b, GLfloat a) override
 
void setProjectionMatrix (const Math::Matrix4 &projectionMatrix) override
 
- Public Member Functions inherited from OpenGL::Pipeline
void activate ()
 
void deactivate ()
 
Framebuffer * setFramebuffer (Framebuffer *framebuffer)
 
virtual void setColor (GLfloat r, GLfloat g, GLfloat b, GLfloat a)=0
 
void drawTexture (const Texture &texture, const GLfloat *coordinates, const GLfloat *texcoords)
 
void drawTexture (const Texture &texture, const GLfloat *coordinates)
 
void drawTexture (const Texture &texture, GLfloat x, GLfloat y, GLfloat w, GLfloat h)
 
void drawTexture (const Texture &texture, GLfloat x, GLfloat y, GLfloat w, GLfloat h, const Common::Rect &clip)
 
virtual void setProjectionMatrix (const Math::Matrix4 &projectionMatrix)=0
 

Protected Member Functions

void activateInternal () override
 
void deactivateInternal () override
 
void drawTextureInternal (const Texture &texture, const GLfloat *coordinates, const GLfloat *texcoords) override
 
- Protected Member Functions inherited from OpenGL::Pipeline
virtual void activateInternal ()
 
virtual void deactivateInternal ()
 
virtual void drawTextureInternal (const Texture &texture, const GLfloat *coordinates, const GLfloat *texcoords)=0
 
bool isActive () const
 

Protected Attributes

GLuint _coordsVBO
 
GLuint _texcoordsVBO
 
GLuint _colorVBO
 
GLfloat _colorAttributes [4 *4]
 
bool _colorDirty
 
Shader *const _activeShader
 
- Protected Attributes inherited from OpenGL::Pipeline
Framebuffer * _activeFramebuffer
 

Additional Inherited Members

- Static Public Member Functions inherited from OpenGL::Pipeline
static void disable ()
 

Member Function Documentation

◆ setColor()

void OpenGL::ShaderPipeline::setColor ( GLfloat  r,
GLfloat  g,
GLfloat  b,
GLfloat  a 
)
overridevirtual

Set modulation color.

Parameters
rRed component in [0,1].
gGreen component in [0,1].
bBlue component in [0,1].
aAlpha component in [0,1].

Implements OpenGL::Pipeline.

◆ setProjectionMatrix()

void OpenGL::ShaderPipeline::setProjectionMatrix ( const Math::Matrix4 &  projectionMatrix)
overridevirtual

Set the projection matrix.

This is intended to be only ever be used by Framebuffer subclasses.

Implements OpenGL::Pipeline.

◆ activateInternal()

void OpenGL::ShaderPipeline::activateInternal ( )
overrideprotectedvirtual

Activate the pipeline.

This sets the OpenGL state to make use of drawing with the given OpenGL pipeline.

Reimplemented from OpenGL::Pipeline.

◆ deactivateInternal()

void OpenGL::ShaderPipeline::deactivateInternal ( )
overrideprotectedvirtual

Deactivate the pipeline.

Reimplemented from OpenGL::Pipeline.

◆ drawTextureInternal()

void OpenGL::ShaderPipeline::drawTextureInternal ( const Texture &  texture,
const GLfloat *  coordinates,
const GLfloat *  texcoords 
)
overrideprotectedvirtual

Implements OpenGL::Pipeline.


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