Fixed broken Interleaved 3D output when GL Sampler objects are used

This commit is contained in:
Kirill Gavrilov 2017-06-02 09:06:18 +03:00 committed by Christoph Oelckers
parent 5502421901
commit 2a8ebc6c27

View file

@ -37,6 +37,7 @@
#include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_renderer.h"
#include "gl/renderer/gl_renderbuffers.h" #include "gl/renderer/gl_renderbuffers.h"
#include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_renderer.h"
#include "gl/renderer/gl_postprocessstate.h"
#include "gl/system/gl_framebuffer.h" #include "gl/system/gl_framebuffer.h"
#include "gl/shaders/gl_present3dRowshader.h" #include "gl/shaders/gl_present3dRowshader.h"
@ -122,6 +123,8 @@ static void prepareInterleavedPresent(FPresentStereoShaderBase& shader)
void CheckerInterleaved3D::Present() const void CheckerInterleaved3D::Present() const
{ {
FGLPostProcessState savedState;
savedState.SaveTextureBindings(2);
prepareInterleavedPresent(*GLRenderer->mPresent3dCheckerShader); prepareInterleavedPresent(*GLRenderer->mPresent3dCheckerShader);
// Compute absolute offset from top of screen to top of current display window // Compute absolute offset from top of screen to top of current display window
@ -165,6 +168,8 @@ void s3d::CheckerInterleaved3D::AdjustViewports() const
void ColumnInterleaved3D::Present() const void ColumnInterleaved3D::Present() const
{ {
FGLPostProcessState savedState;
savedState.SaveTextureBindings(2);
prepareInterleavedPresent(*GLRenderer->mPresent3dColumnShader); prepareInterleavedPresent(*GLRenderer->mPresent3dColumnShader);
// Compute absolute offset from top of screen to top of current display window // Compute absolute offset from top of screen to top of current display window
@ -185,6 +190,8 @@ void ColumnInterleaved3D::Present() const
void RowInterleaved3D::Present() const void RowInterleaved3D::Present() const
{ {
FGLPostProcessState savedState;
savedState.SaveTextureBindings(2);
prepareInterleavedPresent(*GLRenderer->mPresent3dRowShader); prepareInterleavedPresent(*GLRenderer->mPresent3dRowShader);
// Compute absolute offset from top of screen to top of current display window // Compute absolute offset from top of screen to top of current display window