Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 777 vs 778 for /trunk/Source Code/Platform/Video/GFXDevice.cpp

Diff revisions: vs.
  @@ -6,11 +6,11 @@
6 6 #include "Core/Headers/ParamHandler.h"
7 7 #include "Core/Time/Headers/ProfileTimer.h"
8 8 #include "Managers/Headers/SceneManager.h"
9 + #include "Managers/Headers/RenderPassManager.h"
9 10
10 11 #include "Rendering/Headers/Renderer.h"
11 12 #include "Rendering/PostFX/Headers/PostFX.h"
12 13 #include "Rendering/Camera/Headers/FreeFlyCamera.h"
13 - #include "Rendering/RenderPass/Headers/RenderPass.h"
14 14
15 15 #include "Platform/Video/Headers/IMPrimitive.h"
16 16 #include "Platform/Video/Headers/RenderStateBlock.h"
  @@ -404,29 +404,16 @@
404 404
405 405 /// Update the virtual camera's matrices and upload them to the GPU
406 406 F32* GFXDevice::lookAt(const mat4<F32>& viewMatrix, const vec3<F32>& eyePos) {
407 - bool updated = false;
408 -
409 - GPUBlock::GPUData& data = _gpuBlock._data;
410 -
411 - if (eyePos != _gpuBlock._data._cameraPosition.xyz()) {
412 - data._cameraPosition.xyz(eyePos);
413 - updated = true;
414 - }
415 -
416 407 if (viewMatrix != _gpuBlock._data._ViewMatrix) {
408 + GPUBlock::GPUData& data = _gpuBlock._data;
417 409 data._ViewMatrix.set(viewMatrix);
418 - updated = true;
419 - }
420 -
421 - if (updated) {
410 + data._cameraPosition.xyz(eyePos);
422 411 _gpuBlock.update(true);
423 - }
424 412
425 - return data._ViewMatrix.mat;
413 + return _gpuBlock._data._ViewMatrix.mat;
426 414 }
427 415
428 - /// Enable an orthographic projection and upload the corresponding matrices to
429 - /// the GPU
416 + /// Enable an orthographic projection and upload the corresponding matrices to the GPU
430 417 F32* GFXDevice::setProjection(const vec4<F32>& rect, const vec2<F32>& planes) {
431 418 GPUBlock::GPUData& data = _gpuBlock._data;
432 419