Public Member Functions | |
XFCIMPORT | ~XFcGLTriangleInfoBuffer () |
Destructor. | |
XFCIMPORT void * | lock () |
Locks the triangle info buffer. | |
XFCIMPORT void | unlock () |
Unlocks the triangle info buffer. | |
Static Public Member Functions | |
XFCIMPORT XFcGLTriangleInfoBuffer * | create (UINT32 aTriangleFlags, INT aSizeOfTriangle, INT aNumberOfTriangles) |
Creates an XFcGLTriangleInfoBuffer. | |
Public Attributes | |
INT | mInfoSize |
Size of one triangle info unit in bytes. | |
INT | mNumTriangles |
Number of triangles specified (from construction). | |
UINT32 | mInfoFlags |
Flags (from construction). | |
INT | mDiffuseColorOffs |
Diffuse color offset (-1 if not specified). | |
INT | mNormalOffs |
Normal offset (-1 if not specified). | |
INT | mTexture1Offs |
Texture1 cordinate offset (-1 if not specified). | |
Protected Member Functions | |
void | initOffsets (UINT32 aTriangleFlags) |
Calculates the offsets into the data buffer. | |
Protected Attributes | |
UINT8 * | mTriangleInfoData |
The actual data. | |
Friends | |
class | XFcGLCore |
XFcGLCore needs access to offsets (and is the only class that needs it). |
Triangle info buffers are used to optimize meshes so that duplicate vertices are not needed where, for example, each triangle has its own texture coordinates.
// An example of legal triangleinfo data: #define XFCGLTRIANGLEINFO (XFCGLTR_DIFFUSECOLOR | XFCGLTR_NORMAL | XFCGLTR_TEXTURE1) // The data in the buffer must be in a specific order: // - Diffuse color // - Normal vector // - Texture coordinates class XFcGLTriangleInfo { public: UINT32 mDiffuseColor; REAL mNX, mNY, mNZ; REAL mU[3], mV[3]; };
|
Destructor.
|
|
Creates an XFcGLTriangleInfoBuffer.
|
|
Calculates the offsets into the data buffer.
|
|
Locks the triangle info buffer.
|
|
Unlocks the triangle info buffer.
|
|
XFcGLCore needs access to offsets (and is the only class that needs it).
|
|
Diffuse color offset (-1 if not specified).
|
|
Flags (from construction).
|
|
Size of one triangle info unit in bytes.
|
|
Normal offset (-1 if not specified).
|
|
Number of triangles specified (from construction).
|
|
Texture1 cordinate offset (-1 if not specified).
|
|
The actual data.
|
![]() | ||||
![]() |
Confidential Copyright © 2002-2003 Fathammer | with doxygen by Dimitri van Heesch |