22 #ifndef PLAYGROUND3D_GFX_H 23 #define PLAYGROUND3D_GFX_H 25 #include "common/rect.h" 26 #include "common/system.h" 28 #include "math/frustum.h" 29 #include "math/matrix4.h" 30 #include "math/vector3d.h" 32 #include "graphics/surface.h" 33 #include "graphics/pixelformat.h" 42 virtual void init() = 0;
43 virtual void deinit() = 0;
44 virtual void clear(
const Math::Vector4d &clearColor) = 0;
53 void setupCameraPerspective(
float pitch,
float heading,
float fov);
55 static const int kOriginalWidth = 640;
56 static const int kOriginalHeight = 480;
58 void computeScreenViewport();
60 virtual void setupViewport(
int x,
int y,
int width,
int height) = 0;
66 virtual void drawCube(
const Math::Vector3d &pos,
const Math::Vector3d &roll) = 0;
67 virtual void drawPolyOffsetTest(
const Math::Vector3d &pos,
const Math::Vector3d &roll) = 0;
68 virtual void dimRegionInOut(
float fade) = 0;
69 virtual void drawInViewport() = 0;
70 virtual void drawRgbaTexture() = 0;
72 virtual void enableFog(
const Math::Vector4d &fogColor) = 0;
79 Math::Matrix4 _projectionMatrix;
80 Math::Matrix4 _modelViewMatrix;
81 Math::Matrix4 _mvpMatrix;
83 static const float cubeVertices[11 * 6 * 4];
86 Math::Matrix4 makeProjectionMatrix(
float fov,
float nearClip,
float farClip)
const;
96 #endif // PLAYGROUND3D_GFX_H
virtual void flipBuffer()
Definition: gfx.h:49