#include <pipeline.h>
Public Member Functions | |
| 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 |
Static Public Member Functions | |
| static void | disable () |
Protected Member Functions | |
| virtual void | activateInternal () |
| virtual void | deactivateInternal () |
| virtual void | drawTextureInternal (const Texture &texture, const GLfloat *coordinates, const GLfloat *texcoords)=0 |
| bool | isActive () const |
Protected Attributes | |
| Framebuffer * | _activeFramebuffer |
Interface for OpenGL pipeline functionality.
This encapsulates differences in various rendering pipelines used for OpenGL, OpenGL ES 1, and OpenGL ES 2.
|
inlinestatic |
Deactivate any pipeline.
| void OpenGL::Pipeline::activate | ( | ) |
Activate the pipeline.
This sets the OpenGL state to make use of drawing with the given OpenGL pipeline.
| void OpenGL::Pipeline::deactivate | ( | ) |
Deactivate the pipeline.
| Framebuffer* OpenGL::Pipeline::setFramebuffer | ( | Framebuffer * | framebuffer | ) |
Set framebuffer to render to.
Client is responsible for any memory management related to framebuffer.
| framebuffer | Framebuffer to activate. |
|
pure virtual |
Set modulation color.
| r | Red component in [0,1]. |
| g | Green component in [0,1]. |
| b | Blue component in [0,1]. |
| a | Alpha component in [0,1]. |
Implemented in OpenGL::LibRetroPipeline, OpenGL::ShaderPipeline, and OpenGL::FixedPipeline.
|
inline |
Draw a texture rectangle to the currently active framebuffer.
| texture | Texture to use for drawing. |
| coordinates | x1, y1, x2, y2 coordinates where to draw the texture. |
|
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.
|
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.
|
protectedvirtual |
Deactivate the pipeline.
Reimplemented in OpenGL::ShaderPipeline.