# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CVertexBufferHardGLATI Class Reference

Work only if ARRAY_RANGE_NV is enabled. More...

#include <driver_opengl_vertex_buffer_hard.h>

Inheritance diagram for NL3D::CVertexBufferHardGLATI:

NL3D::IVertexBufferHardGL NL3D::IVertexBufferHard NLMISC::CRefCount List of all members.

Public Methods

 CVertexBufferHardGLATI (CDriverGL *drv)
virtual ~CVertexBufferHardGLATI ()
bool createRAMMirror (uint memSize)
 try to create a RAM mirror that 'll contain a copy of the VB. More...

void initGL (CVertexArrayRangeATI *var, void *vertexPtr)
 setup ptrs allocated by createVBHard(). More...

uint getATIValueOffset (uint value)
uint getATIVertexObjectId () const
 get Handle of the ATI buffer. More...

Implementation
virtual void * lock ()
 Lock the entire VertexBuffer. More...

virtual void unlock ()
 UnLock the VertexBuffer so the Gfx card can now use it. More...

virtual void unlock (uint startVert, uint endVert)
 Same as unlock() but give hints to driver on vertices that have changed. More...

virtual void enable ()
virtual void disable ()

Private Attributes

CVertexArrayRangeATI_VertexArrayRange
void * _VertexPtr
void * _RAMMirrorVertexPtr
uint _RAMMirrorVertexSize

Detailed Description

Work only if ARRAY_RANGE_NV is enabled.

Definition at line 297 of file driver_opengl_vertex_buffer_hard.h.


Constructor & Destructor Documentation

NL3D::CVertexBufferHardGLATI::CVertexBufferHardGLATI CDriverGL   drv
 

Definition at line 539 of file driver_opengl_vertex_buffer_hard.cpp.

References _RAMMirrorVertexPtr, _RAMMirrorVertexSize, _VertexArrayRange, _VertexPtr, and NL3D::IVertexBufferHardGL::ATIVertexBufferHard.

NL3D::CVertexBufferHardGLATI::~CVertexBufferHardGLATI   [virtual]
 

Definition at line 552 of file driver_opengl_vertex_buffer_hard.cpp.

References _RAMMirrorVertexPtr, _RAMMirrorVertexSize, _VertexArrayRange, and _VertexPtr.


Member Function Documentation

bool NL3D::CVertexBufferHardGLATI::createRAMMirror uint    memSize
 

try to create a RAM mirror that 'll contain a copy of the VB.

Definition at line 572 of file driver_opengl_vertex_buffer_hard.cpp.

References _RAMMirrorVertexPtr, and _RAMMirrorVertexSize.

void NL3D::CVertexBufferHardGLATI::disable   [virtual]
 

Implements NL3D::IVertexBufferHardGL.

Definition at line 652 of file driver_opengl_vertex_buffer_hard.cpp.

References NL3D::IVertexBufferHardGL::_Driver, _VertexArrayRange, and nlassert.

void NL3D::CVertexBufferHardGLATI::enable   [virtual]
 

Implements NL3D::IVertexBufferHardGL.

Definition at line 640 of file driver_opengl_vertex_buffer_hard.cpp.

References NL3D::IVertexBufferHardGL::_Driver, _VertexArrayRange, and nlassert.

uint NL3D::CVertexBufferHardGLATI::getATIValueOffset uint    value [inline]
 

Definition at line 324 of file driver_opengl_vertex_buffer_hard.h.

References NL3D_DRV_ATI_FAKE_MEM_START, nlassert, and value.

uint NL3D::CVertexBufferHardGLATI::getATIVertexObjectId   const [inline]
 

get Handle of the ATI buffer.

Definition at line 332 of file driver_opengl_vertex_buffer_hard.h.

Referenced by unlock.

void NL3D::CVertexBufferHardGLATI::initGL CVertexArrayRangeATI   var,
void *    vertexPtr
 

setup ptrs allocated by createVBHard().

Definition at line 594 of file driver_opengl_vertex_buffer_hard.cpp.

References _VertexArrayRange, and _VertexPtr.

void * NL3D::CVertexBufferHardGLATI::lock   [virtual]
 

Lock the entire VertexBuffer.

The returned buffer is a write only buffer. (undefined result if you read it). Write note:

  • for VRAM VertexBufferHard, you should write only one time, to init.
  • for AGP VertexBufferHard, you should write sequentially to take full advantage of the write combiners.
Returns:
the adress of the vertex 0. Use getVertexSize(), get*Off() ... to access any part of this VertexBuffer.

Implements NL3D::IVertexBufferHard.

Definition at line 602 of file driver_opengl_vertex_buffer_hard.cpp.

References _RAMMirrorVertexPtr.

void NL3D::CVertexBufferHardGLATI::unlock uint    startVert,
uint    endVert
[virtual]
 

Same as unlock() but give hints to driver on vertices that have changed.

Used by ATI-OpenGL drivers. NB: driver may still ignore this information, and so take into acount all vertices

Parameters:
startVert  the fisrt vertex to update
endVert  the last vertex (not included) to update => numVertices= vertEnd-vertBegin. Hence unlock() as the same effect as unlock(0, getNumVertices());

Implements NL3D::IVertexBufferHard.

Definition at line 619 of file driver_opengl_vertex_buffer_hard.cpp.

References _RAMMirrorVertexPtr, _VertexPtr, getATIVertexObjectId, NL3D::IVertexBufferHard::getNumVertices, NL3D::IVertexBufferHard::getVertexSize, GL_PRESERVE_ATI, nglUpdateObjectBufferATI, and NL3D_DRV_ATI_FAKE_MEM_START.

void NL3D::CVertexBufferHardGLATI::unlock   [virtual]
 

UnLock the VertexBuffer so the Gfx card can now use it.

Implements NL3D::IVertexBufferHard.

Definition at line 610 of file driver_opengl_vertex_buffer_hard.cpp.

References _RAMMirrorVertexPtr, _RAMMirrorVertexSize, _VertexPtr, getATIVertexObjectId, GL_PRESERVE_ATI, nglUpdateObjectBufferATI, and NL3D_DRV_ATI_FAKE_MEM_START.


Member Data Documentation

void* NL3D::CVertexBufferHardGLATI::_RAMMirrorVertexPtr [private]
 

Definition at line 339 of file driver_opengl_vertex_buffer_hard.h.

Referenced by createRAMMirror, CVertexBufferHardGLATI, lock, unlock, and ~CVertexBufferHardGLATI.

uint NL3D::CVertexBufferHardGLATI::_RAMMirrorVertexSize [private]
 

Definition at line 340 of file driver_opengl_vertex_buffer_hard.h.

Referenced by createRAMMirror, CVertexBufferHardGLATI, unlock, and ~CVertexBufferHardGLATI.

CVertexArrayRangeATI* NL3D::CVertexBufferHardGLATI::_VertexArrayRange [private]
 

Definition at line 337 of file driver_opengl_vertex_buffer_hard.h.

Referenced by CVertexBufferHardGLATI, disable, enable, initGL, and ~CVertexBufferHardGLATI.

void* NL3D::CVertexBufferHardGLATI::_VertexPtr [private]
 

Definition at line 338 of file driver_opengl_vertex_buffer_hard.h.

Referenced by CVertexBufferHardGLATI, initGL, unlock, and ~CVertexBufferHardGLATI.


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