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

#include <gfx_tinygl.h>

Inheritance diagram for Grim::GfxTinyGL:
Collaboration diagram for Grim::GfxTinyGL:

List of all members.

Public Member Functions

 GfxTinyGL ()
virtual ~GfxTinyGL ()
bytesetupScreen (int screenW, int screenH, bool fullscreen) override
 Creates a render-context.
const char * getVideoDeviceName () override
void setupCameraFrustum (float fov, float nclip, float fclip) override
void positionCamera (const Math::Vector3d &pos, const Math::Vector3d &interest, float roll) override
void positionCamera (const Math::Vector3d &pos, const Math::Matrix4 &rot) override
Math::Matrix4 getModelView () override
Math::Matrix4 getProjection () override
void clearScreen () override
void clearDepthBuffer () override
void flipBuffer () override
 Swap the buffers, making the drawn screen visible.
bool isHardwareAccelerated () override
 Query whether the current context is hardware-accelerated.
bool supportsShaders () override
 Query whether the current context supports shaders.
void getScreenBoundingBox (const Mesh *model, int *x1, int *y1, int *x2, int *y2) override
 FIXME: The implementations of these functions (for Grim and EMI, respectively) are very similar.
void getScreenBoundingBox (const EMIModel *model, int *x1, int *y1, int *x2, int *y2) override
void getActorScreenBBox (const Actor *actor, Common::Point &p1, Common::Point &p2) override
void startActorDraw (const Actor *actor) override
void finishActorDraw () override
void setShadow (Shadow *shadow) override
void drawShadowPlanes () override
void setShadowMode () override
void clearShadowMode () override
void setShadowColor (byte r, byte g, byte b) override
void getShadowColor (byte *r, byte *g, byte *b) override
void set3DMode () override
void translateViewpointStart () override
void translateViewpoint (const Math::Vector3d &vec) override
void rotateViewpoint (const Math::Angle &angle, const Math::Vector3d &axis) override
void rotateViewpoint (const Math::Matrix4 &matrix) override
void translateViewpointFinish () override
void drawEMIModelFace (const EMIModel *model, const EMIMeshFace *face) override
void drawModelFace (const Mesh *mesh, const MeshFace *face) override
void drawSprite (const Sprite *sprite) override
void enableLights () override
void disableLights () override
void setupLight (Light *light, int lightId) override
void turnOffLight (int lightId) override
void createTexture (Texture *texture, const uint8 *data, const CMap *cmap, bool clamp) override
void selectTexture (const Texture *texture) override
void destroyTexture (Texture *texture) override
void createBitmap (BitmapData *bitmap) override
 Prepares a bitmap for drawing performs any format conversions needed for the renderer, and might create an internal representation of the bitmap external changes to the bitmap may not be visible after this is called.
void drawBitmap (const Bitmap *bitmap, int x, int y, uint32 layer) override
 Draws a bitmap before this is safe to use, createBitmap MUST have been called.
void destroyBitmap (BitmapData *bitmap) override
 Deletes any internal references and representations of a bitmap after this is called, it is safe to dispose of or change the external bitmapdata.
void createFont (Font *font) override
void destroyFont (Font *font) override
void drawTextObject (const TextObject *text) override
void createTextObject (TextObject *text) override
void destroyTextObject (TextObject *text) override
void dimScreen () override
 Dims the entire screen Sets the entire screen to 10% of its current brightness, and converts it to grayscale.
void dimRegion (int x, int y, int w, int h, float level) override
void irisAroundRegion (int x1, int y1, int x2, int y2) override
 Draw a completely opaque Iris around the specified rectangle.
BitmapgetScreenshot (int w, int h, bool useStored) override
void storeDisplay () override
void copyStoredToDisplay () override
void drawEmergString (int x, int y, const char *text, const Color &fgColor) override
void loadEmergFont () override
void drawRectangle (const PrimitiveObject *primitive) override
void drawLine (const PrimitiveObject *primitive) override
void drawPolygon (const PrimitiveObject *primitive) override
void drawDimPlane () override
void prepareMovieFrame (Graphics::Surface *frame) override
 Prepare a movie-frame for drawing performing any necessary conversion.
void drawMovieFrame (int offsetX, int offsetY) override
void releaseMovieFrame () override
 Release the currently prepared movie-frame, if one exists.
void setBlendMode (bool additive) override

Protected Member Functions

void createSpecialtyTextureFromScreen (uint id, uint8 *data, int x, int y, int width, int height)

Private Member Functions

void readPixels (int x, int y, int width, int height, uint8 *buffer)

Private Attributes

TinyGL::FrameBuffer_zb
Graphics::PixelFormat _pixelFormat
Graphics::BlitImage_emergFont [96]
Graphics::BlitImage_smushImage
Graphics::PixelBuffer _storedDisplay
float _alpha
const Actor_currentActor
TGLenum _depthFunc

Detailed Description

Definition at line 37 of file gfx_tinygl.h.


Constructor & Destructor Documentation

