|
| Ogre::v1::BaseInstanceBatchVTF::BaseInstanceBatchVTF (IdType id, ObjectMemoryManager *objectMemoryManager, InstanceManager *creator, MeshPtr &meshReference, const MaterialPtr &material, size_t instancesPerBatch, const Mesh::IndexMap *indexToBoneMap) |
|
| Ogre::v1::InstanceManager::BatchSettings::BatchSettings () |
|
| Ogre::v1::InstanceBatch::InstanceBatch (IdType id, ObjectMemoryManager *objectMemoryManager, InstanceManager *creator, MeshPtr &meshReference, const MaterialPtr &material, size_t instancesPerBatch, const Mesh::IndexMap *indexToBoneMap) |
|
| Ogre::v1::InstanceBatchHW::InstanceBatchHW (IdType id, ObjectMemoryManager *objectMemoryManager, InstanceManager *creator, MeshPtr &meshReference, const MaterialPtr &material, size_t instancesPerBatch, const Mesh::IndexMap *indexToBoneMap) |
|
| Ogre::v1::InstanceBatchHW_VTF::InstanceBatchHW_VTF (IdType id, ObjectMemoryManager *objectMemoryManager, InstanceManager *creator, MeshPtr &meshReference, const MaterialPtr &material, size_t instancesPerBatch, const Mesh::IndexMap *indexToBoneMap) |
|
| Ogre::v1::InstanceBatchShader::InstanceBatchShader (IdType id, ObjectMemoryManager *objectMemoryManager, InstanceManager *creator, MeshPtr &meshReference, const MaterialPtr &material, size_t instancesPerBatch, const Mesh::IndexMap *indexToBoneMap) |
|
| Ogre::v1::InstanceBatchVTF::InstanceBatchVTF (IdType id, ObjectMemoryManager *objectMemoryManager, InstanceManager *creator, MeshPtr &meshReference, const MaterialPtr &material, size_t instancesPerBatch, const Mesh::IndexMap *indexToBoneMap) |
|
| Ogre::v1::InstancedEntity::InstancedEntity (IdType id, ObjectMemoryManager *objectMemoryManager, InstanceBatch *batchOwner, uint32 instanceID, BoneMemoryManager *boneMemoryManager, InstancedEntity *sharedTransformEntity=NULL) |
|
| Ogre::v1::InstanceManager::InstanceManager (IdString customName, SceneManager *sceneManager, const String &meshName, const String &groupName, InstancingTechnique instancingTechnique, uint16 instancingFlags, size_t instancesPerBatch, unsigned short subMeshIdx, bool useBoneMatrixLookup=false) |
|
| Ogre::v1::InstanceBatchHW_VTF::SendAllAnimatedTransformsToTexture::SendAllAnimatedTransformsToTexture (float *RESTRICT_ALIAS dstPtr, size_t floatsPerEntity, size_t entitiesPerPadding, size_t widthFloatsPadding, const Mesh::IndexMap *indexMap) |
|
| Ogre::v1::InstanceBatchHW_VTF::SendAllDualQuatTexture::SendAllDualQuatTexture (float *RESTRICT_ALIAS dstPtr, size_t floatsPerEntity, size_t entitiesPerPadding, size_t widthFloatsPadding, const Mesh::IndexMap *indexMap) |
|
| Ogre::v1::InstanceBatchHW_VTF::SendAllLUTToTexture::SendAllLUTToTexture (float *RESTRICT_ALIAS dstPtr, size_t floatsPerEntity, size_t entitiesPerPadding, size_t widthFloatsPadding, const Mesh::IndexMap *indexMap, size_t numLutEntries) |
|
| Ogre::v1::InstanceBatchHW_VTF::SendAllSingleTransformsToTexture::SendAllSingleTransformsToTexture (float *RESTRICT_ALIAS dstPtr, size_t floatsPerEntity, size_t entitiesPerPadding, size_t widthFloatsPadding) |
|
| Ogre::v1::InstanceBatchHW_VTF::TransformsToTexture::TransformsToTexture (float *RESTRICT_ALIAS dstPtr, size_t floatsPerEntity, size_t entitiesPerPadding, size_t widthFloatsPadding) |
|
virtual | Ogre::v1::BaseInstanceBatchVTF::~BaseInstanceBatchVTF () |
|
virtual | Ogre::v1::InstanceBatch::~InstanceBatch () |
|
virtual | Ogre::v1::InstanceBatchHW::~InstanceBatchHW () |
|
virtual | Ogre::v1::InstanceBatchHW_VTF::~InstanceBatchHW_VTF () |
|
virtual | Ogre::v1::InstanceBatchShader::~InstanceBatchShader () |
|
virtual | Ogre::v1::InstanceBatchVTF::~InstanceBatchVTF () |
|
virtual | Ogre::v1::InstancedEntity::~InstancedEntity () |
|
virtual | Ogre::v1::InstanceManager::~InstanceManager () |
|
void | Ogre::v1::InstanceManager::_addDirtyStaticBatch (InstanceBatch *dirtyBatch) |
| Called by an InstanceBatch when it requests their bounds to be updated for proper culling.
|
|
void | Ogre::v1::InstanceManager::_addToDynamicBatchList (InstanceBatch *dynamicBatch) |
| Kees the batch in the dynamic batch list so that it gets updated every frame.
|
|
void | Ogre::v1::InstanceBatchHW_VTF::_boundsDirty (void) |
|
void | Ogre::v1::InstanceBatch::_defragmentBatch (bool optimizeCulling, InstancedEntityVec &usedEntities, CustomParamsVec &usedParams) |
|
void | Ogre::v1::InstanceBatch::_defragmentBatchDiscard (void) |
|
const Vector4 & | Ogre::v1::InstanceBatch::_getCustomParam (InstancedEntity *instancedEntity, unsigned char idx) |
|
const Mesh::IndexMap * | Ogre::v1::InstanceBatch::_getIndexToBoneMap () const |
|
MeshPtr & | Ogre::v1::InstanceBatch::_getMeshRef () |
|
const Ogre::v1::MeshPtr & | Ogre::v1::InstanceBatch::_getMeshReference (void) const |
|
InstanceBatch * | Ogre::v1::InstancedEntity::_getOwner () const |
|
void | Ogre::v1::InstanceBatch::_markTransformSharingDirty () |
| Tells that the list of entity instances with shared transforms has changed.
|
|
virtual void | Ogre::v1::InstancedEntity::_notifyAttached (Node *parent) |
| Overloaded so we can register ourselves for updating our animations.
|
|
virtual void | Ogre::v1::InstancedEntity::_notifyParentNodeMemoryChanged (void) |
| @See Node::_callMemoryChangeListeners
|
|
virtual void | Ogre::v1::InstanceBatch::_notifyStaticDirty (void) |
| Called by InstancedEntity(s) or directly to tell us we need to update the bounds Should only useful if this batch is static.
|
|
virtual void | Ogre::v1::InstancedEntity::_notifyStaticDirty (void) const |
| Called by SceneManager when it is telling we're a static MovableObject being dirty Don't call this directly.
|
|
void | Ogre::v1::InstanceManager::_removeFromDynamicBatchList (InstanceBatch *batch) |
| Called when a previously dynamic InstanceBatch went static (.
|
|
void | Ogre::v1::InstanceBatch::_setCustomParam (InstancedEntity *instancedEntity, unsigned char idx, const Vector4 &newParam) |
|
void | Ogre::v1::InstanceBatch::_setInstancesPerBatch (size_t instancesPerBatch) |
| Raises an exception if trying to change it after being built.
|
|
SkeletalAnimationMode | Ogre::v1::InstanceBatch::_supportsSkeletalAnimation () const |
| Returns true if this technique supports skeletal animation.
|
|
void | Ogre::v1::InstanceBatch::_updateBounds (void) |
|
void | Ogre::v1::InstanceManager::_updateDirtyBatches (void) |
| Called by SceneManager every frame.
|
|
void | Ogre::v1::InstanceManager::_updateDirtyBatchesThread (size_t threadIdx) |
| Called by SceneManager every frame from multiple threads.
|
|
void | Ogre::v1::InstanceBatch::_updateEntitiesBoundsThread (size_t threadIdx) |
| Updates the bounds of only our entities from multiple threads.
|
|
virtual void | Ogre::v1::InstanceBatchHW::_updateRenderQueue (RenderQueue *queue, Camera *camera, const Camera *lodCamera) |
| Overloaded to avoid updating skeletons (which we don't support), check visibility on a per unit basis and finally updated the vertex buffer.
|
|
virtual void | Ogre::v1::InstanceBatchHW_VTF::_updateRenderQueue (RenderQueue *queue, Camera *camera, const Camera *lodCamera) |
| Overloaded to visibility on a per unit basis and finally updated the vertex texture.
|
|
void | Ogre::v1::BaseInstanceBatchVTF::_updateRenderQueue (RenderQueue *queue, Camera *camera, const Camera *lodCamera) |
| Overloaded to be able to updated the vertex texture.
|
|
void | Ogre::v1::InstancedEntity::_updateRenderQueue (RenderQueue *queue, Camera *camera, const Camera *lodCamera) |
| Do nothing, InstanceBatch takes care of this.
|
|
virtual RenderOperation | Ogre::v1::InstanceBatch::build (const SubMesh *baseSubMesh) |
| Constructs all the data needed to use this batch, as well as the InstanceEntities.
|
|
virtual void | Ogre::v1::InstanceBatch::buildFrom (const SubMesh *baseSubMesh, const RenderOperation &renderOperation) |
| Instancing consumes significantly more GPU memory than regular rendering methods.
|
|
void | Ogre::v1::InstanceBatchHW::buildFrom (const SubMesh *baseSubMesh, const RenderOperation &renderOperation) |
|
void | Ogre::v1::InstanceBatchShader::buildFrom (const SubMesh *baseSubMesh, const RenderOperation &renderOperation) |
|
void | Ogre::v1::BaseInstanceBatchVTF::buildFrom (const SubMesh *baseSubMesh, const RenderOperation &renderOperation) |
|
size_t | Ogre::v1::InstanceBatchHW::calculateMaxNumInstances (const SubMesh *baseSubMesh, uint16 flags) const |
|
size_t | Ogre::v1::InstanceBatchHW_VTF::calculateMaxNumInstances (const SubMesh *baseSubMesh, uint16 flags) const |
|
size_t | Ogre::v1::InstanceBatchShader::calculateMaxNumInstances (const SubMesh *baseSubMesh, uint16 flags) const |
|
size_t | Ogre::v1::InstanceBatchVTF::calculateMaxNumInstances (const SubMesh *baseSubMesh, uint16 flags) const |
|
virtual size_t | Ogre::v1::InstanceBatch::calculateMaxNumInstances (const SubMesh *baseSubMesh, uint16 flags) const =0 |
| Some techniques have a limit on how many instances can be done.
|
|
void | Ogre::v1::InstanceManager::cleanupEmptyBatches (void) |
| This function can be useful to improve CPU speed after having too many instances created, which where now removed, thus freeing many batches with zero used Instanced Entities However the batches aren't automatically removed from memory until the InstanceManager is destroyed, or this function is called.
|
|
InstancedEntity * | Ogre::v1::InstanceBatch::createInstancedEntity () |
| Returns a pointer to a new InstancedEntity ready to use Note it's actually preallocated, so no memory allocation happens at this point.
|
|
InstancedEntity * | Ogre::v1::InstanceManager::createInstancedEntity (const String &materialName, SceneMemoryMgrTypes sceneType=SCENE_DYNAMIC) |
| Creates an InstancedEntity based on an existing InstanceManager (.
|
|
void | Ogre::v1::InstanceManager::defragmentBatches (bool optimizeCulling) |
| After creating many entities (which turns in many batches) and then removing entities that are in the middle of these batches, there might be many batches with many free entities.
|
|
bool | Ogre::v1::BaseInstanceBatchVTF::forceOneWeight () const |
|
const AxisAlignedBox & | Ogre::v1::InstancedEntity::getBoundingBox (void) const |
|
const Vector4 & | Ogre::v1::InstancedEntity::getCustomParam (unsigned char idx) |
|
InstanceBatchIterator | Ogre::v1::InstanceManager::getInstanceBatchIterator (const String &materialName, SceneMemoryMgrTypes sceneType) const |
| Get non-updateable iterator over instance batches for given material.
|
|
InstanceBatchMapIterator | Ogre::v1::InstanceManager::getInstanceBatchMapIterator (void) const |
| Get non-updateable iterator over instance batches per material.
|
|
void | Ogre::v1::InstanceBatch::getInstancedEntitiesInUse (InstancedEntityVec &outEntities, CustomParamsVec &outParams) |
| Fills the input vector with the instances that are currently being used or were requested.
|
|
InstancingTechnique | Ogre::v1::InstanceManager::getInstancingTechnique () const |
|
const LightList & | Ogre::v1::InstanceBatch::getLights (void) const |
| Gets a list of lights, ordered relative to how close they are to this renderable.
|
|
virtual size_t | Ogre::v1::BaseInstanceBatchVTF::getMaxLookupTableInstances () const |
|
size_t | Ogre::v1::InstanceManager::getMaxOrBestNumInstancesPerBatch (const String &materialName, size_t suggestedSize, uint16 flags) |
| Calculates the maximum (or the best amount, depending on flags) of instances per batch given the suggested size for the technique this manager was created for.
|
|
const String & | Ogre::v1::InstanceBatch::getMovableType (void) const |
| Returns the type name of this object.
|
|
const String & | Ogre::v1::InstancedEntity::getMovableType (void) const |
| Returns the type name of this object.
|
|
const IdString | Ogre::v1::InstanceManager::getName () const |
|
unsigned char | Ogre::v1::InstanceManager::getNumCustomParams () const |
|
unsigned short | Ogre::v1::InstanceBatchHW::getNumWorldTransforms (void) const |
| Returns the number of world transform matrices this renderable requires.
|
|
unsigned short | Ogre::v1::InstanceBatchShader::getNumWorldTransforms (void) const |
| Returns the number of world transform matrices this renderable requires.
|
|
unsigned short | Ogre::v1::BaseInstanceBatchVTF::getNumWorldTransforms (void) const |
| Returns the number of world transform matrices this renderable requires.
|
|
void | Ogre::v1::InstanceBatch::getRenderOperation (RenderOperation &op, bool casterPass) |
| Gets the render operation required to send this object to the frame buffer.
|
|
SceneManager * | Ogre::v1::InstanceManager::getSceneManager () const |
|
bool | Ogre::v1::InstanceManager::getSetting (BatchSettingId id, IdString materialName) const |
| If settings for the given material didn't exist, default value is returned.
|
|
SkeletonInstance * | Ogre::v1::InstancedEntity::getSkeleton (void) const |
|
Real | Ogre::v1::InstanceBatch::getSquaredViewDepth (const Camera *cam) const |
|
Real | Ogre::v1::InstancedEntity::getSquaredViewDepth (const Camera *cam) const |
| This is used by our batch owner to get the closest entity's depth, returns infinity when not attached to a scene node.
|
|
void | Ogre::v1::InstanceBatchHW::getWorldTransforms (Matrix4 *xform) const |
| Gets the world transform matrix / matrices for this renderable object.
|
|
void | Ogre::v1::InstanceBatchShader::getWorldTransforms (Matrix4 *xform) const |
| Gets the world transform matrix / matrices for this renderable object.
|
|
void | Ogre::v1::BaseInstanceBatchVTF::getWorldTransforms (Matrix4 *xform) const |
| Gets the world transform matrix / matrices for this renderable object.
|
|
bool | Ogre::v1::InstanceManager::hasSettings (IdString materialName) const |
| Returns true if settings were already created for the given material name.
|
|
bool | Ogre::v1::InstancedEntity::hasSkeleton (void) const |
|
virtual void | Ogre::v1::InstanceBatchHW::instanceBatchCullFrustumThreaded (const Camera *frustum, const Camera *lodCamera, uint32 combinedVisibilityFlags) |
|
virtual void | Ogre::v1::InstanceBatchHW_VTF::instanceBatchCullFrustumThreaded (const Camera *frustum, const Camera *lodCamera, uint32 combinedVisibilityFlags) |
|
bool | Ogre::v1::InstanceBatch::isBatchFull (void) const |
|
bool | Ogre::v1::InstanceBatch::isBatchUnused (void) const |
| Returns true if it no instanced entity has been requested or all of them have been removed.
|
|
virtual bool | Ogre::v1::InstancedEntity::isInScene (void) const |
|
bool | Ogre::v1::InstancedEntity::isInUse () const |
| Tells if the entity is in use.
|
|
bool | Ogre::v1::InstanceManagerCmp::operator() (const InstanceManager *a, const InstanceManager *b) const |
|
bool | Ogre::v1::InstanceManagerCmp::operator() (const InstanceManager *a, IdString name) const |
|
FORCEINLINE void | Ogre::v1::InstanceBatchHW_VTF::SendAllSingleTransformsToTexture::operator() (const MovableObject *mo) |
|
FORCEINLINE void | Ogre::v1::InstanceBatchHW_VTF::SendAllAnimatedTransformsToTexture::operator() (const MovableObject *mo) |
|
FORCEINLINE void | Ogre::v1::InstanceBatchHW_VTF::SendAllLUTToTexture::operator() (const MovableObject *mo) |
|
FORCEINLINE void | Ogre::v1::InstanceBatchHW_VTF::SendAllDualQuatTexture::operator() (const MovableObject *mo) |
|
bool | Ogre::v1::InstanceManagerCmp::operator() (IdString name, const InstanceManager *a) const |
|
void | Ogre::v1::InstanceBatch::removeInstancedEntity (InstancedEntity *instancedEntity) |
| Removes an InstancedEntity from the scene retrieved with getNewInstancedEntity, putting back into a queue.
|
|
void | Ogre::v1::InstanceManager::setBatchesAsStatic (bool bStatic) |
| Tells this batch to stop updating animations, positions, rotations, and display all it's active instances.
|
|
void | Ogre::v1::BaseInstanceBatchVTF::setBoneDualQuaternions (bool enable) |
|
void | Ogre::v1::BaseInstanceBatchVTF::setBoneMatrixLookup (bool enable, size_t maxLookupTableInstances) |
| Sets the state of the usage of bone matrix lookup.
|
|
void | Ogre::v1::InstancedEntity::setCustomParam (unsigned char idx, const Vector4 &newParam) |
| Sets the custom parameter for this instance.
|
|
void | Ogre::v1::BaseInstanceBatchVTF::setForceOneWeight (bool enable) |
|
void | Ogre::v1::InstanceManager::setInstancesPerBatch (size_t instancesPerBatch) |
| Raises an exception if trying to change it after creating the first InstancedEntity.
|
|
void | Ogre::v1::InstanceManager::setMaxLookupTableInstances (size_t maxLookupTableInstances) |
| Sets the size of the lookup table for techniques supporting bone lookup table.
|
|
void | Ogre::v1::InstanceManager::setNumCustomParams (unsigned char numCustomParams) |
| Sets the number of custom parameters per instance.
|
|
void | Ogre::v1::InstanceManager::setSetting (BatchSettingId id, bool enabled, IdString materialName=IdString()) |
| Applies a setting for all batches using the same material_ existing ones and those that will be created in the future.
|
|
bool | Ogre::v1::InstanceBatch::setStatic (bool bStatic) |
| Tells this batch to stop updating animations, positions, rotations, and display all it's active instances.
|
|
void | Ogre::v1::InstancedEntity::setTransformLookupNumber (uint16 num) |
| Sets the transformation look up number.
|
|
void | Ogre::v1::BaseInstanceBatchVTF::setUseOneWeight (bool enable) |
|
bool | Ogre::v1::InstancedEntity::shareTransformWith (InstancedEntity *slave) |
| Shares the entire transformation with another InstancedEntity.
|
|
void | Ogre::v1::InstancedEntity::stopSharingTransform () |
|
bool | Ogre::v1::BaseInstanceBatchVTF::useBoneDualQuaternions () const |
|
bool | Ogre::v1::BaseInstanceBatchVTF::useBoneMatrixLookup () const |
| Tells whether to use bone matrix lookup.
|
|
bool | Ogre::v1::BaseInstanceBatchVTF::useOneWeight () const |
|
There are two Instancing techniques that perform culling of their own: HW Basic HW VTF Frustum culling is highly parallelizable & scalable.
However, we first cull InstanceBatches & regular entities, then ask the culled InstanceBatches to perform their culling to the InstancedEntities they own. This results performance boost for skipping large amounts of instanced entities when the whole batch isn't visible. However, this also means threading frustum culling of instanced entities got harder.
- There are four approaches: Ask all existing batches to frustum cull. Then use only the ones we want. Sheer brute force. Scales very well with cores, but sacrifices performance unnecessary when only a few batches are visible. This approach is not taken by Ogre.
Sync every time an InstanceBatchHW or InstanceBatchHW_VTF tries to frustum cull to delegate the job on worker threads. Considering there could be hundreds of InstanceBatches, this would cause a huge amount of thread synchronization overhead & context switches. This approach is not taken by Ogre.
Each thread after having culled all InstancedBatches & Entities, will parse the culled list to ask all MovableObjects to perform culling of their own. Entities will ignore this call (however they add to a small overhead for traversing them and calling a virtual function) while InstanceBatchHW & InstanceBatchHW_VTF will perform their own culling from within the multiple threads. This approach scales well with cores and only visible batches. However load balancing may be an issue for certain scenes: eg. an InstanceBatch with 5000 InstancedEntities in one thread, while the other three threads get one InstanceBatch each with 50 InstancedEntities. The first thread will have considerably more work to do than the other three. This approach is a good balance when compared to the first two. This is the approach taken by Ogre when INSTANCING_CULLING_THREADED is on
Don't multithread instanced entitites' frustum culling. Only the InstanceBatch & Entity's frustum culling will be threaded. This is what happens when INSTANCING_CULLING_SINGLE is on.
Whether INSTANCING_CULLING_THREADED improves or degrades performance depends highly on your scene.
- When to use INSTANCING_CULLING_SINGLETHREAD? If your scene doesn't use HW Basic or HW VTF instancing techniques, or you have very few Instanced entities compared to the amount of regular Entities. Turning threading on, you'll be wasting your time traversing the list from multiple threads in search of InstanceBatchHW & InstanceBatchHW_VTF
When to use INSTANCING_CULLING_THREADED? If your scene makes intensive use of HW Basic and/or HW VTF instancing techniques. Note that threaded culling is performed in SCENE_STATIC instances too. The most advantage is seen when the instances per batch is very high and when doing many PASS_SCENE, which require frustum culling multiple times per frame (eg. pssm shadows, multiple light sources with shadows, very advanced compositing, etc)
Note that you can switch between methods at any time at runtime.
Enumerator |
---|
INSTANCING_CULLING_SINGLETHREAD | |
INSTANCING_CULLING_THREADED | |