gui: don't modify transforms for defined viewport
authorJoakim Plate <elupus@ecce.se>
Sun, 30 Jun 2013 16:06:53 +0000 (18:06 +0200)
committerJoakim Plate <elupus@ecce.se>
Thu, 1 Aug 2013 14:59:05 +0000 (16:59 +0200)
This kills the posibility of using a set viewport to move the
render output with an offset. It is alwo very questionable, if
we should take width/height of viewport into account here either.

xbmc/rendering/dx/RenderSystemDX.cpp
xbmc/rendering/gl/RenderSystemGL.cpp
xbmc/rendering/gles/RenderSystemGLES.cpp

index 5144af6..facf8ec 100644 (file)
@@ -826,7 +826,7 @@ void CRenderSystemDX::SetCameraPosition(const CPoint &camera, int screenWidth, i
   // position.
   D3DXMATRIX flipY, translate, mtxView;
   D3DXMatrixScaling(&flipY, 1.0f, -1.0f, 1.0f);
-  D3DXMatrixTranslation(&translate, -(viewport.X + w + offset.x), -(viewport.Y + h + offset.y), 2*h);
+  D3DXMatrixTranslation(&translate, -(w + offset.x), -(h + offset.y), 2*h);
   D3DXMatrixMultiply(&mtxView, &translate, &flipY);
   m_pD3DDevice->SetTransform(D3DTS_VIEW, &mtxView);
 
index 1e52ccf..9e8ddbe 100644 (file)
@@ -445,7 +445,7 @@ void CRenderSystemGL::SetCameraPosition(const CPoint &camera, int screenWidth, i
 
   glMatrixMode(GL_MODELVIEW);
   glLoadIdentity();
-  glTranslatef(-(viewport[0] + w + offset.x), +(viewport[1] + h + offset.y), 0);
+  glTranslatef(-(w + offset.x), +(h + offset.y), 0);
   gluLookAt(0.0, 0.0, -2.0*h, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0);
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
index e819566..e308b8a 100644 (file)
@@ -392,7 +392,7 @@ void CRenderSystemGLES::SetCameraPosition(const CPoint &camera, int screenWidth,
 
   g_matrices.MatrixMode(MM_MODELVIEW);
   g_matrices.LoadIdentity();
-  g_matrices.Translatef(-(viewport[0] + w + offset.x), +(viewport[1] + h + offset.y), 0);
+  g_matrices.Translatef(-(w + offset.x), +(h + offset.y), 0);
   g_matrices.LookAt(0.0, 0.0, -2.0*h, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0);
   g_matrices.MatrixMode(MM_PROJECTION);
   g_matrices.LoadIdentity();