NL3D::CVertexBufferInfo Class Reference

#include <driver_opengl.h>


Detailed Description

Info for the last VertexBuffer setuped (iether normal or hard).

Definition at line 168 of file driver_opengl.h.

Public Member Functions

void setupVertexBuffer (CVertexBuffer &vb)
void setupVertexBufferHard (IVertexBufferHardGL &vb)

Data Fields

uint ATIValueOffset [CVertexBuffer::NumValue]
bool ATIVBHardMode
uint ATIVertexObjectId
uint32 NumVertices
uint32 NumWeight
CVertexBuffer::TType Type [CVertexBuffer::NumValue]
uint8 UVRouting [CVertexBuffer::MaxStage]
void * ValuePtr [CVertexBuffer::NumValue]
uint16 VertexFormat
uint16 VertexSize


Member Function Documentation

void NL3D::CVertexBufferInfo::setupVertexBuffer CVertexBuffer vb  ) 
 

Definition at line 1075 of file driver_opengl_vertex.cpp.

References ATIVBHardMode, NL3D::CVertexBuffer::getNumVertices(), NL3D::CVertexBuffer::getNumWeight(), NL3D::CVertexBuffer::getUVRouting(), NL3D::CVertexBuffer::getValueEx(), NL3D::CVertexBuffer::getValueType(), NL3D::CVertexBuffer::getVertexFormat(), NL3D::CVertexBuffer::getVertexSize(), NumVertices, NumWeight, sint, Type, uint, uint8, UVRouting, ValuePtr, VertexFormat, and VertexSize.

Referenced by NL3D::CDriverGL::activeVertexBuffer().

01076 {
01077         sint    i;
01078         uint    flags= vb.getVertexFormat();
01079         VertexFormat= flags;
01080         VertexSize= vb.getVertexSize();
01081         NumVertices= vb.getNumVertices();
01082         NumWeight= vb.getNumWeight();
01083 
01084         // No VBhard.
01085         ATIVBHardMode= false;
01086 
01087         // Get value pointer
01088         for (i=0; i<CVertexBuffer::NumValue; i++)
01089         {
01090                 // Value used ?
01091                 if (VertexFormat&(1<<i))
01092                 {
01093                         // Get the pointer
01094                         ValuePtr[i]=vb.getValueEx ((CVertexBuffer::TValue)i);
01095 
01096                         // Type of the value
01097                         Type[i]=vb.getValueType (i);
01098                 }
01099         }
01100 
01101         // Copy the UVRouting table
01102         const uint8 *uvRouting = vb.getUVRouting();
01103         for (i=0; i<CVertexBuffer::MaxStage; i++)
01104         {
01105                 UVRouting[i] = uvRouting[i];
01106         }
01107 }

void NL3D::CVertexBufferInfo::setupVertexBufferHard IVertexBufferHardGL vb  ) 
 

Definition at line 1111 of file driver_opengl_vertex.cpp.

References ATIValueOffset, ATIVBHardMode, ATIVertexObjectId, NL3D::CVertexBufferHardGLMapObjectATI::getATIValueOffset(), NL3D::CVertexBufferHardGLATI::getATIValueOffset(), NL3D::CVertexBufferHardGLMapObjectATI::getATIVertexObjectId(), NL3D::CVertexBufferHardGLATI::getATIVertexObjectId(), NL3D::IVertexBufferHard::getNumVertices(), NL3D::IVertexBufferHard::getNumWeight(), NL3D::CVertexBufferHardGLNVidia::getNVidiaValueEx(), NL3D::IVertexBufferHard::getUVRouting(), NL3D::IVertexBufferHard::getValueType(), NL3D::IVertexBufferHard::getVertexFormat(), NL3D::IVertexBufferHard::getVertexSize(), NumVertices, NumWeight, sint, Type, uint, uint8, UVRouting, ValuePtr, NL3D::IVertexBufferHardGL::VBType, VertexFormat, and VertexSize.

Referenced by NL3D::CDriverGL::activeVertexBufferHard().

