Added an ignoreViewport parameter to Renderer::setViewport.
TRAC #22145
Signed-off-by: Nicolas Capens
Signed-off-by: Daniel Koch
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1518 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp
index 01d4e55..4ec766a 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -1738,23 +1738,9 @@
mRenderTargetDesc.format = renderbufferObject->getActualFormat();
// D3D9_REPLACE end
- Rectangle viewport = mState.viewport;
- float zNear = clamp01(mState.zNear);
- float zFar = clamp01(mState.zFar);
-
- if (ignoreViewport)
- {
- viewport.x = 0;
- viewport.y = 0;
- viewport.width = mRenderTargetDesc.width;
- viewport.height = mRenderTargetDesc.height;
- zNear = 0.0f;
- zFar = 1.0f;
- }
-
ProgramBinary *programBinary = mState.currentProgram ? getCurrentProgramBinary() : NULL;
-
- if (!mRenderer->setViewport(viewport, zNear, zFar, programBinary, mDxUniformsDirty))
+ if (!mRenderer->setViewport(mState.viewport, mState.zNear, mState.zFar, ignoreViewport,
+ programBinary, mDxUniformsDirty))
{
return false;
}