ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

OpenGL::SurfaceRenderer Class Reference

A renderer to draw textures as two dimensional surfaces to the screen. More...

#include <surfacerenderer.h>

Inheritance diagram for OpenGL::SurfaceRenderer:

List of all members.

Public Member Functions

 SurfaceRenderer ()
virtual ~SurfaceRenderer ()
virtual void prepareState ()=0
 Push the current OpenGL state, and set up the adequate state for calling the render method.
virtual void render (const Texture *tex, const Math::Rect2d &dest)=0
 Draw a 2D surface from the specified texture.
virtual void restorePreviousState ()=0
 Pop the OpenGL state to restore it as it was before calling the prepareState method.
void setFlipY (bool flipY)
 Invert the surface along the Y coordinate.
void enableAlphaBlending (bool enable)
 Set the alpha blending with already drawn content.

Protected Attributes

bool _flipY
bool _alphaBlending

Detailed Description

A renderer to draw textures as two dimensional surfaces to the screen.

Definition at line 38 of file surfacerenderer.h.


Constructor & Destructor Documentation

OpenGL::SurfaceRenderer::SurfaceRenderer (  ) 
virtual OpenGL::SurfaceRenderer::~SurfaceRenderer (  )  [virtual]

Member Function Documentation

void OpenGL::SurfaceRenderer::enableAlphaBlending ( bool  enable  ) 

Set the alpha blending with already drawn content.

virtual void OpenGL::SurfaceRenderer::prepareState (  )  [pure virtual]

Push the current OpenGL state, and set up the adequate state for calling the render method.

Implemented in OpenGL::FixedSurfaceRenderer.

virtual void OpenGL::SurfaceRenderer::render ( const Texture tex,
const Math::Rect2d dest 
) [pure virtual]

Draw a 2D surface from the specified texture.

The destination rectangle must be specified in the following coordinates system: x: left [0.0, 1.0] right y: top [0.0, 1.0] bottom

Implemented in OpenGL::FixedSurfaceRenderer.

virtual void OpenGL::SurfaceRenderer::restorePreviousState (  )  [pure virtual]

Pop the OpenGL state to restore it as it was before calling the prepareState method.

Implemented in OpenGL::FixedSurfaceRenderer.

void OpenGL::SurfaceRenderer::setFlipY ( bool  flipY  ) 

Invert the surface along the Y coordinate.

Causes the image to be drawn upside down


Member Data Documentation

Definition at line 77 of file surfacerenderer.h.

Definition at line 76 of file surfacerenderer.h.


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


Generated on Sat Jul 13 2019 05:04:43 for ResidualVM by doxygen 1.7.1
curved edge   curved edge