01112 {
01113         sint    i;
01114         uint    flags= vb.getVertexFormat();
01115         VertexFormat= flags;
01116         VertexSize= vb.getVertexSize();
01117         NumVertices= vb.getNumVertices();
01118         NumWeight= vb.getNumWeight();
01119 
01120         // Not ATI VBHard by default
01121         ATIVBHardMode= false;
01122 
01123         
01124         // Setup differs from ATI or NVidia VBHard.
01125         switch(vb.VBType)
01126         {
01127                 case IVertexBufferHardGL::NVidiaVB:
01128                 {
01129                         CVertexBufferHardGLNVidia       &vbHardNV= static_cast<CVertexBufferHardGLNVidia&>(vb);
01130                         // Get value pointer
01131                         for (i=0; i<CVertexBuffer::NumValue; i++)
01132                         {
01133                                 // Value used ?
01134                                 if (VertexFormat&(1<<i))
01135                                 {
01136                                         // Get the pointer
01137                                         ValuePtr[i]= vbHardNV.getNVidiaValueEx(i);
01138 
01139                                         // Type of the value
01140                                         Type[i]= vbHardNV.getValueType (i);
01141                                 }
01142                         }
01143                 }
01144                 break;
01145                 case IVertexBufferHardGL::ATIVB:
01146                 {
01147                         CVertexBufferHardGLATI  &vbHardATI= static_cast<CVertexBufferHardGLATI &>(vb);
01148                         // special setup in setupGlArrays()...
01149                         ATIVBHardMode= true;
01150 
01151                         // store the VertexObject Id.
01152                         ATIVertexObjectId= vbHardATI.getATIVertexObjectId();
01153 
01154                         // Get value offset
01155                         for (i=0; i<CVertexBuffer::NumValue; i++)
01156                         {
01157                                 // Value used ?
01158                                 if (VertexFormat&(1<<i))
01159                                 {
01160                                         // Get the pointer
01161                                         ATIValueOffset[i]= vbHardATI.getATIValueOffset(i);
01162 
01163                                         // Type of the value
01164                                         Type[i]= vbHardATI.getValueType (i);
01165                                 }
01166                         }
01167                 }
01168                 break;
01169                 case IVertexBufferHardGL::ATIMapObjectVB:
01170                 {
01171                         CVertexBufferHardGLMapObjectATI &vbHardATI= static_cast<CVertexBufferHardGLMapObjectATI &>(vb);
01172                         // special setup in setupGlArrays()...
01173                         ATIVBHardMode= true;
01174 
01175                         // store the VertexObject Id.
01176                         ATIVertexObjectId= vbHardATI.getATIVertexObjectId();
01177 
01178                         // Get value offset
01179                         for (i=0; i<CVertexBuffer::NumValue; i++)
01180                         {
01181                                 // Value used ?
01182                                 if (VertexFormat&(1<<i))
01183                                 {
01184                                         // Get the pointer
01185                                         ATIValueOffset[i]= vbHardATI.getATIValueOffset(i);
01186 
01187                                         // Type of the value
01188                                         Type[i]= vbHardATI.getValueType (i);
01189                                 }
01190                         }
01191                 }
01192                 break;
01193         }       
01194         
01195 
01196         // Copy the UVRouting table
01197         const uint8 *uvRouting = vb.getUVRouting ();
01198         for (i=0; i<CVertexBuffer::MaxStage; i++)
01199         {
01200                 UVRouting[i] = uvRouting[i];
01201         }
01202 }


Field Documentation

uint NL3D::CVertexBufferInfo::ATIValueOffset[CVertexBuffer::NumValue]
 

Definition at line 187 of file driver_opengl.h.

Referenced by NL3D::CDriverGL::setupGlArraysForEXTVertexShader(), NL3D::CDriverGL::setupGlArraysStd(), NL3D::CDriverGL::setupUVPtr(), and setupVertexBufferHard().

bool NL3D::CVertexBufferInfo::ATIVBHardMode
 

Definition at line 183 of file driver_opengl.h.

Referenced by NL3D::CDriverGL::setupGlArraysForEXTVertexShader(), NL3D::CDriverGL::setupGlArraysStd(), NL3D::CDriverGL::setupUVPtr(), setupVertexBuffer(), and setupVertexBufferHard().

uint NL3D::CVertexBufferInfo::ATIVertexObjectId
 

Definition at line 185 of file driver_opengl.h.

Referenced by NL3D::CDriverGL::setupGlArraysForEXTVertexShader(), NL3D::CDriverGL::setupGlArraysStd(), NL3D::CDriverGL::setupUVPtr(), and setupVertexBufferHard().

uint32 NL3D::CVertexBufferInfo::NumVertices
 

Definition at line 173 of file driver_opengl.h.

Referenced by setupVertexBuffer(), and setupVertexBufferHard().

uint32 NL3D::CVertexBufferInfo::NumWeight
 

Definition at line 174 of file driver_opengl.h.

Referenced by setupVertexBuffer(), and setupVertexBufferHard().

CVertexBuffer::TType NL3D::CVertexBufferInfo::Type[CVertexBuffer::NumValue]
 

Definition at line 175 of file driver_opengl.h.

Referenced by NL3D::CDriverGL::setupGlArraysForEXTVertexShader(), NL3D::CDriverGL::setupGlArraysForNVVertexProgram(), NL3D::CDriverGL::setupGlArraysStd(), NL3D::CDriverGL::setupUVPtr(), setupVertexBuffer(), and setupVertexBufferHard().

uint8 NL3D::CVertexBufferInfo::UVRouting[CVertexBuffer::MaxStage]
 

Definition at line 176 of file driver_opengl.h.

Referenced by NL3D::CDriverGL::setupGlArraysStd(), setupVertexBuffer(), and setupVertexBufferHard().

void* NL3D::CVertexBufferInfo::ValuePtr[CVertexBuffer::NumValue]
 

Definition at line 179 of file driver_opengl.h.

Referenced by NL3D::CDriverGL::setupGlArraysForEXTVertexShader(), NL3D::CDriverGL::setupGlArraysForNVVertexProgram(), NL3D::CDriverGL::setupGlArraysStd(), NL3D::CDriverGL::setupUVPtr(), setupVertexBuffer(), and setupVertexBufferHard().

uint16 NL3D::CVertexBufferInfo::VertexFormat
 

Definition at line 171 of file driver_opengl.h.

Referenced by NL3D::CDriverGL::beginLightMapMultiPass(), NL3D::CDriverGL::resetLightMapVertexSetup(), NL3D::CDriverGL::setupGlArrays(), NL3D::CDriverGL::setupGlArraysForEXTVertexShader(), NL3D::CDriverGL::setupGlArraysForNVVertexProgram(), NL3D::CDriverGL::setupGlArraysStd(), NL3D::CDriverGL::setupUVPtr(), setupVertexBuffer(), and setupVertexBufferHard().

uint16 NL3D::CVertexBufferInfo::VertexSize
 

Definition at line 172 of file driver_opengl.h.

Referenced by NL3D::CDriverGL::setupGlArraysForEXTVertexShader(), NL3D::CDriverGL::setupGlArraysForNVVertexProgram(), NL3D::CDriverGL::setupGlArraysStd(), NL3D::CDriverGL::setupUVPtr(), setupVertexBuffer(), and setupVertexBufferHard().


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 08:25:48 2004 for NeL by doxygen 1.3.6