Skip to content

Commit

Permalink
[GLES] Fix for SBS rendering and cached viewport
Browse files Browse the repository at this point in the history
I've also changed the unused function CLinuxRendererGLES::RenderMultiPass
to use the caching wrapper for SetViewPort.
Makes no odds now, but may avoid a problem if it's enabled in future.
  • Loading branch information
popcornmix committed Dec 2, 2013
1 parent 1f67afd commit a02f40e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
Expand Up @@ -1115,8 +1115,8 @@ void CLinuxRendererGLES::RenderMultiPass(int index, int field)
g_matrices.LoadIdentity(); g_matrices.LoadIdentity();
VerifyGLState(); VerifyGLState();
g_matrices.Ortho2D(0, m_sourceWidth, 0, m_sourceHeight); g_matrices.Ortho2D(0, m_sourceWidth, 0, m_sourceHeight);
glViewport(0, 0, m_sourceWidth, m_sourceHeight); CRect viewport(0, 0, m_sourceWidth, m_sourceHeight);
glScissor(0, 0, m_sourceWidth, m_sourceHeight); g_Windowing.SetViewPort(viewport);
g_matrices.MatrixMode(MM_MODELVIEW); g_matrices.MatrixMode(MM_MODELVIEW);
VerifyGLState(); VerifyGLState();


Expand Down
6 changes: 3 additions & 3 deletions xbmc/rendering/gles/RenderSystemGLES.cpp
Expand Up @@ -528,9 +528,9 @@ void CRenderSystemGLES::SetViewPort(CRect& viewPort)
glScissor((GLint) viewPort.x1, (GLint) (m_height - viewPort.y1 - viewPort.Height()), (GLsizei) viewPort.Width(), (GLsizei) viewPort.Height()); glScissor((GLint) viewPort.x1, (GLint) (m_height - viewPort.y1 - viewPort.Height()), (GLsizei) viewPort.Width(), (GLsizei) viewPort.Height());
glViewport((GLint) viewPort.x1, (GLint) (m_height - viewPort.y1 - viewPort.Height()), (GLsizei) viewPort.Width(), (GLsizei) viewPort.Height()); glViewport((GLint) viewPort.x1, (GLint) (m_height - viewPort.y1 - viewPort.Height()), (GLsizei) viewPort.Width(), (GLsizei) viewPort.Height());
m_viewPort[0] = viewPort.x1; m_viewPort[0] = viewPort.x1;
m_viewPort[1] = viewPort.y1; m_viewPort[1] = m_height - viewPort.y1 - viewPort.Height();
m_viewPort[2] = viewPort.x2; m_viewPort[2] = viewPort.Width();
m_viewPort[3] = viewPort.y2; m_viewPort[3] = viewPort.Height();
} }


void CRenderSystemGLES::SetScissors(const CRect &rect) void CRenderSystemGLES::SetScissors(const CRect &rect)
Expand Down

0 comments on commit a02f40e

Please sign in to comment.