GFXGLVertexBuffer Class Reference

#include <gfxGLVertexBuffer.h>

Inheritance diagram for GFXGLVertexBuffer:

Inheritance graph
[legend]
List of all members.

Detailed Description

This is a vertex buffer which uses GL_ARB_vertex_buffer_object.


Public Member Functions

 GFXGLVertexBuffer (GFXDevice *device, U32 numVerts, U32 vertexType, U32 vertexSize, GFXBufferType bufferType)
 ~GFXGLVertexBuffer ()
virtual void lock (U32 vertexStart, U32 vertexEnd, void **vertexPtr)
 calls glMapBuffer and offsets the pointer by vertex start
virtual void unlock ()
 calls glUnmapBuffer, unbinds the buffer
virtual void prepare ()
 Binds the buffer.
virtual void finish ()
 We're done here.
GLvoidgetBuffer ()
 returns NULL
virtual void zombify ()
 When called the resource should destroy all device sensitive information (e.g. D3D resources in D3DPOOL_DEFAULT.
virtual void resurrect ()
 When called the resource should restore all device sensitive information destroyed by zombify().

Private Attributes

GLuint mBuffer
 GL buffer handle.
U8mZombieCache

Friends

class GFXGLDevice


Constructor & Destructor Documentation

GFXGLVertexBuffer::GFXGLVertexBuffer ( GFXDevice device,
U32  numVerts,
U32  vertexType,
U32  vertexSize,
GFXBufferType  bufferType 
)

GFXGLVertexBuffer::~GFXGLVertexBuffer (  ) 


Member Function Documentation

virtual void GFXGLVertexBuffer::lock ( U32  vertexStart,
U32  vertexEnd,
void **  vertexPtr 
) [virtual]

calls glMapBuffer and offsets the pointer by vertex start

Implements GFXVertexBuffer.

virtual void GFXGLVertexBuffer::unlock (  )  [virtual]

calls glUnmapBuffer, unbinds the buffer

Implements GFXVertexBuffer.

virtual void GFXGLVertexBuffer::prepare (  )  [virtual]

Binds the buffer.

Implements GFXVertexBuffer.

virtual void GFXGLVertexBuffer::finish (  )  [virtual]

We're done here.

GLvoid* GFXGLVertexBuffer::getBuffer (  ) 

returns NULL

virtual void GFXGLVertexBuffer::zombify (  )  [virtual]

When called the resource should destroy all device sensitive information (e.g. D3D resources in D3DPOOL_DEFAULT.

Implements GFXResource.

virtual void GFXGLVertexBuffer::resurrect (  )  [virtual]

When called the resource should restore all device sensitive information destroyed by zombify().

Implements GFXResource.


Friends And Related Function Documentation

friend class GFXGLDevice [friend]


Member Data Documentation

GL buffer handle.