Save render state across glFinish.

TRAC #12164 Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Andrew Lewycky git-svn-id: https://angleproject.googlecode.com/svn/trunk@270 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 2c42c6c3
...@@ -2512,6 +2512,9 @@ void Context::finish() ...@@ -2512,6 +2512,9 @@ void Context::finish()
if (occlusionQuery) if (occlusionQuery)
{ {
IDirect3DStateBlock9 *savedState = NULL;
device->CreateStateBlock(D3DSBT_ALL, &savedState);
occlusionQuery->Issue(D3DISSUE_BEGIN); occlusionQuery->Issue(D3DISSUE_BEGIN);
// Render something outside the render target // Render something outside the render target
...@@ -2531,6 +2534,12 @@ void Context::finish() ...@@ -2531,6 +2534,12 @@ void Context::finish()
} }
occlusionQuery->Release(); occlusionQuery->Release();
if (savedState)
{
savedState->Apply();
savedState->Release();
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment