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

Wintermute::BaseRenderOpenGL3DShader Class Reference

#include <base_render_opengl3d_shader.h>

Inheritance diagram for Wintermute::BaseRenderOpenGL3DShader:
Collaboration diagram for Wintermute::BaseRenderOpenGL3DShader:

List of all members.

Public Member Functions

 BaseRenderOpenGL3DShader (BaseGame *inGame=nullptr)
 ~BaseRenderOpenGL3DShader () override
void setSpriteBlendMode (Graphics::TSpriteBlendMode blendMode) override
void setAmbientLight () override
int maximumLightsCount () override
void enableLight (int index) override
void disableLight (int index) override
void setLightParameters (int index, const Math::Vector3d &position, const Math::Vector3d &direction, const Math::Vector4d &diffuse, bool spotlight) override
void enableCulling () override
void disableCulling () override
bool enableShadows () override
bool disableShadows () override
void displayShadow (BaseObject *object, const Math::Vector3d &lightPos, bool lightPosRelative) override
bool stencilSupported () override
void dumpData (const char *filename) override
BaseImagetakeScreenshot () override
 Take a screenshot of the current screenstate.
bool saveScreenShot (const Common::String &filename, int sizeX=0, int sizeY=0) override
void setWindowed (bool windowed) override
void fadeToColor (byte r, byte g, byte b, byte a) override
 Fade a portion of the screen to a specific color.
bool fill (byte r, byte g, byte b, Common::Rect *rect=nullptr) override
 Fill a portion of the screen with a specified color.
bool setViewport (int left, int top, int right, int bottom) override
bool drawLine (int x1, int y1, int x2, int y2, uint32 color) override
bool drawRect (int x1, int y1, int x2, int y2, uint32 color, int width=1) override
bool setProjection () override
bool setProjection2D () override
void resetModelViewTransform () override
void setWorldTransform (const Math::Matrix4 &transform) override
bool windowedBlt () override
void onWindowChange () override
bool initRenderer (int width, int height, bool windowed) override
bool flip () override
 Flip the backbuffer onto the screen-buffer The screen will NOT be updated before calling this function.
bool indicatorFlip () override
 Special flip for the indicator drawn during save/load essentially, just copies the region defined by the _indicator-variables.
bool forcedFlip () override
bool setup2D (bool force=false) override
bool setup3D (Camera3D *camera, bool force=false) override
bool setupLines () override
Common::String getName () const override
 Get the name of the current renderer.
bool displayDebugInfo () override
bool drawShaderQuad () override
float getScaleRatioX () const override
float getScaleRatioY () const override
BaseSurfacecreateSurface () override
 Create a Surface fit for use with the renderer.
bool startSpriteBatch () override
bool endSpriteBatch () override
bool drawSpriteEx (BaseSurfaceOpenGL3D &tex, const Rect32 &rect, const Vector2 &pos, const Vector2 &rot, const Vector2 &scale, float angle, uint32 color, bool alphaDisable, Graphics::TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) override
void renderSceneGeometry (const BaseArray< AdWalkplane * > &planes, const BaseArray< AdBlock * > &blocks, const BaseArray< AdGeneric * > &generics, const BaseArray< Light3D * > &lights, Camera3D *camera) override
void renderShadowGeometry (const BaseArray< AdWalkplane * > &planes, const BaseArray< AdBlock * > &blocks, const BaseArray< AdGeneric * > &generics, Camera3D *camera) override
Mesh3DScreateMesh3DS () override
MeshXcreateMeshX () override
ShadowVolumecreateShadowVolume () override

Private Attributes

Math::Matrix4 _projectionMatrix2d
Common::Array< Math::Matrix4_transformStack
float _fov
float _nearPlane
float _farPlane
TRendererState _renderState
bool _spriteBatchMode
GLuint _spriteVBO
GLuint _fadeVBO
GLuint _lineVBO
OpenGL::Shader_spriteShader
OpenGL::Shader_fadeShader
OpenGL::Shader_modelXShader
OpenGL::Shader_geometryShader
OpenGL::Shader_shadowVolumeShader
OpenGL::Shader_shadowMaskShader
OpenGL::Shader_lineShader

Detailed Description

Definition at line 41 of file base_render_opengl3d_shader.h.


Constructor & Destructor Documentation

Wintermute::BaseRenderOpenGL3DShader::BaseRenderOpenGL3DShader ( BaseGame inGame = nullptr  ) 

Definition at line 56 of file base_render_opengl3d_shader.cpp.

Wintermute::BaseRenderOpenGL3DShader::~BaseRenderOpenGL3DShader (  )  [override]

Definition at line 61 of file base_render_opengl3d_shader.cpp.


Member Function Documentation

