From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/a03696.html | 1550 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1550 insertions(+) create mode 100644 docs/doxygen/nel/a03696.html (limited to 'docs/doxygen/nel/a03696.html') diff --git a/docs/doxygen/nel/a03696.html b/docs/doxygen/nel/a03696.html new file mode 100644 index 00000000..015d7c9e --- /dev/null +++ b/docs/doxygen/nel/a03696.html @@ -0,0 +1,1550 @@ + + +NeL: NL3D::CVertexBufferHardGLMapObjectATI class Reference + + + +
+

NL3D::CVertexBufferHardGLMapObjectATI Class Reference

#include <driver_opengl_vertex_buffer_hard.h> +

+

Inheritance diagram for NL3D::CVertexBufferHardGLMapObjectATI: +

+ +NL3D::IVertexBufferHardGL +NL3D::IVertexBufferHard +NLMISC::CRefCount + +

Detailed Description

+vb hard using the ATI_map_object_buffer extension. Buffer are kept separate rather than managed in a heap +

+ +

+Definition at line 401 of file driver_opengl_vertex_buffer_hard.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Types

enum  TVBType { NVidiaVB, +ATIVB, +ATIMapObjectVB, +UnknownVB + }

Public Member Functions

 CVertexBufferHardGLMapObjectATI (CDriverGL *drv)
uint getATIValueOffset (uint value)
uint getATIVertexObjectId () const
 get Handle of the ATI buffer.

const sintgetRefCount () const
void initFormat (uint16 vertexFormat, const uint8 *typeArray, uint32 numVertices, const uint8 *uvRouting)
void initGL (CVertexArrayRangeMapObjectATI *var, uint vertexObjectID)
virtual ~CVertexBufferHardGLMapObjectATI ()
Implementation
virtual void disable ()
virtual void enable ()
virtual void * lock ()
virtual void lockHintStatic (bool staticLock)
virtual void unlock (uint startVert, uint endVert)
virtual void unlock ()

Data Fields

sint crefs
bool GPURenderingAfterFence
CPtrInfo * pinfo
TVBType VBType

Static Public Attributes

CPtrInfo NullPtrInfo

Protected Attributes

CDriverGL_Driver
uint16 _Flags
uint16 _InternalFlags
std::string _Name
uint32 _NbVerts
uint16 _Offset [CVertexBuffer::NumValue]
uint8 _Pad
uint8 _Type [CVertexBuffer::NumValue]
uint8 _UVRouting [CVertexBuffer::MaxStage]
uint16 _VertexSize

Private Attributes

CVertexArrayRangeMapObjectATI_VertexArrayRange
uint _VertexObjectId
void * _VertexPtr

Friends

struct CPtrInfo
+


Member Enumeration Documentation

+

+ + + + +
+ + +
enum NL3D::IVertexBufferHardGL::TVBType [inherited] +
+
+ + + + + +
+   + + +

+

Enumeration values:
+ + + + + +
NVidiaVB  +
ATIVB  +
ATIMapObjectVB  +
UnknownVB  +
+
+ +

+Definition at line 95 of file driver_opengl_vertex_buffer_hard.h. +

+

+


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + + +
NL3D::CVertexBufferHardGLMapObjectATI::CVertexBufferHardGLMapObjectATI CDriverGL drv  ) 
+
+ + + + + +
+   + + +

+ +

+Definition at line 812 of file driver_opengl_vertex_buffer_hard.cpp. +

+

00812                                                                                :  IVertexBufferHardGL(drv),
+00813                                                                                                                                                                         _VertexObjectId(0),
+00814                                                                                                                                                                         _VertexPtr(NULL),
+00815                                                                                                                                                                         _VertexArrayRange(NULL)
+00816 {       
+00817         // Flag our type
+00818         VBType = ATIMapObjectVB;                
+00819 }
+
+

+ + + + +
+ + + + + + + + + +
NL3D::CVertexBufferHardGLMapObjectATI::~CVertexBufferHardGLMapObjectATI  )  [virtual]
+
+ + + + + +
+   + + +

