ScummVM API documentation
OpenGL::Pipeline Class Referenceabstract

#include <pipeline.h>

Inheritance diagram for OpenGL::Pipeline:
OpenGL::FixedPipeline OpenGL::LibRetroPipeline OpenGL::ShaderPipeline OpenGL::CLUT8LookUpPipeline

Public Member Functions

void activate ()
 
void deactivate ()
 
FramebuffersetFramebuffer (Framebuffer *framebuffer)
 
virtual void setColor (GLfloat r, GLfloat g, GLfloat b, GLfloat a)=0
 
void drawTexture (const GLTexture &texture, const GLfloat *coordinates, const GLfloat *texcoords)
 
void drawTexture (const GLTexture &texture, const GLfloat *coordinates)
 
void drawTexture (const GLTexture &texture, GLfloat x, GLfloat y, GLfloat w, GLfloat h)
 
void drawTexture (const GLTexture &texture, GLfloat x, GLfloat y, GLfloat w, GLfloat h, const Common::Rect &clip)
 
virtual void setProjectionMatrix (const Math::Matrix4 &projectionMatrix)=0
 

Protected Member Functions

virtual void activateInternal ()
 
virtual void deactivateInternal ()
 
virtual void drawTextureInternal (const GLTexture &texture, const GLfloat *coordinates, const GLfloat *texcoords)=0
 
bool isActive () const
 

Protected Attributes

Framebuffer_activeFramebuffer
 

Detailed Description

Interface for OpenGL pipeline functionality.

This encapsulates differences in various rendering pipelines used for OpenGL, OpenGL ES 1, and OpenGL ES 2.

Member Function Documentation

◆ activate()

void OpenGL::Pipeline::activate ( )

Activate the pipeline.

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

◆ deactivate()

void OpenGL::Pipeline::deactivate ( )

Deactivate the pipeline.

◆ setFramebuffer()

Framebuffer* OpenGL::Pipeline::setFramebuffer ( Framebuffer framebuffer)

Set framebuffer to render to.

Client is responsible for any memory management related to framebuffer.

Parameters
framebufferFramebuffer to activate.
Returns
Formerly active framebuffer.

◆ setColor()

virtual void OpenGL::Pipeline::setColor ( GLfloat  r,
GLfloat  g,
GLfloat  b,
GLfloat  a 
)
pure virtual

Set modulation color.

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

Implemented in OpenGL::LibRetroPipeline, OpenGL::ShaderPipeline, and OpenGL::FixedPipeline.

◆ drawTexture()

void OpenGL::Pipeline::drawTexture ( const GLTexture texture,
const GLfloat *  coordinates,
const GLfloat *  texcoords 
)
inline

Draw a texture rectangle to the currently active framebuffer.

Parameters
textureTexture to use for drawing.
coordinatesx1, y1, x2, y2 coordinates where to draw the texture.

◆ setProjectionMatrix()

virtual void OpenGL::Pipeline::setProjectionMatrix ( const Math::Matrix4 &  projectionMatrix)
pure virtual

Set the projection matrix.

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

Implemented in OpenGL::LibRetroPipeline, OpenGL::ShaderPipeline, and OpenGL::FixedPipeline.

◆ activateInternal()

virtual void OpenGL::Pipeline::activateInternal ( )
protectedvirtual

Activate the pipeline.

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

Reimplemented in OpenGL::ShaderPipeline, and OpenGL::FixedPipeline.

◆ deactivateInternal()

virtual void OpenGL::Pipeline::deactivateInternal ( )
protectedvirtual

Deactivate the pipeline.

Reimplemented in OpenGL::ShaderPipeline.


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