"L. Spiro Engine"
|
A vertex buffer. More...
#include <LSGVertexBuffer.h>
Public Member Functions | |
CVertexBuffer &LSE_CALL | operator= (const CVertexBuffer &_vbOther) |
LSBOOL LSE_CALL | CreateVertexBuffer (const LSG_VB_CONTENTS &_vcContents, LSUINT32 _ui32UsageAndAccess=0UL, LSUINT32 _ui32InitialElements=0UL, CAllocator *_paAllocator=NULL) |
LSVOID LSE_CALL | Reset () |
LSVOID LSE_CALL | SetAllocator (CAllocator *_paAllocator) |
LSBOOL LSE_CALL | Finalize () |
LSBOOL LSE_CALL | Lock () |
LSVOID LSE_CALL | UnLock () |
LSVOID LSE_CALL | ChopTo (LSUINT32 _ui32Total) |
LSE_INLINE LSUINT32 LSE_CALL | TotalPrimitives () const |
LSE_INLINE LSUINT32 LSE_CALL | TotalElements () const |
LSE_INLINE LSUINT32 LSE_CALL | Stride () const |
LSE_INLINE LSUINT32 LSE_CALL | GetUsage () const |
LSE_INLINE LSUINT32 LSE_CALL | GetId () const |
LSE_INLINE LSBOOL LSE_CALL | Finalized () const |
LSBOOL LSE_CALL | AddVertex (LSUINT32 _ui32Index, LSREAL _fX, LSREAL _fY, LSREAL _fZ, LSUINT32 _ui32Stream=0UL) |
LSE_INLINE LSVOID LSE_CALL | SetVertex (LSUINT32 _ui32Index, LSREAL _fX, LSREAL _fY, LSREAL _fZ, LSUINT32 _ui32Stream=0UL) |
LSBOOL LSE_CALL | AddVertex (LSUINT32 _ui32Index, LSREAL _fX, LSREAL _fY, LSREAL _fZ, LSREAL _fW, LSUINT32 _ui32Stream=0UL) |
LSE_INLINE LSVOID LSE_CALL | SetVertex (LSUINT32 _ui32Index, LSREAL _fX, LSREAL _fY, LSREAL _fZ, LSREAL _fW, LSUINT32 _ui32Stream=0UL) |
LSBOOL LSE_CALL | AddNormal (LSUINT32 _ui32Index, LSREAL _fX, LSREAL _fY, LSREAL _fZ, LSUINT32 _ui32Stream=0UL) |
LSE_INLINE LSVOID LSE_CALL | SetNormal (LSUINT32 _ui32Index, LSREAL _fX, LSREAL _fY, LSREAL _fZ, LSUINT32 _ui32Stream=0UL) |
LSBOOL LSE_CALL | AddColor (LSUINT32 _ui32Index, LSREAL _fX, LSREAL _fY, LSREAL _fZ, LSUINT32 _ui32Stream=0UL) |
LSE_INLINE LSVOID LSE_CALL | SetColor (LSUINT32 _ui32Index, LSREAL _fX, LSREAL _fY, LSREAL _fZ, LSUINT32 _ui32Stream=0UL) |
LSBOOL LSE_CALL | AddAlpha (LSUINT32 _ui32Index, LSREAL _fA, LSUINT32 _ui32Stream=0UL) |
LSE_INLINE LSVOID LSE_CALL | SetAlpha (LSUINT32 _ui32Index, LSREAL _fA, LSUINT32 _ui32Stream=0UL) |
LSBOOL LSE_CALL | AddTex (LSUINT32 _ui32Index, LSREAL _fU, LSREAL _fV, LSUINT32 _ui32Stream=0UL) |
LSE_INLINE LSVOID LSE_CALL | SetTex (LSUINT32 _ui32Index, LSREAL _fU, LSREAL _fV, LSUINT32 _ui32Stream=0UL) |
LSBOOL LSE_CALL | AddFog (LSUINT32 _ui32Index, LSREAL _fX, LSREAL _fY, LSREAL _fZ, LSUINT32 _ui32Stream=0UL) |
LSE_INLINE LSVOID LSE_CALL | SetFog (LSUINT32 _ui32Index, LSREAL _fX, LSREAL _fY, LSREAL _fZ, LSUINT32 _ui32Stream=0UL) |
LSBOOL LSE_CALL | AddBiNormal (LSUINT32 _ui32Index, LSREAL _fX, LSREAL _fY, LSREAL _fZ, LSUINT32 _ui32Stream=0UL) |
LSE_INLINE LSVOID LSE_CALL | SetBiNormal (LSUINT32 _ui32Index, LSREAL _fX, LSREAL _fY, LSREAL _fZ, LSUINT32 _ui32Stream=0UL) |
LSBOOL LSE_CALL | AddTangent (LSUINT32 _ui32Index, LSREAL _fX, LSREAL _fY, LSREAL _fZ, LSUINT32 _ui32Stream=0UL) |
LSE_INLINE LSVOID LSE_CALL | SetTangent (LSUINT32 _ui32Index, LSREAL _fX, LSREAL _fY, LSREAL _fZ, LSUINT32 _ui32Stream=0UL) |
LSBOOL LSE_CALL | AddBlendWeight (LSUINT32 _ui32Index, LSREAL _f0, LSREAL _f1, LSREAL _f2, LSREAL _f3, LSUINT32 _ui32Stream=0UL) |
LSE_INLINE LSVOID LSE_CALL | SetBlendWeight (LSUINT32 _ui32Index, LSREAL _f0, LSREAL _f1, LSREAL _f2, LSREAL _f3, LSUINT32 _ui32Stream=0UL) |
LSE_INLINE CVector3 LSE_CALL | GetVertex3 (LSUINT32 _ui32Index, LSUINT32 _ui32Slot=0UL) |
LSE_INLINE CVector3 LSE_CALL | GetNormal (LSUINT32 _ui32Index, LSUINT32 _ui32Slot=0UL) |
LSE_INLINE CVector2 LSE_CALL | GetTex2 (LSUINT32 _ui32Index, LSUINT32 _ui32Slot=0UL) |
LSE_INLINE LSUINT32 LSE_CALL | GetElementSize () const |
LSE_INLINE const LSVOID *LSE_CALL | GetElement (LSUINT32 _ui32Index) const |
LSE_INLINE LSVOID LSE_CALL | MoveElement (LSUINT32 _ui32Index, LSUINT32 _ui32DestIndex) |
LSBOOL LSE_CALL | TransferElement (CVertexBuffer &_vbTarget, LSG_VERTEX_ATTRIBUTES _vaElementType, LSUINT32 _ui32Slot) |
LSVOID *LSE_CALL | GetBuffer () |
LSUINT32 LSE_CALL | GetBufferLen () |
Static Public Member Functions | |
static LSVOID LSE_CALL | ActivateVertexBuffer (CVertexBuffer &_vbBuffer, LSUINT32 _ui32Stream=0UL, LSUINT32 _ui32ElementOffset=0UL) |
static LSVOID LSE_CALL | DeActivateVertexBuffer (LSUINT32 _ui32Stream) |
Protected Member Functions | |
LSBOOL LSE_CALL | Activate (LSUINT32 _ui32Stream=0UL, LSUINT32 _ui32ElementOffset=0UL) |
LSUINT32 LSE_CALL | GetAttributesSize (const LSG_VB_CONTENTS &_vcContents) |
LSVOID LSE_CALL | CalculateAttributeOffsets () |
LSUINT32 LSE_CALL | GetSingleAttributesSize (const LSG_VB_CONTENTS &_vcContents) |
LSBOOL LSE_CALL | AddIndex (LSUINT32 _ui32Index) |
LSVOID LSE_CALL | SortContents () |
Static Protected Member Functions | |
static LSINT32 LSE_CCALL | ContentsSort (LSVOID *_pvContext, LSUINT8 *_pui8Left, LSUINT8 *_pui8Right) |
static LSVOID LSE_CALL | ClearVertexArray () |
Static Protected Attributes | |
static CVertexBuffer * | m_pvbVertexBuffers [LSG_VBM_MAX_STREAMS] |
static LSUINT32 | m_ui32HighestVertexBuffer |
Friends | |
class | CFnd |
class | CDirectX11VertexBuffer |
A vertex buffer.
Class CVertexBuffer Description: A vertex buffer. The base class for this depends on the graphics API. We do not use polymorpism here, though in debug mode some functions will be virtual as a means of ensuring the API interface matches between all underlying API vertex buffer classes. Using a vertex buffer is simple: #1: Specify the buffer properties. #2: Fill it with vertex data. #3: Call Finalize() and it is ready to be used for rendering. Before Finalize() is called, you can still add vertices even if you specified a buffer with the LSG_VBAF_READ_ONLY flag. This flag is used only after the vertex data is uploaded to the hardware, which happens after a call to Finalize().
LSBOOL LSE_CALL lsg::CVertexBuffer::Activate | ( | LSUINT32 | _ui32Stream = 0UL , |
LSUINT32 | _ui32ElementOffset = 0UL |
||
) | [protected] |
Activate the vertex buffer to a given stream.
_ui32Stream | The stream on which to activate the vertex buffer. |
_ui32ElementOffset | The element within the buffer at which to start rendering when rendering is performed. |
static LSVOID LSE_CALL lsg::CVertexBuffer::ActivateVertexBuffer | ( | CVertexBuffer & | _vbBuffer, |
LSUINT32 | _ui32Stream = 0UL , |
||
LSUINT32 | _ui32ElementOffset = 0UL |
||
) | [static] |
Apply a vertex buffer to a given stream.
_vbBuffer | The vertex buffer to activate on the given stream. |
_ui32Stream | The stream to which to apply the vertex buffer. |
_ui32ElementOffset | The element within the buffer at which to start rendering when rendering is performed. |
LSBOOL LSE_CALL lsg::CVertexBuffer::AddAlpha | ( | LSUINT32 | _ui32Index, |
LSREAL | _fA, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Add the alpha color value at the given index. If the buffer is not large enough it will be reallocated. ** Must be locked.
_ui32Index | Index where to add the alpha value. |
_fA | Alpha value. |
_ui32Stream | Stream of the alpha value. |
LSBOOL LSE_CALL lsg::CVertexBuffer::AddBiNormal | ( | LSUINT32 | _ui32Index, |
LSREAL | _fX, | ||
LSREAL | _fY, | ||
LSREAL | _fZ, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Add a bi-normal at the given index. If the buffer is not large enough it will be reallocated. ** Must be locked.
_ui32Index | Index where to add the bi-normal. |
_fX | X position of the bi-normal. |
_fY | Y position of the bi-normal. |
_fZ | Z position of the bi-normal. |
_ui32Stream | Stream of the bi-normal. |
LSBOOL LSE_CALL lsg::CVertexBuffer::AddBlendWeight | ( | LSUINT32 | _ui32Index, |
LSREAL | _f0, | ||
LSREAL | _f1, | ||
LSREAL | _f2, | ||
LSREAL | _f3, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Add a blend weight at the given index. If the buffer is not large enough it will be reallocated. ** Must be locked.
_ui32Index | Index where to add the blend weight. |
_f0 | Blend weight 0. |
_f1 | Blend weight 1. |
_f2 | Blend weight 2. |
_f3 | Blend weight 3. |
_ui32Stream | Stream of the blend weight. |
LSBOOL LSE_CALL lsg::CVertexBuffer::AddColor | ( | LSUINT32 | _ui32Index, |
LSREAL | _fX, | ||
LSREAL | _fY, | ||
LSREAL | _fZ, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Add a color at the given index. If the buffer is not large enough it will be reallocated. ** Must be locked.
_ui32Index | Index where to add the color. |
_fX | R color value. |
_fY | G color value. |
_fZ | B color value. |
_ui32Stream | Stream of the color value. |
LSBOOL LSE_CALL lsg::CVertexBuffer::AddFog | ( | LSUINT32 | _ui32Index, |
LSREAL | _fX, | ||
LSREAL | _fY, | ||
LSREAL | _fZ, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Add a fog coordinate at the given index. If the buffer is not large enough it will be reallocated. ** Must be locked.
_ui32Index | Index where to add the fog coordinate. |
_fX | X position of the fog coordinate. |
_fY | Y position of the fog coordinate. |
_fZ | Z position of the fog coordinate. |
_ui32Stream | Stream of the fog coordinate. |
LSBOOL LSE_CALL lsg::CVertexBuffer::AddIndex | ( | LSUINT32 | _ui32Index | ) | [protected] |
Ensure that the given element index is valid, allocating new elements if necessary.
_ui32Index | Index to make valid. |
LSBOOL LSE_CALL lsg::CVertexBuffer::AddNormal | ( | LSUINT32 | _ui32Index, |
LSREAL | _fX, | ||
LSREAL | _fY, | ||
LSREAL | _fZ, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Add a normal at the given index. If the buffer is not large enough it will be reallocated. ** Must be locked.
_ui32Index | Index where to add the normal. |
_fX | X position of the normal. |
_fY | Y position of the normal. |
_fZ | Z position of the normal. |
_ui32Stream | Stream of the normal. |
LSBOOL LSE_CALL lsg::CVertexBuffer::AddTangent | ( | LSUINT32 | _ui32Index, |
LSREAL | _fX, | ||
LSREAL | _fY, | ||
LSREAL | _fZ, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Add a tangent at the given index. If the buffer is not large enough it will be reallocated. ** Must be locked.
_ui32Index | Index where to add the tangent. |
_fX | X position of the tangent. |
_fY | Y position of the tangent. |
_fZ | Z position of the tangent. |
_ui32Stream | Stream of the tangent. |
LSBOOL LSE_CALL lsg::CVertexBuffer::AddTex | ( | LSUINT32 | _ui32Index, |
LSREAL | _fU, | ||
LSREAL | _fV, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Add a texture coordinate at the given index. If the buffer is not large enough it will be reallocated. ** Must be locked.
_ui32Index | Index where to add the texture coordinate. |
_fU | U texture coordinate value. |
_fV | V texture coordinate value. |
_ui32Stream | Stream of the coordinate value. |
LSBOOL LSE_CALL lsg::CVertexBuffer::AddVertex | ( | LSUINT32 | _ui32Index, |
LSREAL | _fX, | ||
LSREAL | _fY, | ||
LSREAL | _fZ, | ||
LSREAL | _fW, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Add a vertex at the given index. If the buffer is not large enough it will be reallocated. ** Must be locked.
_ui32Index | Index where to add the vertex. |
_fX | X position of the vertex. |
_fY | Y position of the vertex. |
_fZ | Z position of the vertex. |
_fW | W position of the vertex. |
_ui32Stream | Stream of the vertex. |
LSBOOL LSE_CALL lsg::CVertexBuffer::AddVertex | ( | LSUINT32 | _ui32Index, |
LSREAL | _fX, | ||
LSREAL | _fY, | ||
LSREAL | _fZ, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Add a vertex at the given index. If the buffer is not large enough it will be reallocated. ** Must be locked.
_ui32Index | Index where to add the vertex. |
_fX | X position of the vertex. |
_fY | Y position of the vertex. |
_fZ | Z position of the vertex. |
_ui32Stream | Stream of the vertex. |
LSVOID LSE_CALL lsg::CVertexBuffer::CalculateAttributeOffsets | ( | ) | [protected] |
Determine attribute offsets.
LSVOID LSE_CALL lsg::CVertexBuffer::ChopTo | ( | LSUINT32 | _ui32Total | ) |
Set the total elements in the buffer. The new total must be less than or equal to the previous total. ** Must be locked.
_ui32Total | The new total number of elements in the list. |
static LSVOID LSE_CALL lsg::CVertexBuffer::ClearVertexArray | ( | ) | [static, protected] |
Final render. Clears all vertex buffers from the list.
static LSINT32 LSE_CCALL lsg::CVertexBuffer::ContentsSort | ( | LSVOID * | _pvContext, |
LSUINT8 * | _pui8Left, | ||
LSUINT8 * | _pui8Right | ||
) | [static, protected] |
Sort vertex contents inputs.
_pvContext | Unused. |
_pui8Left | Left operand. |
_pui8Right | Right operand. |
LSBOOL LSE_CALL lsg::CVertexBuffer::CreateVertexBuffer | ( | const LSG_VB_CONTENTS & | _vcContents, |
LSUINT32 | _ui32UsageAndAccess = 0UL , |
||
LSUINT32 | _ui32InitialElements = 0UL , |
||
CAllocator * | _paAllocator = NULL |
||
) |
Create a vertex buffer.
_vcContents | Contents of each vertex. Combine LSG_VB_CONTENTS objects to create a description of the vertex buffer's contents |
_ui32UsageAndAccess | Usage and access values. Combine one of the LSG_VERTEX_BUFFER_USAGE_TYPES values with one of the LSG_VERTEX_BUFFER_ACCESS_FLAGS values. |
_ui32InitialElements | Total initial elements. If custom vertex attributes are going to be used, this must be set to 0. |
_paAllocator | An optional allocator to be used for all allocations made by this instance. |
static LSVOID LSE_CALL lsg::CVertexBuffer::DeActivateVertexBuffer | ( | LSUINT32 | _ui32Stream | ) | [static] |
Unapply a vertex buffer from a given stream.
_ui32Stream | The stream from which to remove a vertex buffer. |
LSBOOL LSE_CALL lsg::CVertexBuffer::Finalize | ( | ) |
Finalize the buffer. After this point, Lock() must be called to modify the buffer. This function sends the vertex buffer data to the hardware.
LSE_INLINE LSBOOL LSE_CALL lsg::CVertexBuffer::Finalized | ( | ) | const |
Gets whether or not the vertex buffer has been finalized.
LSUINT32 LSE_CALL lsg::CVertexBuffer::GetAttributesSize | ( | const LSG_VB_CONTENTS & | _vcContents | ) | [protected] |
Calculate the size of a given vertex attribute bitmask.
_vcContents | The contents of which to calculate the full size. |
LSE_INLINE const LSVOID *LSE_CALL lsg::CVertexBuffer::GetElement | ( | LSUINT32 | _ui32Index | ) | const |
Gets a pointer to an element by index. Index must be valid.
_ui32Index | Index of the elemnt whose starting address is to be returned. |
LSE_INLINE LSUINT32 LSE_CALL lsg::CVertexBuffer::GetElementSize | ( | ) | const |
Gets the size of a single element in the buffer.
LSE_INLINE LSUINT32 LSE_CALL lsg::CVertexBuffer::GetId | ( | ) | const |
Gets the ID of this vertex buffer.
LSE_INLINE CVector3 LSE_CALL lsg::CVertexBuffer::GetNormal | ( | LSUINT32 | _ui32Index, |
LSUINT32 | _ui32Slot = 0UL |
||
) |
Gets a 3-point normal.
_ui32Index | Index of the 3-point normal to get. |
_ui32Slot | Slot of the 3-point normal to get. |
LSUINT32 LSE_CALL lsg::CVertexBuffer::GetSingleAttributesSize | ( | const LSG_VB_CONTENTS & | _vcContents | ) | [protected] |
Gets the size of a single attribute.
_vcContents | The attribute whose size is to be obtained. |
LSE_INLINE CVector2 LSE_CALL lsg::CVertexBuffer::GetTex2 | ( | LSUINT32 | _ui32Index, |
LSUINT32 | _ui32Slot = 0UL |
||
) |
Gets a 2-point UV coordinate.
_ui32Index | Index of the 2-point UV coordinate to get. |
_ui32Slot | Slot of the 2-point UV coordinate to get. |
LSE_INLINE LSUINT32 LSE_CALL lsg::CVertexBuffer::GetUsage | ( | ) | const |
Gets the usage of the vertex buffer.
LSE_INLINE CVector3 LSE_CALL lsg::CVertexBuffer::GetVertex3 | ( | LSUINT32 | _ui32Index, |
LSUINT32 | _ui32Slot = 0UL |
||
) |
Gets a 3-point vertex.
_ui32Index | Index of the 3-point vertex to get. |
_ui32Slot | Slot of the 3-point vertex to get. |
LSBOOL LSE_CALL lsg::CVertexBuffer::Lock | ( | ) |
Lock the buffer for reading or writing. If the buffer was made with the LSG_VBUT_SETONLY flag, this function fails. If the function returns true, this must be paired with a call to UnLock().
LSE_INLINE LSVOID LSE_CALL lsg::CVertexBuffer::MoveElement | ( | LSUINT32 | _ui32Index, |
LSUINT32 | _ui32DestIndex | ||
) |
Move an elemnt from one index to another.
_ui32SrcIndex | Index of the element to move. |
_ui32DestIndex | Index where to move the element. |
CVertexBuffer& LSE_CALL lsg::CVertexBuffer::operator= | ( | const CVertexBuffer & | _vbOther | ) |
Copy operator.
_vbOther | The object to copy. |
LSVOID LSE_CALL lsg::CVertexBuffer::Reset | ( | ) |
Reset everything to scratch.
Reimplemented from lsg::CVertexBufferBase.
LSVOID LSE_CALL lsg::CVertexBuffer::SetAllocator | ( | CAllocator * | _paAllocator | ) |
Set the allocator to be used by this vertex buffer. Causes the vertex buffer to be reset unless the new allocator is the same as the old one.
_paAllocator | The allocator to set. |
LSE_INLINE LSVOID LSE_CALL lsg::CVertexBuffer::SetAlpha | ( | LSUINT32 | _ui32Index, |
LSREAL | _fA, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Set the alpha alpha value value at the given index. The buffer must be large enough. ** Must be locked.
_ui32Index | Index where to add the alpha value. |
_fA | Alpha value. |
_ui32Stream | Stream of the alpha value. |
LSE_INLINE LSVOID LSE_CALL lsg::CVertexBuffer::SetBiNormal | ( | LSUINT32 | _ui32Index, |
LSREAL | _fX, | ||
LSREAL | _fY, | ||
LSREAL | _fZ, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Set a bi-normal at the given index. The buffer must be large enough. ** Must be locked.
_ui32Index | Index where to add the bi-normal. |
_fX | X position of the bi-normal. |
_fY | Y position of the bi-normal. |
_fZ | Z position of the bi-normal. |
_ui32Stream | Stream of the bi-normal. |
LSE_INLINE LSVOID LSE_CALL lsg::CVertexBuffer::SetBlendWeight | ( | LSUINT32 | _ui32Index, |
LSREAL | _f0, | ||
LSREAL | _f1, | ||
LSREAL | _f2, | ||
LSREAL | _f3, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Set a blend weight at the given index. The buffer must be large enough. ** Must be locked.
_ui32Index | Index where to add the blend weight. |
_f0 | Blend weight 0. |
_f1 | Blend weight 1. |
_f2 | Blend weight 2. |
_f3 | Blend weight 3. |
_ui32Stream | Stream of the blend weight. |
LSE_INLINE LSVOID LSE_CALL lsg::CVertexBuffer::SetColor | ( | LSUINT32 | _ui32Index, |
LSREAL | _fX, | ||
LSREAL | _fY, | ||
LSREAL | _fZ, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Set a color at the given index. The buffer must be large enough. ** Must be locked.
_ui32Index | Index where to add the color. |
_fX | R color value. |
_fY | G color value. |
_fZ | B color value. |
_ui32Stream | Stream of the color value. |
LSE_INLINE LSVOID LSE_CALL lsg::CVertexBuffer::SetFog | ( | LSUINT32 | _ui32Index, |
LSREAL | _fX, | ||
LSREAL | _fY, | ||
LSREAL | _fZ, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Set a fog coordinate at the given index. The buffer must be large enough. ** Must be locked.
_ui32Index | Index where to add the fog coordinate. |
_fX | X position of the fog coordinate. |
_fY | Y position of the fog coordinate. |
_fZ | Z position of the fog coordinate. |
_ui32Stream | Stream of the fog coordinate. |
LSE_INLINE LSVOID LSE_CALL lsg::CVertexBuffer::SetNormal | ( | LSUINT32 | _ui32Index, |
LSREAL | _fX, | ||
LSREAL | _fY, | ||
LSREAL | _fZ, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Set a normal at the given index. The buffer must be large enough. ** Must be locked.
_ui32Index | Index where to add the normal. |
_fX | X position of the normal. |
_fY | Y position of the normal. |
_fZ | Z position of the normal. |
_ui32Stream | Stream of the normal. |
LSE_INLINE LSVOID LSE_CALL lsg::CVertexBuffer::SetTangent | ( | LSUINT32 | _ui32Index, |
LSREAL | _fX, | ||
LSREAL | _fY, | ||
LSREAL | _fZ, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Set a tangent at the given index. The buffer must be large enough. ** Must be locked.
_ui32Index | Index where to add the tangent. |
_fX | X position of the tangent. |
_fY | Y position of the tangent. |
_fZ | Z position of the tangent. |
_ui32Stream | Stream of the tangent. |
LSE_INLINE LSVOID LSE_CALL lsg::CVertexBuffer::SetTex | ( | LSUINT32 | _ui32Index, |
LSREAL | _fU, | ||
LSREAL | _fV, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Set a texture coordinate at the given index. The buffer must be large enough. ** Must be locked.
_ui32Index | Index where to add the texture coordinate. |
_fU | U texture coordinate value. |
_fV | V texture coordinate value. |
_ui32Stream | Stream of the coordinate value. |
LSE_INLINE LSVOID LSE_CALL lsg::CVertexBuffer::SetVertex | ( | LSUINT32 | _ui32Index, |
LSREAL | _fX, | ||
LSREAL | _fY, | ||
LSREAL | _fZ, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Set a vertex at the given index. The buffer must be large enough. ** Must be locked.
_ui32Index | Index where to add the vertex. |
_fX | X position of the vertex. |
_fY | Y position of the vertex. |
_fZ | Z position of the vertex. |
_ui32Stream | Stream of the vertex. |
LSE_INLINE LSVOID LSE_CALL lsg::CVertexBuffer::SetVertex | ( | LSUINT32 | _ui32Index, |
LSREAL | _fX, | ||
LSREAL | _fY, | ||
LSREAL | _fZ, | ||
LSREAL | _fW, | ||
LSUINT32 | _ui32Stream = 0UL |
||
) |
Set a vertex at the given index. The buffer must be large enough. ** Must be locked.
_ui32Index | Index where to add the vertex. |
_fX | X position of the vertex. |
_fY | Y position of the vertex. |
_fZ | Z position of the vertex. |
_fW | W position of the vertex. |
_ui32Stream | Stream of the vertex. |
LSVOID LSE_CALL lsg::CVertexBuffer::SortContents | ( | ) | [protected] |
Sort our contents list in place.
LSE_INLINE LSUINT32 LSE_CALL lsg::CVertexBuffer::Stride | ( | ) | const |
Gets the stride of the vertex buffer.
LSE_INLINE LSUINT32 LSE_CALL lsg::CVertexBuffer::TotalElements | ( | ) | const |
Gets the number of elements held in the vertex buffer.
LSE_INLINE LSUINT32 LSE_CALL lsg::CVertexBuffer::TotalPrimitives | ( | ) | const |
Gets the number of primitives held in the vertex buffer.
LSBOOL LSE_CALL lsg::CVertexBuffer::TransferElement | ( | CVertexBuffer & | _vbTarget, |
LSG_VERTEX_ATTRIBUTES | _vaElementType, | ||
LSUINT32 | _ui32Slot | ||
) |
Gives all of a type of element to another vertex buffer and removes the given element from this vertex buffer. For example, this can be used to transfer all of the normals from this vertex buffer to another. ** Must be locked.
_vbTarget | The vertex buffer to which to transfer the given element. |
_vaElementType | The type of element to tansfer. |
_ui32Slot | The slot of the element to transfer. |
LSVOID LSE_CALL lsg::CVertexBuffer::UnLock | ( | ) |
Unlock the buffer when done modifying it. Must be called once per successful Lock() call.
CVertexBuffer* lsg::CVertexBuffer::m_pvbVertexBuffers[LSG_VBM_MAX_STREAMS] [static, protected] |
Streams of vertex buffers.
LSUINT32 lsg::CVertexBuffer::m_ui32HighestVertexBuffer [static, protected] |
The highest vertex buffer set.