Grim::GfxTinyGL::GfxTinyGL (  ) 

Definition at line 51 of file gfx_tinygl.cpp.

Grim::GfxTinyGL::~GfxTinyGL (  )  [virtual]

Definition at line 66 of file gfx_tinygl.cpp.


Member Function Documentation

void Grim::GfxTinyGL::clearDepthBuffer (  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 178 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::clearScreen (  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 174 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::clearShadowMode (  )  [override, virtual]

Reimplemented from Grim::GfxBase.

Definition at line 589 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::copyStoredToDisplay (  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 1282 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::createBitmap ( BitmapData bitmap  )  [override, virtual]

Prepares a bitmap for drawing performs any format conversions needed for the renderer, and might create an internal representation of the bitmap external changes to the bitmap may not be visible after this is called.

Must be called before drawBitmap can be used.

the external bitmap might have its data changed by this function,

Parameters:
bitmap the bitmap to be prepared
See also:
destroyBitmap
drawBitmap

Implements Grim::GfxBase.

Definition at line 889 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::createFont ( Font font  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 1007 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::createSpecialtyTextureFromScreen ( uint  id,
uint8 data,
int  x,
int  y,
int  width,
int  height 
) [protected, virtual]

Implements Grim::GfxBase.

Definition at line 1272 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::createTextObject ( TextObject text  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 1018 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::createTexture ( Texture texture,
const uint8 data,
const CMap cmap,
bool  clamp 
) [override, virtual]

Implements Grim::GfxBase.

Definition at line 1125 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::destroyBitmap ( BitmapData bitmap  )  [override, virtual]

Deletes any internal references and representations of a bitmap after this is called, it is safe to dispose of or change the external bitmapdata.

Parameters:
bitmap the bitmap to be destroyed
See also:
createBitmap
drawBitmap

Implements Grim::GfxBase.

Definition at line 999 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::destroyFont ( Font font  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 1010 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::destroyTextObject ( TextObject text  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 1114 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::destroyTexture ( Texture texture  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 1205 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::dimRegion ( int  x,
int  y,
int  w,
int  h,
float  level 
) [override, virtual]

Implements Grim::GfxBase.

Definition at line 1292 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::dimScreen (  )  [override, virtual]

Dims the entire screen Sets the entire screen to 10% of its current brightness, and converts it to grayscale.

Implements Grim::GfxBase.

Definition at line 1288 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::disableLights (  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 835 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::drawBitmap ( const Bitmap bitmap,
int  x,
int  y,
uint32  layer 
) [override, virtual]

Draws a bitmap before this is safe to use, createBitmap MUST have been called.

Parameters:
bitmap the bitmap to be drawn
See also:
createBitmap
destroyBitmap

Implements Grim::GfxBase.

Definition at line 932 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::drawDimPlane (  )  [override, virtual]

Reimplemented from Grim::GfxBase.

Definition at line 1444 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::drawEmergString ( int  x,
int  y,
const char *  text,
const Color fgColor 
) [override, virtual]

Implements Grim::GfxBase.

Definition at line 1249 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::drawEMIModelFace ( const EMIModel model,
const EMIMeshFace face 
) [override, virtual]

Implements Grim::GfxBase.

Definition at line 621 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::drawLine ( const PrimitiveObject primitive  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 1410 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::drawModelFace ( const Mesh mesh,
const MeshFace face 
) [override, virtual]

Implements Grim::GfxBase.

Definition at line 677 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::drawMovieFrame ( int  offsetX,
int  offsetY 
) [override, virtual]

Implements Grim::GfxBase.

Definition at line 1219 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::drawPolygon ( const PrimitiveObject primitive  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 1477 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::drawRectangle ( const PrimitiveObject primitive  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 1368 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::drawShadowPlanes (  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 550 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::drawSprite ( const Sprite sprite  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 700 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::drawTextObject ( const TextObject text  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 1101 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::enableLights (  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 831 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::finishActorDraw (  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 525 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::flipBuffer (  )  [override, virtual]

Swap the buffers, making the drawn screen visible.

Implements Grim::GfxBase.

Definition at line 182 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::getActorScreenBBox ( const Actor actor,
Common::Point p1,
Common::Point p2 
) [override, virtual]

Implements Grim::GfxBase.

Definition at line 384 of file gfx_tinygl.cpp.

Math::Matrix4 Grim::GfxTinyGL::getModelView (  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 146 of file gfx_tinygl.cpp.

Math::Matrix4 Grim::GfxTinyGL::getProjection (  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 167 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::getScreenBoundingBox ( const EMIModel model,
int *  x1,
int *  y1,
int *  x2,
int *  y2 
) [override, virtual]

Implements Grim::GfxBase.

Definition at line 315 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::getScreenBoundingBox ( const Mesh mesh,
int *  x1,
int *  y1,
int *  x2,
int *  y2 
) [override, virtual]

FIXME: The implementations of these functions (for Grim and EMI, respectively) are very similar.

Needs refactoring. See issue #789.

Implements Grim::GfxBase.

Definition at line 244 of file gfx_tinygl.cpp.

Bitmap * Grim::GfxTinyGL::getScreenshot ( int  w,
int  h,
bool  useStored 
) [override, virtual]

Implements Grim::GfxBase.

Definition at line 1262 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::getShadowColor ( byte r,
byte g,
byte b 
) [override, virtual]

Implements Grim::GfxBase.

Definition at line 615 of file gfx_tinygl.cpp.

const char * Grim::GfxTinyGL::getVideoDeviceName (  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 112 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::irisAroundRegion ( int  x1,
int  y1,
int  x2,
int  y2 
) [override, virtual]

Draw a completely opaque Iris around the specified rectangle.

the arguments specify the distance from the screen-edge to the first non-iris pixel.

Parameters:
x the width of the Iris
y the height of the Iris

Implements Grim::GfxBase.

Definition at line 1322 of file gfx_tinygl.cpp.

bool Grim::GfxTinyGL::isHardwareAccelerated (  )  [override, virtual]

Query whether the current context is hardware-accelerated.

Returns:
true if hw-accelerated, false otherwise

Implements Grim::GfxBase.

Definition at line 187 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::loadEmergFont (  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 1227 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::positionCamera ( const Math::Vector3d pos,
const Math::Vector3d interest,
float  roll 
) [override, virtual]

Implements Grim::GfxBase.

Definition at line 127 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::positionCamera ( const Math::Vector3d pos,
const Math::Matrix4 rot 
) [override, virtual]

Implements Grim::GfxBase.

Definition at line 140 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::prepareMovieFrame ( Graphics::Surface frame  )  [override, virtual]

Prepare a movie-frame for drawing performing any necessary conversion.

Parameters:
width the width of the movie-frame.
height the height of the movie-frame.
bitmap a pointer to the data for the movie-frame.
See also:
drawMovieFrame
releaseMovieFrame

Implements Grim::GfxBase.

Definition at line 1213 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::readPixels ( int  x,
int  y,
int  width,
int  height,
uint8 buffer 
) [private]

Definition at line 1515 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::releaseMovieFrame (  )  [override, virtual]

Release the currently prepared movie-frame, if one exists.

See also:
drawMovieFrame
prepareMovieFrame

Implements Grim::GfxBase.

Definition at line 1223 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::rotateViewpoint ( const Math::Matrix4 matrix  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 822 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::rotateViewpoint ( const Math::Angle angle,
const Math::Vector3d axis 
) [override, virtual]

Implements Grim::GfxBase.

Definition at line 818 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::selectTexture ( const Texture texture  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 1189 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::set3DMode (  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 595 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::setBlendMode ( bool  additive  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 1540 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::setShadow ( Shadow shadow  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 601 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::setShadowColor ( byte  r,
byte  g,
byte  b 
) [override, virtual]

Implements Grim::GfxBase.

Definition at line 609 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::setShadowMode (  )  [override, virtual]

Reimplemented from Grim::GfxBase.

Definition at line 584 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::setupCameraFrustum ( float  fov,
float  nclip,
float  fclip 
) [override, virtual]

Implements Grim::GfxBase.

Definition at line 116 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::setupLight ( Light light,
int  lightId 
) [override, virtual]

Implements Grim::GfxBase.

Definition at line 839 of file gfx_tinygl.cpp.

byte * Grim::GfxTinyGL::setupScreen ( int  screenW,
int  screenH,
bool  fullscreen 
) [override, virtual]

Creates a render-context.

Parameters:
screenW the width of the context
screenH the height of the context
fullscreen true if fullscreen is desired, false otherwise.

Implements Grim::GfxBase.

Definition at line 80 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::startActorDraw ( const Actor actor  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 448 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::storeDisplay (  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 1277 of file gfx_tinygl.cpp.

bool Grim::GfxTinyGL::supportsShaders (  )  [override, virtual]

Query whether the current context supports shaders.

Returns:
true if supports shaders, false otherwise

Implements Grim::GfxBase.

Definition at line 191 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::translateViewpoint ( const Math::Vector3d vec  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 814 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::translateViewpointFinish (  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 826 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::translateViewpointStart (  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 809 of file gfx_tinygl.cpp.

void Grim::GfxTinyGL::turnOffLight ( int  lightId  )  [override, virtual]

Implements Grim::GfxBase.

Definition at line 885 of file gfx_tinygl.cpp.


Member Data Documentation

float Grim::GfxTinyGL::_alpha [private]

Definition at line 136 of file gfx_tinygl.h.

Definition at line 137 of file gfx_tinygl.h.

Definition at line 138 of file gfx_tinygl.h.

Definition at line 133 of file gfx_tinygl.h.

Definition at line 134 of file gfx_tinygl.h.

Definition at line 131 of file gfx_tinygl.h.


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


Generated on Sat Sep 21 2019 05:03:46 for ResidualVM by doxygen 1.7.1
curved edge   curved edge