22 #ifndef GRIM_GFX_TINYGL_H 23 #define GRIM_GFX_TINYGL_H 25 #include "engines/grim/gfx_base.h" 27 #include "graphics/tinygl/tinygl.h" 44 void setupScreen(
int screenW,
int screenH)
override;
46 const char *getVideoDeviceName()
override;
48 void setupCameraFrustum(
float fov,
float nclip,
float fclip)
override;
49 void positionCamera(
const Math::Vector3d &pos,
const Math::Vector3d &interest,
float roll)
override;
50 void positionCamera(
const Math::Vector3d &pos,
const Math::Matrix4 &rot)
override;
52 Math::Matrix4 getModelView()
override;
53 Math::Matrix4 getProjection()
override;
55 void clearScreen()
override;
56 void clearDepthBuffer()
override;
57 void flipBuffer(
bool opportunistic =
false)
override;
59 bool isHardwareAccelerated()
override;
60 bool supportsShaders()
override;
62 void getScreenBoundingBox(
const Mesh *model,
int *x1,
int *y1,
int *x2,
int *y2)
override;
63 void getScreenBoundingBox(
const EMIModel *model,
int *x1,
int *y1,
int *x2,
int *y2)
override;
66 void startActorDraw(
const Actor *actor)
override;
67 void finishActorDraw()
override;
68 void setShadow(
Shadow *shadow)
override;
69 void drawShadowPlanes()
override;
70 void setShadowMode()
override;
71 void clearShadowMode()
override;
72 void setShadowColor(byte r, byte g, byte b)
override;
73 void getShadowColor(byte *r, byte *g, byte *b)
override;
75 void set3DMode()
override;
77 void translateViewpointStart()
override;
78 void translateViewpoint(
const Math::Vector3d &vec)
override;
79 void rotateViewpoint(
const Math::Angle &angle,
const Math::Vector3d &axis)
override;
80 void rotateViewpoint(
const Math::Matrix4 &matrix)
override;
81 void translateViewpointFinish()
override;
84 void drawModelFace(
const Mesh *mesh,
const MeshFace *face)
override;
85 void drawSprite(
const Sprite *sprite)
override;
87 void enableLights()
override;
88 void disableLights()
override;
89 void setupLight(
Light *light,
int lightId)
override;
90 void turnOffLight(
int lightId)
override;
92 void createTexture(
Texture *texture,
const uint8 *data,
const CMap *cmap,
bool clamp)
override;
93 void selectTexture(
const Texture *texture)
override;
94 void destroyTexture(
Texture *texture)
override;
96 void createBitmap(
BitmapData *bitmap)
override;
97 void drawBitmap(
const Bitmap *bitmap,
int x,
int y, uint32 layer)
override;
98 void destroyBitmap(
BitmapData *bitmap)
override;
100 void createFont(
Font *font)
override;
101 void destroyFont(
Font *font)
override;
103 void drawTextObject(
const TextObject *text)
override;
104 void createTextObject(
TextObject *text)
override;
105 void destroyTextObject(
TextObject *text)
override;
107 void dimScreen()
override;
108 void dimRegion(
int x,
int y,
int w,
int h,
float level)
override;
109 void irisAroundRegion(
int x1,
int y1,
int x2,
int y2)
override;
111 Bitmap *getScreenshot(
int w,
int h,
bool useStored)
override;
112 void storeDisplay()
override;
113 void copyStoredToDisplay()
override;
115 void drawEmergString(
int x,
int y,
const char *text,
const Color &fgColor)
override;
116 void loadEmergFont()
override;
121 void drawDimPlane()
override;
125 void drawMovieFrame(
int offsetX,
int offsetY)
override;
126 void releaseMovieFrame()
override;
128 void setBlendMode(
bool additive)
override;
131 void createSpecialtyTextureFromScreen(uint
id, uint8 *data,
int x,
int y,
int width,
int height)
override;
135 TinyGL::BlitImage *_emergFont[96];
136 TinyGL::BlitImage *_smushImage;
139 const Actor *_currentActor;
142 void readPixels(
int x,
int y,
int width,
int height, uint8 *buffer);
Definition: modelemi.h:82
Definition: textobject.h:84
Definition: gfx_base.h:62
Definition: formatinfo.h:28
Definition: modelemi.h:55
Definition: colormap.h:35
Definition: primitives.h:34
Actor represents a 3D character on screen.
Definition: actor.h:72
Definition: gfx_tinygl.h:39
Definition: material.h:31