#include <OgreVertexIndexData.h>
Public Methods | |
SoftwareBlendInfo () | |
~SoftwareBlendInfo () | |
Public Attributes | |
bool | automaticBlend |
If true, the RenderSystem will automatically apply the blend when rendering with this vertexData, otherwise the user of the vertex data must call RenderSystem::sofwareVertexBlend manually as required. | |
Real * | pSrcPositions |
System-memory pointer to source positions, note this will be deleted when this class is destroyed. | |
Real * | pSrcNormals |
System-memory pointer to source normals, can be null if vertexData does not include normals , note this will be deleted when this class is destroyed. | |
unsigned short | numWeightsPerVertex |
The number of blending weights per vertex, will be deleted on destruction. | |
Real * | pBlendWeights |
Pointer to blending weights, will be deleted on destruction. | |
unsigned char * | pBlendIndexes |
Pointer to blending indexes (index into world matrices). |
The assumption here is that you have a VES_POSITION and VES_NORMAL elements in your declaration which you wish to update with a blended version of positions / normals from a system-memory location. We advise that if you're blending a lot, you set the hardware vertex buffer to HBU_DYNAMIC_WRITE_ONLY, with no shadow buffer.
Note that future versions of the engine are likely to support vertex shader based animation so there will be a hardware alternative; however, note that sometimes you may still want to perform blending in software, for example when you need to read back the blended positions in applications such as shadow volume construction.
In order to apply this blending, the world matrices must be set and RenderSystem::softwareVertexBlend called. This is done automatically for skeletally animated entities, but this can be done manually if required. After calling this method, the vertex buffers are updated with the blended positions and the blend does not need to be called again unless it's basis changes.
Definition at line 83 of file OgreVertexIndexData.h.
|
Definition at line 103 of file OgreVertexIndexData.h. |
|
Definition at line 132 of file OgreVertexIndexData.cpp. References pBlendIndexes, pBlendWeights, pSrcNormals, and pSrcPositions. |
|
If true, the RenderSystem will automatically apply the blend when rendering with this vertexData, otherwise the user of the vertex data must call RenderSystem::sofwareVertexBlend manually as required.
Definition at line 89 of file OgreVertexIndexData.h. Referenced by Ogre::VertexData::clone(). |
|
The number of blending weights per vertex, will be deleted on destruction.
Definition at line 97 of file OgreVertexIndexData.h. Referenced by Ogre::VertexData::clone(). |
|
Pointer to blending indexes (index into world matrices).
Definition at line 101 of file OgreVertexIndexData.h. Referenced by Ogre::VertexData::clone(), and ~SoftwareBlendInfo(). |
|
Pointer to blending weights, will be deleted on destruction.
Definition at line 99 of file OgreVertexIndexData.h. Referenced by Ogre::VertexData::clone(), and ~SoftwareBlendInfo(). |
|
System-memory pointer to source normals, can be null if vertexData does not include normals , note this will be deleted when this class is destroyed.
Definition at line 95 of file OgreVertexIndexData.h. Referenced by Ogre::VertexData::clone(), and ~SoftwareBlendInfo(). |
|
System-memory pointer to source positions, note this will be deleted when this class is destroyed.
Definition at line 91 of file OgreVertexIndexData.h. Referenced by Ogre::VertexData::clone(), and ~SoftwareBlendInfo(). |
Copyright © 2002-2003 by The OGRE Team
Last modified Wed Jan 21 00:21:13 2004