Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 264 vs 268 for /trunk/Source Code/Rendering/Camera/Camera.cpp

Diff revisions: vs.
  @@ -243,30 +243,29 @@
243 243 _reflectionRendering = false;
244 244 _frustumDirty = true;
245 245 }
246 - lookAtInternal(false);
246 + lookAtInternal();
247 247 }
248 248
249 249 void Camera::renderLookAtReflected(const Plane<F32>& reflectionPlane){
250 250 _reflectionRendering = true;
251 251 _reflectedViewMatrix.reflect(reflectionPlane);
252 252 _reflectedEye = _reflectedViewMatrix * _eye;
253 - _reflectedViewMatrix = _reflectedViewMatrix * _viewMatrix;
254 253 _frustumDirty = true;
255 254
256 - lookAtInternal(true);
255 + lookAtInternal();
257 256 }
258 257
259 - void Camera::lookAtInternal(bool reflection) {
258 + void Camera::lookAtInternal() {
260 259 assert(_isActive);
261 -
262 260 updateMatrices();
263 261
264 262 //Tell the Rendering API to draw from our desired PoV
265 - GFX_DEVICE.lookAt(reflection ? _reflectedViewMatrix : _viewMatrix);
263 + GFX_DEVICE.lookAt(_reflectionRendering ? (_reflectedViewMatrix * _viewMatrix) : _viewMatrix);
266 264
267 265 updateFrustum();
268 266 //Inform all listeners of a new event
269 267 updateListeners();
268 +
270 269 }
271 270
272 271 void Camera::setProjection(F32 aspectRatio, F32 verticalFoV, const vec2<F32>& zPlanes, bool updateOnSet){