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" 53 virtual void init() = 0;
54 virtual void deinit() = 0;
55 virtual void clear(
const Math::Vector4d &clearColor) = 0;
64 void setupCameraPerspective(
float pitch,
float heading,
float fov);
66 static const int kOriginalWidth = 640;
67 static const int kOriginalHeight = 480;
69 void computeScreenViewport();
71 virtual void setupViewport(
int x,
int y,
int width,
int height) = 0;
77 virtual void drawCube(
const Math::Vector3d &pos,
const Math::Vector3d &roll) = 0;
78 virtual void drawPolyOffsetTest(
const Math::Vector3d &pos,
const Math::Vector3d &roll) = 0;
79 virtual void dimRegionInOut(
float fade) = 0;
80 virtual void drawInViewport() = 0;
81 virtual void drawRgbaTexture() = 0;
83 virtual void enableFog(
const Math::Vector4d &fogColor) = 0;
84 virtual void disableFog() = 0;
86 virtual void enableScissor(
int x,
int y,
int width,
int height) = 0;
87 virtual void disableScissor() = 0;
94 Math::Matrix4 _projectionMatrix;
95 Math::Matrix4 _modelViewMatrix;
96 Math::Matrix4 _mvpMatrix;
98 static const float cubeVertices[11 * 6 * 4];
100 Math::Matrix4 makeProjectionMatrix(
float fov,
float nearClip,
float farClip)
const;
110 #endif // PLAYGROUND3D_GFX_H
virtual void flipBuffer()
Definition: gfx.h:60