Browse Source

Viewport Fix for Glow PostFX

- Modified the glow postFX to now respect the current viewport settings.
- This fixes glow rendering for the Oculus Rift and any other time the
glow rendering should be limited to a region of the back buffer.
DavidWyand-GG 12 years ago
parent
commit
c65cca26dd
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Engine/source/renderInstance/renderGlowMgr.cpp

+ 3 - 0
Engine/source/renderInstance/renderGlowMgr.cpp

@@ -151,6 +151,9 @@ void RenderGlowMgr::render( SceneRenderState *state )
 
 
    GFXTransformSaver saver;
    GFXTransformSaver saver;
 
 
+   // Respect the current viewport
+   mNamedTarget.setViewport(GFX->getViewport());
+
    // Tell the superclass we're about to render, preserve contents
    // Tell the superclass we're about to render, preserve contents
    const bool isRenderingToTarget = _onPreRender( state, true );
    const bool isRenderingToTarget = _onPreRender( state, true );