Fixed issues with state force flag initialization and applyRenderTarget placement.
TRAC #22041
Fixed the state force flags being incorrectly initialized in Renderer9's
destructor, they are now in the constructor. Renderer::applyRenderTarget
is now correctly called fromt he begining of Context::applyRenderTarget
instead of the end.
Signed-off-by: Daniel Koch
Author: Geoff Lang
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1425 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp
index 7afce94..646baed 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -1751,6 +1751,8 @@
return error(GL_INVALID_FRAMEBUFFER_OPERATION, false);
}
+ mRenderer->applyRenderTarget(framebufferObject);
+
// if there is no color attachment we must synthesize a NULL colorattachment
// to keep the D3D runtime happy. This should only be possible if depth texturing.
Renderbuffer *renderbufferObject = NULL;
@@ -1904,8 +1906,6 @@
mDxUniformsDirty = false;
}
- mRenderer->applyRenderTarget(framebufferObject);
-
return true;
}