#include <landscapevb_info.h>
Definition at line 76 of file landscapevb_info.h.
Public Member Functions | |
void | setupVertexBuffer (CVertexBuffer &vb, bool forVertexProgram) |
void | setupVertexBufferHard (IVertexBufferHard &vb, void *vcoord, bool forVertexProgram) |
Data Fields | |
uint32 | DeltaPosOff |
void * | DeltaPosPointer |
uint32 | GeomInfoOff |
void * | GeomInfoPointer |
uint32 | NumVertices |
uint32 | TexCoordOff0 |
uint32 | TexCoordOff1 |
uint32 | TexCoordOff2 |
void * | TexCoordPointer0 |
void * | TexCoordPointer1 |
void * | TexCoordPointer2 |
void * | VertexCoordPointer |
uint32 | VertexFormat |
uint32 | VertexSize |
Private Member Functions | |
void | setupNullPointers () |
void | setupPointersForVertexProgram () |
|
Definition at line 176 of file landscapevb_info.cpp. References TexCoordPointer2. Referenced by setupVertexBuffer(), and setupVertexBufferHard().
00177 { 00178 VertexCoordPointer= NULL; 00179 TexCoordPointer0= NULL; 00180 TexCoordPointer1= NULL; 00181 TexCoordPointer2= NULL; 00182 GeomInfoPointer= NULL; 00183 DeltaPosPointer= NULL; 00184 } |
|
Definition at line 188 of file landscapevb_info.cpp. References TexCoordOff2, TexCoordPointer2, and uint8. Referenced by setupVertexBuffer(), and setupVertexBufferHard().
00189 { 00190 // see CLandscapeVBAllocator for program definition. 00191 uint8 *vcoord= (uint8*)VertexCoordPointer; 00192 00193 TexCoordPointer0= vcoord + TexCoordOff0; 00194 TexCoordPointer1= vcoord + TexCoordOff1; 00195 TexCoordPointer2= vcoord + TexCoordOff2; 00196 GeomInfoPointer= vcoord + GeomInfoOff; 00197 DeltaPosPointer= vcoord + DeltaPosOff; 00198 00199 } |
|
Definition at line 203 of file landscapevb_info.cpp. References NL3D::CVertexBuffer::getNumVertices(), NL3D::CVertexBuffer::getTexCoordOff(), NL3D::CVertexBuffer::getTexCoordPointer(), NL3D::CVertexBuffer::getValueOffEx(), NL3D::CVertexBuffer::getVertexCoordPointer(), NL3D::CVertexBuffer::getVertexFormat(), NL3D::CVertexBuffer::getVertexSize(), NL3D_LANDSCAPE_VPPOS_DELTAPOS, NL3D_LANDSCAPE_VPPOS_GEOMINFO, NL3D_LANDSCAPE_VPPOS_TEX0, NL3D_LANDSCAPE_VPPOS_TEX1, NL3D_LANDSCAPE_VPPOS_TEX2, setupNullPointers(), setupPointersForVertexProgram(), TexCoordOff2, and TexCoordPointer2. Referenced by NL3D::CLandscapeVBAllocator::lockBuffer().
00204 { 00205 VertexFormat= vb.getVertexFormat(); 00206 VertexSize= vb.getVertexSize(); 00207 NumVertices= vb.getNumVertices(); 00208 00209 if(NumVertices==0) 00210 { 00211 setupNullPointers(); 00212 return; 00213 } 00214 00215 VertexCoordPointer= vb.getVertexCoordPointer(); 00216 00217 if(forVertexProgram) 00218 { 00219 // With VertexCoordPointer setuped, init for VP. 00220 TexCoordOff0= vb.getValueOffEx(NL3D_LANDSCAPE_VPPOS_TEX0); // v[8]= Tex0. 00221 TexCoordOff1= vb.getValueOffEx(NL3D_LANDSCAPE_VPPOS_TEX1); // v[9]= Tex1. 00222 TexCoordOff2= vb.getValueOffEx(NL3D_LANDSCAPE_VPPOS_TEX2); // v[13]= Tex1. 00223 GeomInfoOff= vb.getValueOffEx(NL3D_LANDSCAPE_VPPOS_GEOMINFO); // v[10]= GeomInfos. 00224 DeltaPosOff= vb.getValueOffEx(NL3D_LANDSCAPE_VPPOS_DELTAPOS); // v[11]= EndPos-StartPos 00225 00226 // update Ptrs. 00227 setupPointersForVertexProgram(); 00228 } 00229 else 00230 { 00231 TexCoordPointer0= vb.getTexCoordPointer(0, 0); 00232 TexCoordPointer1= vb.getTexCoordPointer(0, 1); 00233 TexCoordPointer2= vb.getTexCoordPointer(0, 2); 00234 00235 TexCoordOff0= vb.getTexCoordOff(0); 00236 TexCoordOff1= vb.getTexCoordOff(1); 00237 TexCoordOff2= vb.getTexCoordOff(2); 00238 } 00239 } |
|
Definition at line 241 of file landscapevb_info.cpp. References NL3D::IVertexBufferHard::getNumVertices(), NL3D::IVertexBufferHard::getValueOff(), NL3D::IVertexBufferHard::getVertexFormat(), NL3D::IVertexBufferHard::getVertexSize(), NL3D_LANDSCAPE_VPPOS_DELTAPOS, NL3D_LANDSCAPE_VPPOS_GEOMINFO, NL3D_LANDSCAPE_VPPOS_TEX0, NL3D_LANDSCAPE_VPPOS_TEX1, NL3D_LANDSCAPE_VPPOS_TEX2, setupNullPointers(), setupPointersForVertexProgram(), TexCoordOff2, TexCoordPointer2, and uint8. Referenced by NL3D::CLandscapeVBAllocator::lockBuffer().
00242 { 00243 VertexFormat= vb.getVertexFormat(); 00244 VertexSize= vb.getVertexSize(); 00245 NumVertices= vb.getNumVertices(); 00246 00247 if(NumVertices==0) 00248 { 00249 setupNullPointers(); 00250 return; 00251 } 00252 00253 VertexCoordPointer= vcoord; 00254 00255 if(forVertexProgram) 00256 { 00257 // With VertexCoordPointer setuped, init for VP. 00258 TexCoordOff0= vb.getValueOff(NL3D_LANDSCAPE_VPPOS_TEX0); // v[8]= Tex0. 00259 TexCoordOff1= vb.getValueOff(NL3D_LANDSCAPE_VPPOS_TEX1); // v[9]= Tex1. 00260 TexCoordOff2= vb.getValueOff(NL3D_LANDSCAPE_VPPOS_TEX2); // v[9]= Tex1. 00261 GeomInfoOff= vb.getValueOff(NL3D_LANDSCAPE_VPPOS_GEOMINFO); // v[10]= GeomInfos. 00262 DeltaPosOff= vb.getValueOff(NL3D_LANDSCAPE_VPPOS_DELTAPOS); // v[11]= EndPos-StartPos 00263 00264 // update Ptrs. 00265 setupPointersForVertexProgram(); 00266 } 00267 else 00268 { 00269 TexCoordPointer0= (uint8*)vcoord + vb.getValueOff (CVertexBuffer::TexCoord0); 00270 TexCoordPointer1= (uint8*)vcoord + vb.getValueOff (CVertexBuffer::TexCoord1); 00271 TexCoordPointer2= (uint8*)vcoord + vb.getValueOff (CVertexBuffer::TexCoord2); 00272 00273 TexCoordOff0= vb.getValueOff (CVertexBuffer::TexCoord0); 00274 TexCoordOff1= vb.getValueOff (CVertexBuffer::TexCoord1); 00275 TexCoordOff2= vb.getValueOff (CVertexBuffer::TexCoord2); 00276 } 00277 } |
|
Definition at line 95 of file landscapevb_info.h. |
|
Definition at line 93 of file landscapevb_info.h. |
|
Definition at line 94 of file landscapevb_info.h. |
|
Definition at line 92 of file landscapevb_info.h. |
|
Definition at line 81 of file landscapevb_info.h. |
|
Definition at line 86 of file landscapevb_info.h. |
|
Definition at line 87 of file landscapevb_info.h. |
|
Definition at line 88 of file landscapevb_info.h. Referenced by setupPointersForVertexProgram(), setupVertexBuffer(), and setupVertexBufferHard(). |
|
Definition at line 83 of file landscapevb_info.h. |
|
Definition at line 84 of file landscapevb_info.h. |
|
Definition at line 85 of file landscapevb_info.h. Referenced by setupNullPointers(), setupPointersForVertexProgram(), setupVertexBuffer(), and setupVertexBufferHard(). |
|
Definition at line 82 of file landscapevb_info.h. |
|
Definition at line 79 of file landscapevb_info.h. |
|
Definition at line 80 of file landscapevb_info.h. |