Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 116 vs 117 for /trunk/Source Code/Hardware/Video/GFXDevice.cpp

Diff revisions: vs.
  @@ -7,9 +7,9 @@
7 7
8 8 #include "Managers/Headers/SceneManager.h"
9 9 #include "Managers/Headers/ShaderManager.h"
10 - #include "Managers/Headers/CameraManager.h"
11 10
12 11 #include "Rendering/PostFX/Headers/PostFX.h"
12 + #include "Rendering/Camera/Headers/Camera.h"
13 13 #include "Rendering/RenderPass/Headers/RenderQueue.h"
14 14
15 15 #include "Geometry/Shapes/Headers/Object3D.h"
  @@ -244,7 +244,10 @@
244 244 _api.renderInViewport(rect,callback);
245 245 }
246 246
247 - void GFXDevice::generateCubeMap(FrameBufferObject& cubeMap, const vec3<F32>& pos, boost::function0<void> callback){
247 + void GFXDevice::generateCubeMap(FrameBufferObject& cubeMap,
248 + Camera* const activeCamera,
249 + const vec3<F32>& pos,
250 + boost::function0<void> callback){
248 251 ///Don't need to override cubemap rendering callback
249 252 if(callback.empty()){
250 253 SceneGraph* sg = GET_ACTIVE_SCENE()->getSceneGraph();
  @@ -257,12 +260,11 @@
257 260 return;
258 261 }
259 262 ///Get some global vars
260 - Camera* cam = CameraManager::getInstance().getActiveCamera();
261 263 ParamHandler& par = ParamHandler::getInstance();
262 264 F32 zNear = par.getParam<F32>("zNear");
263 265 F32 zFar = par.getParam<F32>("zFar");
264 266 ///Save our current camera settings
265 - cam->SaveCamera();
267 + activeCamera->SaveCamera();
266 268 ///And save all camera transform matrices
267 269 lockModelView();
268 270 lockProjection();
  @@ -275,7 +277,7 @@
275 277 ///For each of the environment's faces (TOP,DOWN,NORTH,SOUTH,EAST,WEST)
276 278 for(U8 i = 0; i < 6; i++){
277 279 ///Set the correct camera orientation and position for current face
278 - cam->RenderLookAtToCubeMap( pos, i );
280 + activeCamera->RenderLookAtToCubeMap( pos, i );
279 281 ///Bind our FBO's current face
280 282 cubeMap.Begin(i);
281 283 ///draw our scene
  @@ -289,7 +291,7 @@
289 291 releaseProjection();
290 292 releaseModelView();
291 293 ///And restore camera
292 - cam->RestoreCamera();
294 + activeCamera->RestoreCamera();
293 295 }
294 296
295 297 RenderStateBlock* GFXDevice::createStateBlock(const RenderStateBlockDescriptor& descriptor){