Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

OpenGLObject Class Reference

#include <OpenGLObject.h>

Inherits Object.

Inherited by Box, Cubemap, MilkShapeObject, Sphere, and Tube.

Inheritance diagram for OpenGLObject:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 OpenGLObject ()
 ~OpenGLObject ()
bool createVertexBuffer ()
bool clearVertexBuffer ()
void draw ()

Protected Attributes

GLuint vertexBufferID
GLuint indiceBufferID

Detailed Description

OpenGLObject.h

Author: Petter Alstermark, petter@alstermark.com

Definition at line 13 of file OpenGLObject.h.


Constructor & Destructor Documentation

OpenGLObject::OpenGLObject  ) 
 

Definition at line 13 of file OpenGLObject.cpp.

References indiceBufferID, and vertexBufferID.

OpenGLObject::~OpenGLObject  ) 
 

Definition at line 18 of file OpenGLObject.cpp.


Member Function Documentation

bool OpenGLObject::clearVertexBuffer  ) 
 

Definition at line 45 of file OpenGLObject.cpp.

References GL_ARB_vertex_buffer_object_supported, glDeleteBuffersARB, indiceBufferID, LOG_ERROR, LOG_SUCCESS, and vertexBufferID.

Referenced by ObjLevel::clearVertexBuffer(), Play::unload(), Menu::unload(), and Join::unload().

bool OpenGLObject::createVertexBuffer  ) 
 

Definition at line 21 of file OpenGLObject.cpp.

References GL_ARB_vertex_buffer_object_supported, GL_ARRAY_BUFFER_ARB, GL_ELEMENT_ARRAY_BUFFER_ARB, GL_STATIC_DRAW_ARB, glBindBufferARB, glBufferDataARB, glGenBuffersARB, indiceBufferID, Object::indices, Object::indiceSize, LOG_ERROR, LOG_SUCCESS, Object::nIndices, Object::nVertices, vertexBufferID, Object::vertexSize, and Object::vertices.

Referenced by ObjLevel::createVertexBuffer().

void OpenGLObject::draw  )  [virtual]
 

GL_UNSIGNED_BYTE

Implements Object.

Definition at line 58 of file OpenGLObject.cpp.

References arrayGLFormat, arrayGLPrimitive, arrayGLType, ATT_COLOR, ATT_NORMAL, ATT_TEX, ATT_VERTEX, Format::attFormat, Format::attType, Object::formats, Set< TYPE >::getCount(), GL_ARB_vertex_buffer_object_supported, GL_ARRAY_BUFFER_ARB, GL_ELEMENT_ARRAY_BUFFER_ARB, glBindBufferARB, indiceBufferID, Object::indices, Object::nIndices, Object::nVertices, Format::offset, Object::primitive, Format::size, vertexBufferID, Object::vertexSize, and Object::vertices.

Referenced by ObjLevel::draw(), Menu::drawCreate(), ObjLevel::drawFloor(), Menu::drawFrame(), Join::drawFrame(), Play::drawGrenades(), Menu::drawJoin(), Join::drawLevels(), Menu::drawMain(), Play::drawPlayer(), Play::drawProjectiles(), Menu::drawSelection(), Menu::drawSettings(), ObjLevel::drawShadow(), ObjLevel::drawWalls(), ObjLevel::drawWater(), and ObjLevel::drawWaterSurface().

Here is the call graph for this function:


Member Data Documentation

GLuint OpenGLObject::indiceBufferID [protected]
 

Definition at line 24 of file OpenGLObject.h.

Referenced by clearVertexBuffer(), createVertexBuffer(), draw(), and OpenGLObject().

GLuint OpenGLObject::vertexBufferID [protected]
 

Definition at line 23 of file OpenGLObject.h.

Referenced by clearVertexBuffer(), createVertexBuffer(), draw(), and OpenGLObject().


Generated on Sun Jun 5 15:50:32 2005 for Defacto by  doxygen 1.4.3