WineD3D: Frontbuffers are always onscreen

Henri Verbeet hverbeet at gmail.com
Thu Dec 10 16:15:43 CST 2009


2009/12/10 Stefan Dösinger <stefan at codeweavers.com>:
> @@ -6304,7 +6304,7 @@ HRESULT create_primary_opengl_context(IWineD3DDevice *iface, IWineD3DSwapChain *
...
> -    swapchain->context[0]->render_offscreen = swapchain->render_to_fbo;
> +    swapchain->context[0]->render_offscreen = surface_is_offscreen(target);
This will introduce a warning, surface_is_offscreen() takes an
IWineD3DSurface pointer.

> -
> -        swapchain->context[0]->render_offscreen = swapchain->render_to_fbo;
...
> +        if(swapchain->context[0])
> +        {
> +            swapchain->context[0]->render_offscreen = swapchain->render_to_fbo;
> +        }
That's pretty ugly, couple of points:
  - It doesn't make sense for "render_to_fbo" to be TRUE for a
swapchain without back buffer.
  - Setting "render_offscreen" is really the responsibility of the
context_create() call, similar to create_primary_opengl_context().
  - The line is actually wrong, the relevant context has been setup to
render to the front buffer, so "render_offscreen" should always be
FALSE, even if there is a back buffer.



More information about the wine-devel mailing list