wined3d/d3d9: Set the initial scissor rect to the window size

Stefan Dösinger stefan at codeweavers.com
Fri Aug 22 15:06:58 CDT 2008


> > Are you sure you shouldn't be using the primary swapchain's
> backbuffer
> > dimensions?
> I'm not sure what exactly you mean.
Something like this:

IWineD3DSwapChain *swapchain;
IWineD3DSurface *backbuffer;
D3DSURFACE_DESC desc;

IWineD3DDevice_GetSwapChain(device, 0, &swapchain)
IWineD3DSwapChain_GetBackBuffer(swapchain, &backbuffer);
IWineD3DSurface_GetSurfaceDesc(backbuffer, &desc);
IWineD3DSurface_Release(backbuffer);
IWineD3DSwapChain_Release(swapchain);

scissorrect = {0, 0, desc.Width, desc.Height};

Just pseudocode, please look up the exact names of the methods and members.
Maybe there's a IWineD3DDevice_GetBackBuffer method which spares you the
extra GetSwapChain call. Don't forget the release calls.

The difference between your original patch and this can be seen in Windowed
mode. I recommend to put the appropriate test into dlls/d3d9/tests/device.c
and create a Windowed device.





More information about the wine-devel mailing list