NL3D::CVertexArrayRangeATI Class Reference

Work only if ATIVertexArrayObject is enabled. More...

#include <driver_opengl_vertex_buffer_hard.h>

Inherits NL3D::IVertexArrayRange.

List of all members.

Public Member Functions

 CVertexArrayRangeATI (CDriverGL *drv)
void enable ()
 active this VertexArrayRange as the current vertex array range used.
void disable ()
 disable this VertexArrayRange.
void freeVB (void *ptr)
 free a VB allocated with allocateVB. No-op if NULL.
uint getATIVertexObjectId () const
 get Handle of the ATI buffer.
Implementation



virtual bool allocate (uint32 size, CVertexBuffer::TPreferredMemory vbType)
 allocate a vertex array sapce. false if error. must free before re-allocate.
virtual void free ()
 free this space.
virtual IVertexBufferHardGLcreateVBHardGL (uint size, CVertexBuffer *vb)
 create a IVertexBufferHardGL
virtual uint sizeAllocated () const
 return the size allocated. 0 if not allocated or failure

Private Member Functions

void * allocateVB (uint32 size)
 Allocate a small subset of the memory. NULL if not enough mem.

Private Attributes

uint _VertexObjectId
bool _Allocated
uint32 _VertexArraySize
NLMISC::CHeapMemory _HeapMemory

Detailed Description

Work only if ATIVertexArrayObject is enabled.

else, only call to ctor/dtor/free() is valid. any call to allocateVB() will return NULL.

Definition at line 253 of file driver_opengl_vertex_buffer_hard.h.


Constructor & Destructor Documentation

NL3D::CVertexArrayRangeATI::CVertexArrayRangeATI ( CDriverGL drv  ) 

Member Function Documentation

bool NL3D::CVertexArrayRangeATI::allocate ( uint32  size,
CVertexBuffer::TPreferredMemory  vbType 
) [virtual]
void * NL3D::CVertexArrayRangeATI::allocateVB ( uint32  size  )  [private]

Allocate a small subset of the memory. NULL if not enough mem.

Definition at line 599 of file driver_opengl_vertex_buffer_hard.cpp.

References _HeapMemory, NLMISC::CHeapMemory::allocate(), and H_AUTO_OGL.

Referenced by createVBHardGL().

IVertexBufferHardGL * NL3D::CVertexArrayRangeATI::createVBHardGL ( uint  size,
CVertexBuffer vb 
) [virtual]
void NL3D::CVertexArrayRangeATI::disable (  ) 

disable this VertexArrayRange.

_Driver->_CurrentVertexArrayRange= NULL; NB: no-op for ATI, but ensure correct _Driver->_CurrentVertexArrayRange value.

Definition at line 592 of file driver_opengl_vertex_buffer_hard.cpp.

References NL3D::CDriverGL::_CurrentVertexArrayRange, NL3D::IVertexArrayRange::_Driver, and H_AUTO_OGL.

Referenced by NL3D::CVertexBufferHardGLATI::disable().

void NL3D::CVertexArrayRangeATI::enable (  ) 

active this VertexArrayRange as the current vertex array range used.

no-op if already setup. NB: no-op for ATI, but ensure correct _Driver->_CurrentVertexArrayRange value.

Definition at line 585 of file driver_opengl_vertex_buffer_hard.cpp.

References NL3D::CDriverGL::_CurrentVertexArrayRange, NL3D::IVertexArrayRange::_Driver, and H_AUTO_OGL.

Referenced by NL3D::CVertexBufferHardGLATI::enable().

void NL3D::CVertexArrayRangeATI::free (  )  [virtual]
void NL3D::CVertexArrayRangeATI::freeVB ( void *  ptr  ) 

free a VB allocated with allocateVB. No-op if NULL.

Definition at line 605 of file driver_opengl_vertex_buffer_hard.cpp.

References _HeapMemory, NLMISC::CHeapMemory::free(), and H_AUTO_OGL.

Referenced by NL3D::CVertexBufferHardGLATI::~CVertexBufferHardGLATI().

uint NL3D::CVertexArrayRangeATI::getATIVertexObjectId (  )  const [inline]

get Handle of the ATI buffer.

Definition at line 287 of file driver_opengl_vertex_buffer_hard.h.

References _VertexObjectId.

Referenced by NL3D::CVertexBufferHardGLATI::getATIVertexObjectId().

uint NL3D::CVertexArrayRangeATI::sizeAllocated (  )  const [virtual]

return the size allocated. 0 if not allocated or failure

Implements NL3D::IVertexArrayRange.

Definition at line 524 of file driver_opengl_vertex_buffer_hard.cpp.

References _VertexArraySize, and H_AUTO_OGL.


Member Data Documentation

Definition at line 296 of file driver_opengl_vertex_buffer_hard.h.

Referenced by allocate(), allocateVB(), free(), and freeVB().


The documentation for this class was generated from the following files:

Generated on Thu Jan 7 08:30:15 2010 for NeL by  doxygen 1.6.1