worldPosition -= cameraPosition;
Vector3 actorSize = node.GetSize(bufferIndex) * node.GetWorldScale(bufferIndex);
- auto sceneSize = scene.GetCurrentSurfaceRect(); // Use the update object's size
+ const auto& sceneSize = scene.GetCurrentSurfaceRect(); // Use the update object's size
Vector2 halfSceneSize(sceneSize.width * 0.5f, sceneSize.height * 0.5f); // World position origin is center of scene
Vector3 halfActorSize(actorSize * 0.5f);
Vector3 anchorPointOffSet = halfActorSize - actorSize * actor.GetAnchorPointForPosition();
const auto& node = actor.GetNode();
Scene& scene = actor.GetScene();
- auto worldMatrix = node.GetWorldMatrix(bufferIndex);
+ const auto& worldMatrix = node.GetWorldMatrix(bufferIndex);
const auto& renderTaskList = scene.GetRenderTaskList();
ConvertLocalToScreenRenderTaskList(renderTaskList, actor, worldMatrix, node.GetSize(bufferIndex) * (actor.GetAnchorPointForPosition() - Vector3(0.5f, 0.5f, 0.5f)), result.x, result.y);
}
const auto& node = actor.GetNode();
Scene& scene = actor.GetScene();
- auto worldMatrix = node.GetWorldMatrix(bufferIndex);
+ const auto& worldMatrix = node.GetWorldMatrix(bufferIndex);
const auto& renderTaskList = scene.GetRenderTaskList();
ConvertLocalToScreenExtentRenderTaskList(renderTaskList, actor, worldMatrix, node.GetSize(bufferIndex), result);
}
auto program = item.mRenderer->PrepareProgram(instruction);
if(program)
{
- auto memoryRequirements = program->GetUniformBlocksMemoryRequirements();
+ const auto& memoryRequirements = program->GetUniformBlocksMemoryRequirements();
totalSizeCPU += memoryRequirements.totalCpuSizeRequired;
totalSizeGPU += memoryRequirements.totalGpuSizeRequired;