+ +

+Definition at line 822 of file driver_opengl_vertex_buffer_hard.cpp. +

+References nglDeleteObjectBufferATI. +

+

00823 {
+00824         if (_VertexObjectId) nglDeleteObjectBufferATI(_VertexObjectId);
+00825 }
+
+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + +
void NL3D::CVertexBufferHardGLMapObjectATI::disable  )  [virtual]
+
+ + + + + +
+   + + +

+ +

+Implements NL3D::IVertexBufferHardGL. +

+Definition at line 862 of file driver_opengl_vertex_buffer_hard.cpp. +

+References NL3D::CDriverGL::_CurrentVertexBufferHard. +

+

00863 {
+00864         if(_Driver->_CurrentVertexBufferHard != NULL)
+00865         {
+00866                 /* nlassert(_VertexArrayRange);
+00867                 _VertexArrayRange->disable(); */
+00868                 _Driver->_CurrentVertexBufferHard= NULL;
+00869         }
+00870 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CVertexBufferHardGLMapObjectATI::enable  )  [virtual]
+
+ + + + + +
+   + + +

+ +

+Implements NL3D::IVertexBufferHardGL. +

+Definition at line 851 of file driver_opengl_vertex_buffer_hard.cpp. +

+References NL3D::CDriverGL::_CurrentVertexBufferHard. +

+

00852 {
+00853         if(_Driver->_CurrentVertexBufferHard != this)
+00854         {
+00855                 /* nlassert(_VertexArrayRange);
+00856                 _VertexArrayRange->enable(); */
+00857                 _Driver->_CurrentVertexBufferHard= this;
+00858         }
+00859 }
+
+

+ + + + +
+ + + + + + + + + + +
uint NL3D::CVertexBufferHardGLMapObjectATI::getATIValueOffset uint  value  )  [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 425 of file driver_opengl_vertex_buffer_hard.h. +

+References NL3D::IVertexBufferHard::getValueOff(), uint, and value. +

+Referenced by NL3D::CVertexBufferInfo::setupVertexBufferHard(). +

+

00426         {                               
+00427                 return (uint) getValueOff (value);
+00428         }
+
+

+ + + + +
+ + + + + + + + + +
uint NL3D::CVertexBufferHardGLMapObjectATI::getATIVertexObjectId  )  const [inline]
+
+ + + + + +
+   + + +

+get Handle of the ATI buffer. +

+ +

+Definition at line 431 of file driver_opengl_vertex_buffer_hard.h. +

+References uint. +

+Referenced by NL3D::CVertexBufferInfo::setupVertexBufferHard(). +

+

00431 { return _VertexObjectId;}
+
+

+ + + + +
+ + + + + + + + + + +
const std::string& NL3D::IVertexBufferHard::getName void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 120 of file vertex_buffer_hard.h. +

+Referenced by NL3D::CDriverGL::profileVBHardAllocation(). +

+

00120 {return _Name;}
+
+

+ + + + +
+ + + + + + + + + + +
uint32 NL3D::IVertexBufferHard::getNumVertices void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 54 of file vertex_buffer_hard.h. +

+References uint32. +

+Referenced by NL3D::CDriverGL::activeVertexBufferHard(), NL3D::CVertexArrayRangeMapObjectATI::createVBHardGL(), NL3D::CVertexArrayRangeATI::createVBHardGL(), NL3D::CVertexArrayRangeNVidia::createVBHardGL(), NL3D::CDriverGL::profileVBHardAllocation(), NL3D::CNearVertexBufferInfo::setupVertexBufferHard(), NL3D::CFarVertexBufferInfo::setupVertexBufferHard(), NL3D::CVertexBufferInfo::setupVertexBufferHard(), and NL3D::CVertexBufferHardGLATI::unlock(). +

+

00054 {return(_NbVerts);}
+
+

