7 #ifndef __opengl_DrawOpenGL_h__ 8 #define __opengl_DrawOpenGL_h__ 10 #define DGL_CYLINDER_GLU FALSE // replace default with glu version 11 #define DGL_SPHERE_GLU TRUE // replace default with glu version 13 #define DGL_DEFAULT_TEXTURE_SIZE 256 33 void initialize(
void);
35 virtual BWORD
isDirect(
void)
const {
return m_isDirect; }
36 virtual void flush(
void);
38 virtual void pushMatrixState(
void);
39 virtual void popMatrixState(
void);
41 virtual void pushMatrix(MatrixMode a_mode,Real a_values[16]);
42 virtual void popMatrix(MatrixMode a_mode);
44 virtual void unbindVertexArray(
void);
46 virtual void setBrightness(Real a_brightness);
47 virtual void setContrast(Real a_contrast);
55 virtual Real multiplication(
void);
61 BWORD multicolor,
const Color *color,
69 BWORD multicolor,
const Color *color,
70 BWORD multiradius,
const Real *radius,
71 const Vector3i *element,U32 elementCount,
78 const Vector2 *texture,U32 vertices,
86 virtual void drawRectangles(
const SpatialVector *vertex,U32 vertices,
87 BWORD multicolor,
const Color *color);
95 Real baseScale,
const Color &color,U32 slices)
96 { drawCylinderGLU(transform,scale,baseScale,
103 { drawSphereGLU(transform,scale,color); }
106 using DrawCommon::drawTransformedPoints;
108 virtual void drawTransformedPoints(
113 BWORD multicolor,
const Color *color,
116 using DrawCommon::drawTransformedLines;
118 virtual void drawTransformedLines(
124 BWORD multicolor,
const Color *color,
125 BWORD multiradius,
const Real *radius,
126 const Vector3i *element,U32 elementCount,
129 using DrawCommon::drawTransformedTriangles;
131 virtual void drawTransformedTriangles(
137 U32 vertices,
StripMode strip,BWORD multicolor,
151 virtual void createDefaultView(
void);
153 virtual void drawPolys(U32 grain,
const SpatialVector *vertex,
157 BWORD multicolor,
const Color *color,
165 const Vector2 *texture,U32 vertices,
167 BWORD multicolor,
const Color *color,
168 BWORD multiradius,
const Real *radius,
169 const Vector3i *element,U32 elementCount,
178 virtual ~Texture(
void);
184 const GLvoid* m_pData;
195 virtual ~Buffer(
void);
196 void releaseAll(
void);
200 GLuint m_vboVertexMap;
206 cl_mem m_clMemVertex;
212 sp<Texture> getTexture(GLsizei a_width,GLsizei a_height,
213 GLenum a_format,GLenum a_type,
214 const GLvoid* a_pData,I32 a_serial);
216 void assureFont(
void);
218 void threadLock(
void);
219 void threadUnlock(
void);
221 void bindTexture(
sp<ImageI> spImageI,I32 imageID);
225 Real baseScale,
const Color &color,U32 slices);
233 const Vector2 *texture,U32 vertices,
234 BWORD multicolor,
const Color *color,
236 BWORD normals,BWORD blending);
239 BWORD multicolor,
const Color *color,
243 void setupLights(
void);
244 void createDefaultTexture(
void);
245 void useDefaultTexture(
void);
246 void pushAntialiasPoints(
void);
247 void pushAntialiasLines(
void);
248 void pushBlending(
void);
249 void activateBlending(
void);
250 void queryFormat(
sp<ImageI> spImageI,GLenum& format,
251 GLenum& type,GLint& components);
254 BWORD texture,BWORD frontcull,BWORD backcull,
257 static void checkForError(
String a_location);
260 I32 m_currentTextureId;
262 Real m_multiplication;
265 GLUquadric* m_pQuadric;
268 GLubyte m_defaultTextureData[DGL_DEFAULT_TEXTURE_SIZE]
269 [DGL_DEFAULT_TEXTURE_SIZE][3];
271 std::map< const void*, sp<Texture> > m_textureTable;
virtual void drawPoints(const SpatialVector *vertex, const SpatialVector *normal, U32 vertices, BWORD multicolor, const Color *color)
Draw points vertex[vertices].
Definition: DrawCommon.cc:222
Drawing functions not specific to the graphics language.
Definition: DrawCommon.h:32
kernel
Definition: namespace.dox:3
Dictionary of Arbitrary Instances.
Definition: Catalog.h:24
StripMode
Format of vertices for tri-stripping.
Definition: DrawI.h:26
GPU cache.
Definition: DrawBufferI.h:20
virtual void drawTriangles(const SpatialVector *vertex, const SpatialVector *normal, const Vector2 *texture, U32 vertices, StripMode strip, BWORD multicolor, const Color *color)
Draw triangles.
Definition: DrawCommon.cc:257
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
Special vector for color (RGBA)
Definition: Color.h:21
virtual BWORD isDirect(void) const
Returns TRUE is display is local and rendered directly.
Definition: DrawOpenGL.h:35
Automatically reference-counted string container.
Definition: String.h:128
OpenGL-specific implementations for DrawI.
Definition: DrawOpenGL.h:25
virtual void drawLines(const SpatialVector *vertex, const SpatialVector *normal, U32 vertices, StripMode strip, BWORD multicolor, const Color *color)
Draw lines.
Definition: DrawCommon.cc:238
DrawStyle
Rendering schemes that an an implementation may recognize.
Definition: DrawMode.h:42
Base for all interfacable components.
Definition: Component.h:20
virtual sp< FontI > font(void)
Get current font.
Definition: DrawOpenGL.h:51
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192