Permalink
Browse files

Merge pull request #3754 from popcornmix/fix_viewport_cache

[GLES] Fix for SBS rendering and cached viewport
  • Loading branch information...
2 parents 4ddaf65 + a02f40e commit f4d075c596dc7ae36fe2cac170746bb0c55c8e40 @popcornmix popcornmix committed Dec 4, 2013
Showing with 5 additions and 5 deletions.
  1. +2 −2 xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
  2. +3 −3 xbmc/rendering/gles/RenderSystemGLES.cpp
@@ -1115,8 +1115,8 @@ void CLinuxRendererGLES::RenderMultiPass(int index, int field)
g_matrices.LoadIdentity();
VerifyGLState();
g_matrices.Ortho2D(0, m_sourceWidth, 0, m_sourceHeight);
- glViewport(0, 0, m_sourceWidth, m_sourceHeight);
- glScissor(0, 0, m_sourceWidth, m_sourceHeight);
+ CRect viewport(0, 0, m_sourceWidth, m_sourceHeight);
+ g_Windowing.SetViewPort(viewport);
g_matrices.MatrixMode(MM_MODELVIEW);
VerifyGLState();
@@ -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());
glViewport((GLint) viewPort.x1, (GLint) (m_height - viewPort.y1 - viewPort.Height()), (GLsizei) viewPort.Width(), (GLsizei) viewPort.Height());
m_viewPort[0] = viewPort.x1;
- m_viewPort[1] = viewPort.y1;
- m_viewPort[2] = viewPort.x2;
- m_viewPort[3] = viewPort.y2;
+ m_viewPort[1] = m_height - viewPort.y1 - viewPort.Height();
+ m_viewPort[2] = viewPort.Width();
+ m_viewPort[3] = viewPort.Height();
}
void CRenderSystemGLES::SetScissors(const CRect &rect)

0 comments on commit f4d075c

Please sign in to comment.