mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Integrates components into the update and render loop.
This commit is contained in:
parent
fa78a2f354
commit
b3b50abd9b
3 changed files with 46 additions and 1 deletions
|
|
@ -26,7 +26,8 @@
|
|||
#include "renderInstance/renderPassManager.h"
|
||||
#include "math/util/matrixSet.h"
|
||||
|
||||
|
||||
#include "T3D/Components/render/renderComponentInterface.h"
|
||||
#include "T3D/Components/Component.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -104,6 +105,17 @@ void SceneRenderState::renderObjects( SceneObject** objects, U32 numObjects )
|
|||
SceneObject* object = objects[ i ];
|
||||
object->prepRenderImage( this );
|
||||
}
|
||||
|
||||
U32 interfaceCount = RenderComponentInterface::all.size();
|
||||
for (U32 i = 0; i < RenderComponentInterface::all.size(); i++)
|
||||
{
|
||||
Component* comp = dynamic_cast<Component*>(RenderComponentInterface::all[i]);
|
||||
|
||||
if (comp->isClientObject() && comp->isActive())
|
||||
{
|
||||
RenderComponentInterface::all[i]->prepRenderImage(this);
|
||||
}
|
||||
}
|
||||
PROFILE_END();
|
||||
|
||||
// Render what the objects have batched.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue