wined3d: Don't render single buffered swapchains to a FBO.

This commit is contained in:
Stefan Dösinger 2009-12-15 20:16:19 +01:00 committed by Alexandre Julliard
parent 6f2ec37b60
commit 718e55b9a6
2 changed files with 8 additions and 2 deletions

View File

@ -6527,8 +6527,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE
RECT client_rect;
GetClientRect(swapchain->win_handle, &client_rect);
if(swapchain->presentParms.BackBufferWidth != client_rect.right ||
swapchain->presentParms.BackBufferHeight != client_rect.bottom)
if(!swapchain->presentParms.BackBufferCount)
{
TRACE("Single buffered rendering\n");
swapchain->render_to_fbo = FALSE;
}
else if(swapchain->presentParms.BackBufferWidth != client_rect.right ||
swapchain->presentParms.BackBufferHeight != client_rect.bottom )
{
TRACE("Rendering to FBO. Backbuffer %ux%u, window %ux%u\n",
swapchain->presentParms.BackBufferWidth,

View File

@ -739,6 +739,7 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface
swapchain->presentParms = *present_parameters;
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
&& present_parameters->BackBufferCount
&& (present_parameters->BackBufferWidth != client_rect.right
|| present_parameters->BackBufferHeight != client_rect.bottom))
{