Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 826 vs 827 for /trunk/Source Code/Graphs/Components/RenderingComponent.cpp

Diff revisions: vs.
  @@ -25,6 +25,7 @@
25 25 _drawOrder(0),
26 26 _commandIndex(0),
27 27 _commandOffset(0),
28 + _preDrawPass(false),
28 29 _castsShadows(true),
29 30 _receiveShadows(true),
30 31 _renderWireframe(false),
  @@ -561,11 +562,15 @@
561 562 }
562 563 }
563 564
565 + void RenderingComponent::prepareDrawPackage(const SceneRenderState& sceneRenderState, RenderStage renderStage) {
566 + _preDrawPass = canDraw(renderStage) && _parentSGN.prepareDraw(sceneRenderState, renderStage);
567 + }
568 +
564 569 RenderPackage&
565 570 RenderingComponent::getDrawPackage(const SceneRenderState& sceneRenderState, RenderStage renderStage) {
566 571 RenderPackage& pkg = _renderData[to_uint(renderStage)];
567 572 pkg.isRenderable(false);
568 - if (canDraw(renderStage) && _parentSGN.prepareDraw(sceneRenderState, renderStage))
573 + if (_preDrawPass)
569 574 {
570 575 for (GenericDrawCommand& cmd : pkg._drawCommands) {
571 576 cmd.renderMask(renderMask());