22 #ifndef FREESCAPE_GFX_TINYGL_H 23 #define FREESCAPE_GFX_TINYGL_H 25 #include "math/vector3d.h" 26 #include "common/hashmap.h" 28 #include "freescape/gfx.h" 29 #include "freescape/gfx_tinygl_texture.h" 45 void copyToVertexArray(uint idx,
const Math::Vector3d &src) {
46 assert(idx < kVertexArraySize);
47 _verts[idx].x = src.x(); _verts[idx].y = src.y(); _verts[idx].z = src.z();
57 void copyToTexCoordArray(uint idx,
float x,
float y) {
58 assert(idx < kVertexArraySize);
59 _texCoord[idx].x = x; _texCoord[idx].y = y;
65 uint32 _lastColorSet0;
66 uint32 _lastColorSet1;
68 virtual void init()
override;
69 virtual void clear(uint8 r, uint8 g, uint8 b,
bool ignoreViewport =
false)
override;
70 virtual void setViewport(
const Common::Rect &rect)
override;
71 virtual void positionCamera(
const Math::Vector3d &pos,
const Math::Vector3d &interest)
override;
72 virtual void updateProjectionMatrix(
float fov,
float aspectRatio,
float nearClipPlane,
float farClipPlane)
override;
74 virtual void useColor(uint8 r, uint8 g, uint8 b)
override;
75 virtual void polygonOffset(
bool enabled)
override;
76 virtual void depthTesting(
bool enabled)
override;
77 virtual void setStippleData(byte *data)
override;
78 virtual void useStipple(
bool enabled)
override;
81 void freeTexture(
Texture *texture)
override;
83 void drawSkybox(
Texture *texture, Math::Vector3d camera)
override;
85 virtual void renderSensorShoot(byte color,
const Math::Vector3d sensor,
const Math::Vector3d player,
const Common::Rect viewPort)
override;
86 virtual void renderPlayerShootBall(byte color,
const Common::Point position,
int frame,
const Common::Rect viewPort)
override;
88 virtual void renderCrossair(
const Common::Point crossairPosition)
override;
92 void drawCelestialBody(Math::Vector3d position,
float radius, byte color)
override;
95 virtual void drawFloor(uint8 color)
override;
101 #endif // FREESCAPE_GFX_TINYGL_H
virtual void flipBuffer() override
Definition: gfx_tinygl.h:38
RenderMode
Definition: rendermode.h:48
virtual void positionCamera(const Math::Vector3d &pos, const Math::Vector3d &interest) override
Definition: gfx_tinygl_texture.h:49
Definition: gfx_tinygl.h:33
Definition: gfx_tinygl.h:50