NL3D::CVertexArrayRangeNVidia Class Reference

Work only if ARRAY_RANGE_NV is enabled. More...

#include <driver_opengl_vertex_buffer_hard.h>

Inherits NL3D::IVertexArrayRange.

List of all members.

Public Member Functions

 CVertexArrayRangeNVidia (CDriverGL *drv)
void enable ()
 active this VertexArrayRange as the current vertex array range used. no-op if already setup.
void disable ()
 disable this VertexArrayRange. _Driver->_CurrentVertexArrayRange= NULL;
void freeVB (void *ptr)
 free a VB allocated with allocateVB. No-op if NULL.
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

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

Private Attributes

void * _VertexArrayPtr
uint32 _VertexArraySize
NLMISC::CHeapMemory _HeapMemory

Detailed Description

Work only if ARRAY_RANGE_NV is enabled.

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

Definition at line 136 of file driver_opengl_vertex_buffer_hard.h.


Constructor & Destructor Documentation

NL3D::CVertexArrayRangeNVidia::CVertexArrayRangeNVidia ( CDriverGL drv  ) 

Member Function Documentation

bool NL3D::CVertexArrayRangeNVidia::allocate ( uint32  size,
CVertexBuffer::TPreferredMemory  vbType 
) [virtual]
bool NL3D::CVertexArrayRangeNVidia::allocated (  )  const [inline, private]

true if allocated.

Definition at line 174 of file driver_opengl_vertex_buffer_hard.h.

References _VertexArrayPtr.

Referenced by createVBHardGL().

void * NL3D::CVertexArrayRangeNVidia::allocateVB ( uint32  size  )  [private]

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

Definition at line 218 of file driver_opengl_vertex_buffer_hard.cpp.

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

Referenced by createVBHardGL().

IVertexBufferHardGL * NL3D::CVertexArrayRangeNVidia::createVBHardGL ( uint  size,
CVertexBuffer vb 
) [virtual]
void NL3D::CVertexArrayRangeNVidia::disable (  ) 
void NL3D::CVertexArrayRangeNVidia::enable (  ) 
void NL3D::CVertexArrayRangeNVidia::free (  )  [virtual]
void NL3D::CVertexArrayRangeNVidia::freeVB ( void *  ptr  ) 

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

Definition at line 226 of file driver_opengl_vertex_buffer_hard.cpp.

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

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

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

return the size allocated. 0 if not allocated or failure

Implements NL3D::IVertexArrayRange.

Definition at line 148 of file driver_opengl_vertex_buffer_hard.cpp.

References _VertexArraySize, and H_AUTO_OGL.


Member Data Documentation

Definition at line 171 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