Mesh3DS * Wintermute::BaseRenderOpenGL3DShader::createMesh3DS (  )  [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 684 of file base_render_opengl3d_shader.cpp.

MeshX * Wintermute::BaseRenderOpenGL3DShader::createMeshX (  )  [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 688 of file base_render_opengl3d_shader.cpp.

ShadowVolume * Wintermute::BaseRenderOpenGL3DShader::createShadowVolume (  )  [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 692 of file base_render_opengl3d_shader.cpp.

BaseSurface * Wintermute::BaseRenderOpenGL3DShader::createSurface (  )  [override, virtual]

Create a Surface fit for use with the renderer.

As diverse implementations of BaseRenderer might have different solutions for storing surfaces this allows for a common interface for creating surface-handles. (Mostly usefull to ease future implementation of hw-accelerated rendering, or readding 3D-support at some point).

Returns:
a surface that can be used with this renderer

Implements Wintermute::BaseRenderer.

Definition at line 534 of file base_render_opengl3d_shader.cpp.

void Wintermute::BaseRenderOpenGL3DShader::disableCulling (  )  [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 159 of file base_render_opengl3d_shader.cpp.

void Wintermute::BaseRenderOpenGL3DShader::disableLight ( int  index  )  [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 120 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::disableShadows (  )  [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 168 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::displayDebugInfo (  )  [inline, override, virtual]

Reimplemented from Wintermute::BaseRenderer.

Definition at line 93 of file base_render_opengl3d_shader.h.

void Wintermute::BaseRenderOpenGL3DShader::displayShadow ( BaseObject object,
const Math::Vector3d lightPos,
bool  lightPosRelative 
) [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 173 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::drawLine ( int  x1,
int  y1,
int  x2,
int  y2,
uint32  color 
) [override, virtual]

Reimplemented from Wintermute::BaseRenderer.

Definition at line 232 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::drawRect ( int  x1,
int  y1,
int  x2,
int  y2,
uint32  color,
int  width = 1 
) [override, virtual]

Reimplemented from Wintermute::BaseRenderer.

Definition at line 265 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::drawShaderQuad (  )  [inline, override, virtual]

Reimplemented from Wintermute::BaseRenderer.

Definition at line 96 of file base_render_opengl3d_shader.h.

bool Wintermute::BaseRenderOpenGL3DShader::drawSpriteEx ( BaseSurfaceOpenGL3D tex,
const Rect32 rect,
const Vector2 pos,
const Vector2 rot,
const Vector2 scale,
float  angle,
uint32  color,
bool  alphaDisable,
Graphics::TSpriteBlendMode  blendMode,
bool  mirrorX,
bool  mirrorY 
) [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 538 of file base_render_opengl3d_shader.cpp.

void Wintermute::BaseRenderOpenGL3DShader::dumpData ( const char *  filename  )  [inline, override, virtual]

Reimplemented from Wintermute::BaseRenderer.

Definition at line 63 of file base_render_opengl3d_shader.h.

void Wintermute::BaseRenderOpenGL3DShader::enableCulling (  )  [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 155 of file base_render_opengl3d_shader.cpp.

void Wintermute::BaseRenderOpenGL3DShader::enableLight ( int  index  )  [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 114 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::enableShadows (  )  [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 163 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::endSpriteBatch (  )  [inline, override, virtual]

Reimplemented from Wintermute::BaseRenderer.

Definition at line 112 of file base_render_opengl3d_shader.h.

void Wintermute::BaseRenderOpenGL3DShader::fadeToColor ( byte  r,
byte  g,
byte  b,
byte  a 
) [override, virtual]

Fade a portion of the screen to a specific color.

Parameters:
r the red component to fade too.
g the green component to fade too.
b the blue component to fade too.
a the alpha component to fade too.
rect the portion of the screen to fade (if nullptr, the entire screen will be faded).

Implements Wintermute::BaseRenderer.

Definition at line 196 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::fill ( byte  r,
byte  g,
byte  b,
Common::Rect rect = nullptr 
) [override, virtual]

Fill a portion of the screen with a specified color.

Parameters:
r the red component to fill with.
g the green component to fill with.
b the blue component to fill with.

Implements Wintermute::BaseRenderer.

Definition at line 220 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::flip (  )  [override, virtual]

Flip the backbuffer onto the screen-buffer The screen will NOT be updated before calling this function.

Returns:
true if successfull, false on error.

Implements Wintermute::BaseRenderer.

Definition at line 418 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::forcedFlip (  )  [override, virtual]

Implements Wintermute::BaseRenderer.

Definition at line 428 of file base_render_opengl3d_shader.cpp.

Common::String Wintermute::BaseRenderOpenGL3DShader::getName (  )  const [inline, override, virtual]

Get the name of the current renderer.

Returns:
the name of the renderer.

Implements Wintermute::BaseRenderer.

Definition at line 90 of file base_render_opengl3d_shader.h.

float Wintermute::BaseRenderOpenGL3DShader::getScaleRatioX (  )  const [inline, override, virtual]

Reimplemented from Wintermute::BaseRenderer.

Definition at line 100 of file base_render_opengl3d_shader.h.

float Wintermute::BaseRenderOpenGL3DShader::getScaleRatioY (  )  const [inline, override, virtual]

Reimplemented from Wintermute::BaseRenderer.

Definition at line 103 of file base_render_opengl3d_shader.h.

bool Wintermute::BaseRenderOpenGL3DShader::indicatorFlip (  )  [override, virtual]

Special flip for the indicator drawn during save/load essentially, just copies the region defined by the _indicator-variables.

Implements Wintermute::BaseRenderer.

Definition at line 423 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::initRenderer ( int  width,
int  height,
bool  windowed 
) [override, virtual]

Reimplemented from Wintermute::BaseRenderer.

Definition at line 338 of file base_render_opengl3d_shader.cpp.

int Wintermute::BaseRenderOpenGL3DShader::maximumLightsCount (  )  [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 110 of file base_render_opengl3d_shader.cpp.

void Wintermute::BaseRenderOpenGL3DShader::onWindowChange (  )  [override, virtual]

Reimplemented from Wintermute::BaseRenderer.

Definition at line 334 of file base_render_opengl3d_shader.cpp.

void Wintermute::BaseRenderOpenGL3DShader::renderSceneGeometry ( const BaseArray< AdWalkplane * > &  planes,
const BaseArray< AdBlock * > &  blocks,
const BaseArray< AdGeneric * > &  generics,
const BaseArray< Light3D * > &  lights,
Camera3D camera 
) [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 645 of file base_render_opengl3d_shader.cpp.

void Wintermute::BaseRenderOpenGL3DShader::renderShadowGeometry ( const BaseArray< AdWalkplane * > &  planes,
const BaseArray< AdBlock * > &  blocks,
const BaseArray< AdGeneric * > &  generics,
Camera3D camera 
) [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 650 of file base_render_opengl3d_shader.cpp.

void Wintermute::BaseRenderOpenGL3DShader::resetModelViewTransform (  )  [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 308 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::saveScreenShot ( const Common::String filename,
int  sizeX = 0,
int  sizeY = 0 
) [override, virtual]

Reimplemented from Wintermute::BaseRenderer.

Definition at line 187 of file base_render_opengl3d_shader.cpp.

void Wintermute::BaseRenderOpenGL3DShader::setAmbientLight (  )  [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 85 of file base_render_opengl3d_shader.cpp.

void Wintermute::BaseRenderOpenGL3DShader::setLightParameters ( int  index,
const Math::Vector3d position,
const Math::Vector3d direction,
const Math::Vector4d diffuse,
bool  spotlight 
) [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 126 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::setProjection (  )  [override, virtual]

Reimplemented from Wintermute::BaseRenderer.

Definition at line 270 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::setProjection2D (  )  [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 289 of file base_render_opengl3d_shader.cpp.

void Wintermute::BaseRenderOpenGL3DShader::setSpriteBlendMode ( Graphics::TSpriteBlendMode  blendMode  )  [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 65 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::setup2D ( bool  force = false  )  [override, virtual]

Reimplemented from Wintermute::BaseRenderer.

Definition at line 433 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::setup3D ( Camera3D camera,
bool  force = false 
) [override]

Definition at line 455 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::setupLines (  )  [override, virtual]

Reimplemented from Wintermute::BaseRenderer.

Definition at line 522 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::setViewport ( int  left,
int  top,
int  right,
int  bottom 
) [override, virtual]

Reimplemented from Wintermute::BaseRenderer.

Definition at line 226 of file base_render_opengl3d_shader.cpp.

void Wintermute::BaseRenderOpenGL3DShader::setWindowed ( bool  windowed  )  [override, virtual]

Implements Wintermute::BaseRenderer.

Definition at line 192 of file base_render_opengl3d_shader.cpp.

void Wintermute::BaseRenderOpenGL3DShader::setWorldTransform ( const Math::Matrix4 transform  )  [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 313 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::startSpriteBatch (  )  [inline, override, virtual]

Reimplemented from Wintermute::BaseRenderer.

Definition at line 109 of file base_render_opengl3d_shader.h.

bool Wintermute::BaseRenderOpenGL3DShader::stencilSupported (  )  [override, virtual]

Implements Wintermute::BaseRenderer3D.

Definition at line 177 of file base_render_opengl3d_shader.cpp.

BaseImage * Wintermute::BaseRenderOpenGL3DShader::takeScreenshot (  )  [override, virtual]

Take a screenshot of the current screenstate.

Returns:
a BaseImage containing the current screen-buffer.

Implements Wintermute::BaseRenderer.

Definition at line 182 of file base_render_opengl3d_shader.cpp.

bool Wintermute::BaseRenderOpenGL3DShader::windowedBlt (  )  [override, virtual]

Reimplemented from Wintermute::BaseRenderer.

Definition at line 329 of file base_render_opengl3d_shader.cpp.


Member Data Documentation


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


Generated on Sat Sep 26 2020 05:04:13 for ResidualVM by doxygen 1.7.1
curved edge   curved edge