22 #ifndef TETRAEDGE_TE_TE_RENDERER_H 23 #define TETRAEDGE_TE_TE_RENDERER_H 25 #include "common/ptr.h" 26 #include "tetraedge/te/te_mesh.h" 27 #include "tetraedge/te/te_color.h" 28 #include "tetraedge/te/te_camera.h" 29 #include "tetraedge/te/te_matricies_stack.h" 46 ShadowModeCreating = 1,
53 _scissorEnabled(
false), _hasColor(
false), _glTexEnvMode(0), _zOrder(0.0f),
54 _sourceTransparentMesh(0), _scissorX(0), _scissorY(0),
55 _scissorWidth(0), _scissorHeight(0) {}
64 uint _sourceTransparentMesh;
79 ColorAndDepth = DepthBuffer | ColorBuffer,
80 AllBuffers = DepthBuffer | ColorBuffer | StencilBuffer
83 void addTransparentMesh(
const TeMesh &mesh, uint i1, uint i2, uint i3);
85 virtual void clearBuffer(
Buffer buf) = 0;
86 virtual void colorMask(
bool r,
bool g,
bool b,
bool a) = 0;
89 virtual void disableAllLights() = 0;
90 virtual void disableTexture() = 0;
91 virtual void disableWireFrame() = 0;
92 virtual void disableZBuffer() = 0;
94 virtual void enableAllLights() = 0;
95 virtual void enableTexture() = 0;
96 virtual void enableWireFrame() = 0;
97 virtual void enableZBuffer() = 0;
99 virtual void init(uint width, uint height) = 0;
100 void loadIdentityMatrix();
102 void loadCurrentMatrixToGL();
103 virtual void loadProjectionMatrix(
const TeMatrix4x4 &matrix) = 0;
105 void optimiseTransparentMeshProperties();
109 virtual void renderTransparentMeshes() = 0;
110 virtual void reset() = 0;
112 void rotate(
float angle,
float rx,
float ry,
float rz);
113 void scale(
float xs,
float ys,
float zs);
114 bool scissorEnabled()
const {
return _scissorEnabled; }
115 int scissorHeight()
const {
return _scissorHeight; }
116 int scissorWidth()
const {
return _scissorWidth; }
117 int scissorX()
const {
return _scissorX; }
118 int scissorY()
const {
return _scissorY; }
120 virtual void setClearColor(
const TeColor &col) = 0;
121 void setCurrentCamera(
TeCamera *camera) {
122 _currentCamera = camera;
124 virtual void setCurrentColor(
const TeColor &col) = 0;
125 virtual void setMatrixMode(
enum MatrixMode mode) = 0;
126 void setScissor(
int x,
int y,
int w,
int h);
127 void setScissorEnabled(
bool val) { _scissorEnabled = val; }
128 virtual void setViewport(
int x,
int y,
int w,
int h) = 0;
129 virtual void shadowMode(
enum ShadowMode mode) = 0;
130 enum ShadowMode shadowMode()
const {
return _shadowMode; }
131 void translate(
float x,
float y,
float z);
134 void dumpTransparentMeshProps()
const;
135 void dumpTransparentMeshData()
const;
136 const TeColor ¤tColor()
const {
return _currentColor; }
138 virtual void updateScreen() = 0;
139 virtual void updateGlobalLight() = 0;
140 virtual void applyMaterial(
const TeMaterial &m) = 0;
148 bool _textureEnabled;
150 ShadowMode _shadowMode;
151 MatrixMode _matrixMode;
153 bool _scissorEnabled;
159 uint _numTransparentMeshes;
166 int _pendingTransparentMeshProperties;
171 virtual void loadMatrixToGL(
const TeMatrix4x4 &matrix) = 0;
176 #endif // TETRAEDGE_TE_TE_RENDERER_H Definition: te_camera.h:38
Definition: detection.h:27
Definition: te_quaternion.h:32
Definition: te_color.h:30
Definition: te_matricies_stack.h:32
Definition: te_renderer.h:50
Definition: te_matrix4x4.h:37
Definition: te_renderer.h:33
Definition: te_material.h:35
Definition: te_vector3f32.h:33
Definition: display_client.h:113