History

use references not pointers for ViewFrustums

also unravelling some spaghetti: (1) split Octree stuff out of ViewFrustum (2) moved ViewFrustum from octree to shared lib (3) removed some cruft

Andrew Meadows committed 10 years ago

Commit bcf2cc81 parent 21fa29446 files · +412 −390Browse files

Showing the changes to libraries/render-utils/src/DeferredLightingEffect.cpp (1 of 46 files). Show all

Unified · Split

libraries/render-utils/src/DeferredLightingEffect.cpp+5−5
@@ -218,15 +218,15 @@ void DeferredLightingEffect::render(const render::RenderContextPointer& renderCo · 217 unmodified lines
218 float tHeight = args->_viewport.w / (float)framebufferSize.height();218 float tHeight = args->_viewport.w / (float)framebufferSize.height();
219 219
220 // The view frustum is the mono frustum base220 // The view frustum is the mono frustum base
221 auto viewFrustum = args->_viewFrustum;221 auto viewFrustum = args->getViewFrustum();
222 222
223 // Eval the mono projection223 // Eval the mono projection
224 mat4 monoProjMat;224 mat4 monoProjMat;
225 viewFrustum->evalProjectionMatrix(monoProjMat);225 viewFrustum.evalProjectionMatrix(monoProjMat);
226 226
227 // The mono view transform227 // The mono view transform
228 Transform monoViewTransform;228 Transform monoViewTransform;
229 viewFrustum->evalViewTransform(monoViewTransform);229 viewFrustum.evalViewTransform(monoViewTransform);
230 230
231 // THe mono view matrix coming from the mono view transform231 // THe mono view matrix coming from the mono view transform
232 glm::mat4 monoViewMat;232 glm::mat4 monoViewMat;
@@ -296,8 +296,8 @@ void DeferredLightingEffect::render(const render::RenderContextPointer& renderCo · 63 unmodified lines
296 fetchTexcoordRects[0] = glm::vec4(sMin, tMin, sWidth, tHeight);296 fetchTexcoordRects[0] = glm::vec4(sMin, tMin, sWidth, tHeight);
297 }297 }
298 298
299 auto eyePoint = viewFrustum->getPosition();299 auto eyePoint = viewFrustum.getPosition();
300 float nearRadius = glm::distance(eyePoint, viewFrustum->getNearTopLeft());300 float nearRadius = glm::distance(eyePoint, viewFrustum.getNearTopLeft());
301 301
302 302
303 for (int side = 0; side < numPasses; side++) {303 for (int side = 0; side < numPasses; side++) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t