Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 838 vs 851 for /trunk/Source Code/Environment/Sky/Sky.cpp

Diff revisions: vs.
  @@ -120,8 +120,8 @@
120 120 SceneNode::sceneUpdate(deltaTime, sgn, sceneState);
121 121 }
122 122
123 - bool Sky::onRender(RenderStage currentStage) {
124 - return _sky->onRender(currentStage);
123 + bool Sky::onRender(const RenderStagePass& renderStagePass) {
124 + return _sky->onRender(renderStagePass);
125 125 }
126 126
127 127 void Sky::initialiseDrawCommands(SceneGraphNode& sgn,
  @@ -136,18 +136,17 @@
136 136 }
137 137
138 138 void Sky::updateDrawCommands(SceneGraphNode& sgn,
139 - RenderStage renderStage,
139 + const RenderStagePass& renderStagePass,
140 140 const SceneRenderState& sceneRenderState,
141 141 GenericDrawCommands& drawCommandsInOut) {
142 142
143 143 GenericDrawCommand& cmd = drawCommandsInOut.front();
144 - cmd.stateHash(renderStage == RenderStage::REFLECTION
145 - ? _skyboxRenderStateReflectedHash
146 - : renderStage == RenderStage::Z_PRE_PASS
147 - ? _skyboxRenderStateHashPrePass
148 - : _skyboxRenderStateHash);
149 - cmd.shaderProgram(renderStage == RenderStage::Z_PRE_PASS ? _skyShaderPrePass : _skyShader);
150 - SceneNode::updateDrawCommands(sgn, renderStage, sceneRenderState, drawCommandsInOut);
144 + cmd.stateHash(renderStagePass._stage == RenderStage::REFLECTION
145 + ? _skyboxRenderStateReflectedHash
146 + : renderStagePass._prePass ? _skyboxRenderStateHashPrePass
147 + : _skyboxRenderStateHash);
148 + cmd.shaderProgram(renderStagePass._prePass ? _skyShaderPrePass : _skyShader);
149 + SceneNode::updateDrawCommands(sgn, renderStagePass, sceneRenderState, drawCommandsInOut);
151 150 }
152 151
153 152 void Sky::setSunProperties(const vec3<F32>& sunVect,