+ + + + +
+ + + + + + + + + +
uint8 NL3D::IVertexBufferHard::getNumWeight  )  const [inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 76 of file vertex_buffer_hard.cpp. +

+References uint8. +

+Referenced by NL3D::CVertexBufferInfo::setupVertexBufferHard(). +

+

00077 {
+00078         // Num weight
+00079         switch (_Type[CVertexBuffer::Weight])
+00080         {
+00081         case CVertexBuffer::Float1:
+00082                 return 1;
+00083         case CVertexBuffer::Float2:
+00084                 return 2;
+00085         case CVertexBuffer::Float3:
+00086                 return 3;
+00087         case CVertexBuffer::Float4:
+00088                 return 4;
+00089         }
+00090 
+00091         // No weight
+00092         return 0;
+00093 }
+
+

+ + + + +
+ + + + + + + + + +
const sint& NLMISC::CRefCount::getRefCount  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 70 of file smart_ptr.h. +

+References NLMISC::CRefCount::crefs, and sint. +

+

00071         {
+00072                 return  crefs;
+00073         }
+
+

+ + + + +
+ + + + + + + + + +
const uint8* NL3D::IVertexBufferHard::getUVRouting  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 57 of file vertex_buffer_hard.h. +

+References uint8. +

+Referenced by NL3D::CVertexBufferInfo::setupVertexBufferHard(). +

+

00057 { return _UVRouting; }
+
+

+ + + + +
+ + + + + + + + + + +
sint NL3D::IVertexBufferHard::getValueOff uint  value  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+NB: the order of those methods follow the order in memory of the elements:

    +
  • VertexCoord
  • NormalCoord
  • TexCoord
  • Color
  • Specular
  • Weight
  • PaletteSkin NB: same order as in CVertexBuffer.
+ +

+Definition at line 82 of file vertex_buffer_hard.h. +

+References nlassert, sint, uint, and value. +

+Referenced by getATIValueOffset(), NL3D::CVertexBufferHardGLATI::getATIValueOffset(), NL3D::CVertexBufferHardGLNVidia::getNVidiaValueEx(), NL3D::CNearVertexBufferInfo::setupVertexBufferHard(), and NL3D::CFarVertexBufferInfo::setupVertexBufferHard(). +

+

00082 {nlassert(_Flags & (1<<value)); return _Offset[value];}
+
+

+ + + + +
+ + + + + + + + + + +
CVertexBuffer::TType NL3D::IVertexBufferHard::getValueType uint  value  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 55 of file vertex_buffer_hard.h. +

+References nlassert, uint, and value. +

+Referenced by NL3D::CVertexBufferInfo::setupVertexBufferHard(). +

+

00055 { nlassert (value<CVertexBuffer::NumValue); return((CVertexBuffer::TType)_Type[value]); }
+
+

+ + + + +
+ + + + + + + + + + +
uint16 NL3D::IVertexBufferHard::getVertexFormat void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 52 of file vertex_buffer_hard.h. +

+References uint16. +

+Referenced by NL3D::CDriverGL::activeVertexBufferHard(), NL3D::CNearVertexBufferInfo::setupVertexBufferHard(), NL3D::CFarVertexBufferInfo::setupVertexBufferHard(), and NL3D::CVertexBufferInfo::setupVertexBufferHard(). +

+

00052 { return(_Flags); }
+
+

+ + + + +
+ + + + + + + + + + +
uint16 NL3D::IVertexBufferHard::getVertexSize void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 53 of file vertex_buffer_hard.h. +

+References uint16. +

+Referenced by NL3D::CMeshMRMGeom::applyGeomorph(), NL3D::CVertexArrayRangeMapObjectATI::createVBHardGL(), NL3D::CVertexArrayRangeATI::createVBHardGL(), NL3D::CVertexArrayRangeNVidia::createVBHardGL(), NL3D::CDriverGL::profileVBHardAllocation(), NL3D::CNearVertexBufferInfo::setupVertexBufferHard(), NL3D::CFarVertexBufferInfo::setupVertexBufferHard(), NL3D::CVertexBufferInfo::setupVertexBufferHard(), and NL3D::CVertexBufferHardGLATI::unlock(). +

+

00053 {return(_VertexSize);}
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::IVertexBufferHardGL::initFormat uint16  vertexFormat,
const uint8 typeArray,
uint32  numVertices,
const uint8 uvRouting
[inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Reimplemented from NL3D::IVertexBufferHard. +

+Definition at line 104 of file driver_opengl_vertex_buffer_hard.h. +

+References uint16, uint32, and uint8. +

+Referenced by NL3D::CVertexArrayRangeMapObjectATI::createVBHardGL(), NL3D::CVertexArrayRangeATI::createVBHardGL(), and NL3D::CVertexArrayRangeNVidia::createVBHardGL(). +

+

00105         {
+00106                 IVertexBufferHard::initFormat(vertexFormat, typeArray, numVertices, uvRouting);
+00107         }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CVertexBufferHardGLMapObjectATI::initGL CVertexArrayRangeMapObjectATI var,
uint  vertexObjectID
+
+ + + + + +
+   + + +

+setup ptrs allocated by createVBHard() +

+Definition at line 873 of file driver_opengl_vertex_buffer_hard.cpp. +

+References uint. +

+Referenced by NL3D::CVertexArrayRangeMapObjectATI::createVBHardGL(). +

+

00874 {
+00875         _VertexArrayRange = var;
+00876         _VertexObjectId = vertexObjectID;
+00877 }
+
+

+ + + + +
+ + + + + + + + + +
void * NL3D::CVertexBufferHardGLMapObjectATI::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 828 of file driver_opengl_vertex_buffer_hard.cpp. +

+References nglMapObjectBufferATI. +

+

00829 {
+00830         if (_VertexPtr) return _VertexPtr; // already locked
+00831         if (!_VertexObjectId) return NULL;
+00832         _VertexPtr = nglMapObjectBufferATI(_VertexObjectId);
+00833         return _VertexPtr;
+00834 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CVertexBufferHardGLMapObjectATI::lockHintStatic bool  staticLock  )  [virtual]
+
+ + + + + +
+   + + +

+Indicate what kind of lock to be done on this VertexBuffer (whatever AGP or VRAM buffer) User should set to true if the VBHard is static: nevers change or very rarely. NVidia OpenGL implementation: "Static lock" are slower, but no fences are inserted after a render with this VVBHard, hence, no slowdown because 1/ of fence overhead insertion 2/ of NVidia swapBuffers() and fence issues on GeForce2 cards. Default is false +

+Implements NL3D::IVertexBufferHard. +

+Definition at line 880 of file driver_opengl_vertex_buffer_hard.cpp. +

+

00881 {
+00882         // no op.
+00883 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::IVertexBufferHard::setName const std::string &  name  )  [inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 96 of file vertex_buffer_hard.cpp. +

+

00097 {
+00098         _Name= name;
+00099 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CVertexBufferHardGLMapObjectATI::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 845 of file driver_opengl_vertex_buffer_hard.cpp. +

+References uint, and unlock(). +

+

00846 {
+00847         unlock(); // can't do a lock on a range of the vb..
+00848 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CVertexBufferHardGLMapObjectATI::unlock  )  [virtual]
+
+ + + + + +
+   + + +

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

+Implements NL3D::IVertexBufferHard. +

+Definition at line 837 of file driver_opengl_vertex_buffer_hard.cpp. +

+References nglUnmapObjectBufferATI. +

+Referenced by unlock(). +

+

00838 {
+00839         if (!_VertexObjectId || !_VertexPtr) return;
+00840         nglUnmapObjectBufferATI(_VertexObjectId);
+00841         _VertexPtr = NULL;
+00842 }
+
+


Friends And Related Function Documentation

+

+ + + + +
+ + +
friend struct CPtrInfo [friend, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 67 of file smart_ptr.h.

+


Field Documentation

+

+ + + + +
+ + +
CDriverGL* NL3D::IVertexBufferHardGL::_Driver [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 111 of file driver_opengl_vertex_buffer_hard.h.

+

+ + + + +
+ + +
uint16 NL3D::IVertexBufferHard::_Flags [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 134 of file vertex_buffer_hard.h.

+

+ + + + +
+ + +
uint16 NL3D::IVertexBufferHard::_InternalFlags [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 137 of file vertex_buffer_hard.h.

+

+ + + + +
+ + +
std::string NL3D::IVertexBufferHard::_Name [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 146 of file vertex_buffer_hard.h.

+

+ + + + +
+ + +
uint32 NL3D::IVertexBufferHard::_NbVerts [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 140 of file vertex_buffer_hard.h.

+

+ + + + +
+ + +
uint16 NL3D::IVertexBufferHard::_Offset[CVertexBuffer::NumValue] [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 143 of file vertex_buffer_hard.h.

+

+ + + + +
+ + +
uint8 NL3D::IVertexBufferHard::_Pad [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 128 of file vertex_buffer_hard.h.

+

+ + + + +
+ + +
uint8 NL3D::IVertexBufferHard::_Type[CVertexBuffer::NumValue] [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 127 of file vertex_buffer_hard.h.

+

+ + + + +
+ + +
uint8 NL3D::IVertexBufferHard::_UVRouting[CVertexBuffer::MaxStage] [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 153 of file vertex_buffer_hard.h.

+

+ + + + +
+ + +
CVertexArrayRangeMapObjectATI* NL3D::CVertexBufferHardGLMapObjectATI::_VertexArrayRange [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 438 of file driver_opengl_vertex_buffer_hard.h.

+

+ + + + +
+ + +
uint NL3D::CVertexBufferHardGLMapObjectATI::_VertexObjectId [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 436 of file driver_opengl_vertex_buffer_hard.h.

+

+ + + + +
+ + +
void* NL3D::CVertexBufferHardGLMapObjectATI::_VertexPtr [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 437 of file driver_opengl_vertex_buffer_hard.h.

+

+ + + + +
+ + +
uint16 NL3D::IVertexBufferHard::_VertexSize [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 131 of file vertex_buffer_hard.h.

+

+ + + + +
+ + +
sint NLMISC::CRefCount::crefs [mutable, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 79 of file smart_ptr.h. +

+Referenced by NLMISC::CRefCount::CRefCount(), NLMISC::CRefCount::getRefCount(), and NLMISC::CRefCount::~CRefCount().

+

+ + + + +
+ + +
bool NL3D::IVertexBufferHardGL::GPURenderingAfterFence [inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 99 of file driver_opengl_vertex_buffer_hard.h. +

+Referenced by NL3D::CDriverGL::fenceOnCurVBHardIfNeeded(), NL3D::IVertexBufferHardGL::IVertexBufferHardGL(), NL3D::CDriverGL::render(), NL3D::CDriverGL::renderOrientedQuads(), NL3D::CDriverGL::renderPoints(), NL3D::CDriverGL::renderQuads(), NL3D::CDriverGL::renderSimpleTriangles(), and NL3D::CDriverGL::renderTriangles().

+

+ + + + +
+ + +
CRefCount::CPtrInfo NLMISC::CRefCount::NullPtrInfo [static, inherited] +
+
+ + + + + +
+   + + +

+ +

+Referenced by NLMISC::CRefCount::CRefCount().

+

+ + + + +
+ + +
CPtrInfo* NLMISC::CRefCount::pinfo [mutable, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 80 of file smart_ptr.h. +

+Referenced by NLMISC::CRefCount::CRefCount(), and NLMISC::CRefCount::~CRefCount().

+

+ + + + +
+ + +
TVBType NL3D::IVertexBufferHardGL::VBType [inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 97 of file driver_opengl_vertex_buffer_hard.h. +

+Referenced by NL3D::CDriverGL::fenceOnCurVBHardIfNeeded(), NL3D::IVertexBufferHardGL::IVertexBufferHardGL(), and NL3D::CVertexBufferInfo::setupVertexBufferHard().

+


The documentation for this class was generated from the following files: +
Generated on Tue Mar 16 08:25:07 2004 for NeL by + +doxygen +1.3.6
+ + -- cgit v1.2.1