Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 726 vs 727 for /trunk/Source Code/Scenes/Headers/SceneState.h

Diff revisions: vs.
  @@ -57,15 +57,21 @@
57 57 };
58 58
59 59 class Scene;
60 + class LightPool;
61 + class RenderPass;
60 62 namespace Attorney {
61 63 class SceneRenderStateScene;
62 64 class SceneStateScene;
65 + class SceneRenderStateLightPool;
66 + class SceneRenderStateRenderPass;
63 67 };
64 68
65 69 /// Contains all the information needed to render the scene: camera position,
66 70 /// render state, etc
67 71 class SceneRenderState : public SceneComponent {
68 72 friend class Attorney::SceneRenderStateScene;
73 + friend class Attorney::SceneRenderStateLightPool;
74 + friend class Attorney::SceneRenderStateRenderPass;
69 75
70 76 public:
71 77 enum class GizmoState : U32 {
  @@ -152,11 +158,19 @@
152 158 _gizmoState = newState;
153 159 }
154 160
161 +
162 + inline I32 currentShadowLightIndex() {
163 + return _currentShadowLightIndex;
164 + }
165 +
166 + inline I32 currentReflectorIndex() {
167 + return _currentReflectorIndex;
168 + }
169 +
155 170 inline GizmoState gizmoState() const {
156 171 return _gizmoState;
157 172 }
158 173
159 -
160 174 inline CameraManager& getCameraMgr() {
161 175 return *_cameraMgr;
162 176 }
  @@ -179,6 +193,13 @@
179 193 _playAnimations = state;
180 194 }
181 195
196 + inline void currentShadowLightIndex(I32 idx) {
197 + _currentShadowLightIndex = idx;
198 + }
199 +
200 + inline void currentReflectorIndex(I32 idx) {
201 + _currentReflectorIndex = idx;
202 + }
182 203 protected:
183 204 bool _drawBB;
184 205 bool _debugDrawLines;
  @@ -191,6 +212,9 @@
191 212 bool _drawWireframe;
192 213 bool _drawOctreeRegions;
193 214
215 + I32 _currentShadowLightIndex;
216 + I32 _currentReflectorIndex;
217 +
194 218 GizmoState _gizmoState;
195 219 CameraManager* _cameraMgr;
196 220 };
  @@ -338,6 +362,26 @@
338 362 friend class Divide::Scene;
339 363 };
340 364
365 + class SceneRenderStateLightPool {
366 + private:
367 + static void shadowLightIndex(SceneRenderState& sceneRenderState,
368 + I32 shadowLightIndex) {
369 + sceneRenderState.currentShadowLightIndex(shadowLightIndex);
370 + }
371 +
372 + friend class Divide::LightPool;
373 + };
374 +
375 + class SceneRenderStateRenderPass {
376 + private:
377 + static void reflectorIndex(SceneRenderState& sceneRenderState,
378 + I32 reflectorIndex) {
379 + sceneRenderState.currentReflectorIndex(reflectorIndex);
380 + }
381 +
382 + friend class Divide::RenderPass;
383 + };
384 +
341 385 class SceneStateScene {
342 386 private:
343 387 friend class Divide::Scene;