Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 364 vs 365 for /trunk/Source Code/Core/Kernel.cpp

Diff revisions: vs.
  @@ -275,11 +275,11 @@
275 275 }
276 276
277 277 void Kernel::renderScene() {
278 - RenderStage stage = (_GFX.getRenderer().getType() != RENDERER_FORWARD_PLUS)
279 - ? DEFERRED_STAGE
280 - : FINAL_STAGE;
278 + RenderStage stage = (_GFX.getRenderer().getType() != RendererType::RENDERER_FORWARD_PLUS)
279 + ? RenderStage::DEFERRED_STAGE
280 + : RenderStage::FINAL_STAGE;
281 281 bool postProcessing =
282 - (stage != DEFERRED_STAGE && _GFX.postProcessingEnabled());
282 + (stage != RenderStage::DEFERRED_STAGE && _GFX.postProcessingEnabled());
283 283
284 284 if (_GFX.anaglyphEnabled() && postProcessing) {
285 285 renderSceneAnaglyph();
  @@ -297,7 +297,7 @@
297 297 // Z-prePass
298 298 _GFX.getRenderTarget(GFXDevice::RENDER_TARGET_DEPTH)
299 299 ->Begin(Framebuffer::defaultPolicy());
300 - _sceneMgr.render(Z_PRE_PASS_STAGE, *this);
300 + _sceneMgr.render(RenderStage::Z_PRE_PASS_STAGE, *this);
301 301 _GFX.getRenderTarget(GFXDevice::RENDER_TARGET_DEPTH)->End();
302 302
303 303 _GFX.ConstructHIZ();
  @@ -318,9 +318,9 @@
318 318 }
319 319
320 320 void Kernel::renderSceneAnaglyph() {
321 - RenderStage stage = (_GFX.getRenderer().getType() != RENDERER_FORWARD_PLUS)
322 - ? DEFERRED_STAGE
323 - : FINAL_STAGE;
321 + RenderStage stage = (_GFX.getRenderer().getType() != RendererType::RENDERER_FORWARD_PLUS)
322 + ? RenderStage::DEFERRED_STAGE
323 + : RenderStage::FINAL_STAGE;
324 324
325 325 Framebuffer::FramebufferTarget depthPassPolicy, colorPassPolicy;
326 326 depthPassPolicy._depthOnly = true;
  @@ -335,7 +335,7 @@
335 335 // Z-prePass
336 336 _GFX.getRenderTarget(GFXDevice::RENDER_TARGET_DEPTH)
337 337 ->Begin(Framebuffer::defaultPolicy());
338 - SceneManager::getInstance().render(Z_PRE_PASS_STAGE, *this);
338 + SceneManager::getInstance().render(RenderStage::Z_PRE_PASS_STAGE, *this);
339 339 _GFX.getRenderTarget(GFXDevice::RENDER_TARGET_DEPTH)->End();
340 340 // first screen buffer
341 341 _GFX.getRenderTarget(GFXDevice::RENDER_TARGET_SCREEN)
  @@ -352,7 +352,7 @@
352 352 // Z-prePass
353 353 _GFX.getRenderTarget(GFXDevice::RENDER_TARGET_DEPTH)
354 354 ->Begin(Framebuffer::defaultPolicy());
355 - SceneManager::getInstance().render(Z_PRE_PASS_STAGE, *this);
355 + SceneManager::getInstance().render(RenderStage::Z_PRE_PASS_STAGE, *this);
356 356 _GFX.getRenderTarget(GFXDevice::RENDER_TARGET_DEPTH)->End();
357 357 // second screen buffer
358 358 _GFX.getRenderTarget(GFXDevice::RENDER_TARGET_ANAGLYPH)
  @@ -447,8 +447,12 @@
447 447 // Using OpenGL for rendering as default
448 448 _GFX.setAPI(GFXDevice::OpenGL);
449 449 _GFX.setStateChangeExclusionMask(
450 - TYPE_LIGHT | TYPE_TRIGGER | TYPE_PARTICLE_EMITTER | TYPE_SKY |
451 - TYPE_VEGETATION_GRASS | TYPE_VEGETATION_TREES);
450 + enum_to_uint(SceneNodeType::TYPE_LIGHT) |
451 + enum_to_uint(SceneNodeType::TYPE_TRIGGER) |
452 + enum_to_uint(SceneNodeType::TYPE_PARTICLE_EMITTER) |
453 + enum_to_uint(SceneNodeType::TYPE_SKY) |
454 + enum_to_uint(SceneNodeType::TYPE_VEGETATION_GRASS) |
455 + enum_to_uint(SceneNodeType::TYPE_VEGETATION_TREES));
452 456 // Target FPS is usually 60. So all movement is capped around that value
453 457 Time::ApplicationTimer::getInstance().init(Config::TARGET_FRAME_RATE);
454 458 // Load info from XML files
  @@ -480,7 +484,7 @@
480 484 _cameraMgr->pushActiveCamera(camera);
481 485
482 486 // Load and render the splash screen
483 - _GFX.setRenderStage(FINAL_STAGE);
487 + _GFX.setRenderStage(RenderStage::FINAL_STAGE);
484 488 _GFX.beginFrame();
485 489 GUISplash("divideLogo.jpg", vec2<U16>(400, 300)).render();
486 490 _GFX.endFrame();