[4/6] WineD3D: Infrastructure to render swapchains to a FBO

Henri Verbeet hverbeet at gmail.com
Wed Dec 2 15:10:38 CST 2009


2009/12/2 Stefan Dösinger <stefan at codeweavers.com>:
> @@ -1082,6 +1082,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSwapChain(IWineD3DDevice *iface,
>      object->wineD3DDevice = This;
>      object->parent = parent;
>      object->ref = 1;
> +    object->render_to_fbo = FALSE;
This is redundant, the field is already initialized to 0.

> @@ -1880,6 +1881,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
>
>      switch(wined3d_settings.offscreen_rendering_mode) {
>          case ORM_FBO:
> +            This->offscreenBuffer = GL_COLOR_ATTACHMENT0;
This change is probably correct, but note that if it matters you're
probably doing something wrong.

> @@ -959,22 +963,25 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, CONST RECT *rect, v
...
> @@ -3102,7 +3109,7 @@ static inline void fb_copy_to_texture_direct(IWineD3DSurfaceImpl *This, IWineD3D
...
> @@ -3241,12 +3248,12 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine
Most of this should be part of patch 3. Note that since we have
SFLAG_SWAPCHAIN we don't really need to pass the swapchain to
surface_get_gl_buffer() anymore, we can just cast This->container
directly to IWineD3DSwapChainImpl *.

> +static inline void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context *context)
We have a number of functions now that do something very similar to
what this function does. Perhaps it's time to spend some time on our
blitter in order to unify those?



More information about the wine-devel mailing list