OGRE-Next  4.0.0unstable
Object-Oriented Graphics Rendering Engine
Ogre::UniformScalableTask Class Referenceabstract

A uniform task is a highly parallelizable task that can be divided in many threads where all threads take near the same amount of time to perform. More...

#include <OgreUniformScalableTask.h>

+ Inheritance diagram for Ogre::UniformScalableTask:

Public Member Functions

virtual void execute (size_t threadId, size_t numThreads)=0
 Overload this function to perform whatever you want. More...
 

Detailed Description

A uniform task is a highly parallelizable task that can be divided in many threads where all threads take near the same amount of time to perform.

They're very simple and not many jobs fit the needs (usually a task-based solution used thread pools is preferred) but there is a prime candidate for this type of solution: Updating all nodes' position & orientation copied from the physics engine. Use it wherever it is accepted in Ogre. For example

See also
SceneManager::processUserScalableTask

Member Function Documentation

◆ execute()

virtual void Ogre::UniformScalableTask::execute ( size_t  threadId,
size_t  numThreads 
)
pure virtual

Overload this function to perform whatever you want.

It will be called from all worker threads at the same time.

Parameters
threadIdThe index of the thread it is being called from. An index is guaranteed to be in range [0; numThreads)
numThreadsNumber of total threads

Implemented in Ogre::ForwardClustered.


The documentation for this class was generated from the following file: