Fixed retrieving a render target interface and not releasing it

TRAC #12149 Signed-off-by: Andrew Lewycky Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@234 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent c9def0b6
......@@ -146,6 +146,9 @@ void Surface::swap()
mDisplay->startScene();
device->DrawPrimitiveUP(D3DPT_TRIANGLEFAN, 2, quad, 6 * sizeof(float));
textureSurface->Release();
texture->Release();
mDisplay->endScene();
result = mSwapChain->Present(NULL, NULL, NULL, NULL, D3DPRESENT_INTERVAL_IMMEDIATE | D3DPRESENT_DONOTWAIT); // FIXME: Get the swap interval from the associated Display
......@@ -153,9 +156,6 @@ void Surface::swap()
{
return error(EGL_BAD_ALLOC);
}
textureSurface->Release();
texture->Release();
}
}
......
......@@ -550,7 +550,7 @@ void Texture2D::copySubImage(GLint level, GLint xoffset, GLint yoffset, GLint x,
}
else
{
getRenderTarget(GL_TEXTURE_2D);
needRenderTarget();
}
RECT sourceRect;
......
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