Commit Graph

3833 Commits

Author SHA1 Message Date
Henri Verbeet a389fe551e wined3d: IWineD3DStateBlockImpl no longer implements IWineD3DBase. 2009-12-18 11:38:59 +01:00
Henri Verbeet 23f05028f8 wined3d: Add some error handling to create_primary_opengl_context(). 2009-12-18 11:38:49 +01:00
Henri Verbeet 4c66141c99 wined3d: Add a function to destroy dummy textures.
The next patch uses this.
2009-12-18 11:38:43 +01:00
Henri Verbeet 7fe3ab5a23 wined3d: Don't touch "ppSurface" on failure in IWineD3DDeviceImpl_CreateSurface().
I originally kept these when adding surface_init() in
5f581975dc because the original code had them on
most error paths. However, this actually broke ddraw because it assumed we
don't touch "ppSurface" on errors. Just remove these since they're useless
anyway.
2009-12-18 11:38:40 +01:00
Roderick Colenbrander 6d8c4572ef wined3d: Fix a bug in BtlFast which was uncovered by the 32-bit dibsection support. 2009-12-17 12:53:19 +01:00
Henri Verbeet bd1ec9eb02 wined3d: Cleanup IWineD3DDeviceImpl_GetBackBuffer(). 2009-12-17 12:43:20 +01:00
Henri Verbeet 35d5e7669e wined3d: Change an ERR to a WARN in IWineD3DVolumeImpl_UnlockBox().
Trying to unlock a volume that isn't locked is questionable behaviour on the
side of the application, but not an internal error.
2009-12-17 12:43:16 +01:00
Henri Verbeet d5a8637ecc wined3d: Change an ERR to a TRACE in IWineD3DEventQueryImpl_GetData().
This is allowed behaviour.
2009-12-17 12:43:11 +01:00
Stefan Dösinger 8eeb513b1a wined3d: Fix VBO buffer usage. 2009-12-16 13:04:19 +01:00
Stefan Dösinger 718e55b9a6 wined3d: Don't render single buffered swapchains to a FBO. 2009-12-16 12:42:40 +01:00
Henri Verbeet cd623036fc wined3d: Mark the draw buffer as dirty in context_create().
Currently callers of this function are responsible for setting the draw buffer
correctly, but they don't do a very good job:
  - swapchain_init() sets the draw buffer to GL_BACK if there's a back buffer,
    even though the context's target is always the front buffer.
  - swapchain_create_context_for_thread() depends on (eventually) being called
    by FindContext().
  - create_primary_opengl_context() and
    IWineD3DSwapChainImpl_SetDestWindowOverride() don't bother setting a draw
    buffer at all.
Just marking the draw buffer dirty lets the context management sort it all
out, and is much simpler.
2009-12-16 12:22:29 +01:00
Henri Verbeet a215d326a5 wined3d: Get rid of the "swapchain" parameter to surface_get_gl_buffer().
Casting the container to "IWineD3DSwapChainImpl *" is always safe when
SFLAG_SWAPCHAIN is set on the surface. Most callers don't have a real
need for the swapchain, and end up calling GetContainer() just to pass
it to surface_get_gl_buffer().
2009-12-16 12:22:18 +01:00
Henri Verbeet 97f04248fc wined3d: Use surface_is_offscreen() in flush_to_framebuffer_drawpixels(). 2009-12-16 12:22:03 +01:00
Henri Verbeet bf113bd284 wined3d: Use surface_is_offscreen() in read_from_framebuffer_texture(). 2009-12-16 12:21:58 +01:00
Henri Verbeet 51438eec46 wined3d: Use surface_is_offscreen() in fb_copy_to_texture_hwstretch(). 2009-12-16 12:21:50 +01:00
Stefan Dösinger cde3217268 wined3d: Properly release client storage memory. 2009-12-15 16:09:12 +01:00
Stefan Dösinger 2ee6bb1cbb wined3d: Frontbuffers are onscreen. 2009-12-15 11:58:53 +01:00
Henri Verbeet 2f56ef09e6 wined3d: Use surface_is_offscreen() in context_apply_draw_buffer(). 2009-12-15 11:44:20 +01:00
Henri Verbeet c24e48d937 wined3d: Filter window messages generated by switching to fullscreen and back. 2009-12-15 11:43:56 +01:00
Henri Verbeet 0e270bbd22 wined3d: Send window messages through the swapchain before sending them to the application. 2009-12-15 11:43:41 +01:00
Henri Verbeet 6bf79b885f wined3d: Let the context handle the draw buffer in swapchain_blit(). 2009-12-14 12:04:05 +01:00
Henri Verbeet 82556b613e wined3d: Let the context handle the draw buffer in fb_copy_to_texture_hwstretch(). 2009-12-14 12:04:05 +01:00
Henri Verbeet 59db3ecaa0 wined3d: Let the context handle the draw buffer in flush_to_framebuffer_drawpixels(). 2009-12-14 12:04:05 +01:00
Henri Verbeet 30f5883ef5 wined3d: Let the context handle the draw buffer in stretch_rect_fbo(). 2009-12-14 12:04:05 +01:00
Henri Verbeet cb076db8cc wined3d: Move IWineD3DDeviceImpl_RestoreWindow() to swapchain.c. 2009-12-11 12:16:25 +01:00
Henri Verbeet 542590cfc9 wined3d: Move IWineD3DDeviceImpl_SetupFullscreenWindow() to swapchain.c. 2009-12-11 12:16:25 +01:00
Henri Verbeet a9f2613d13 wined3d: Add a separate function for swapchain initialization. 2009-12-11 12:16:25 +01:00
Henri Verbeet 75ef50e435 wined3d: Correctly calculate the extended style in IWineD3DDeviceImpl_RestoreWindow(). 2009-12-11 12:16:25 +01:00
Henri Verbeet 840b5af77e wined3d: Properly invalidate the context's draw buffer in color_fill_fbo(). 2009-12-11 12:16:25 +01:00
Henri Verbeet b85a070598 wined3d: Support more formats for display mode enumeration.
ddraw/d3d8/d3d9 only support a limited number of formats, but those already
limit the supported formats themselves.
2009-12-10 11:54:55 +01:00
Henri Verbeet b3defd4c80 wined3d: Rename "wineD3DDevice" to "device". 2009-12-10 11:54:47 +01:00
Henri Verbeet bd9828a039 wined3d: Don't restore the draw buffer in color_fill_fbo().
This should be done by the context management these days.
2009-12-10 11:54:29 +01:00
Henri Verbeet bfe6695d30 wined3d: Only disable blending for offscreen targets. 2009-12-09 13:51:08 +01:00
Henri Verbeet b6ef17f23d wined3d: Remove unused GetDevice() implementations. 2009-12-09 13:51:04 +01:00
Henri Verbeet d2ad2df637 wined3d: Remove a few redundant assignments. 2009-12-09 13:50:48 +01:00
Henri Verbeet 54f3dec8e6 wined3d: Rename the "wineD3D" device field to "wined3d". 2009-12-08 12:33:29 +01:00
Henri Verbeet a02f93defb wined3d: Remove the redundant "adapterNo" field from the device. 2009-12-08 12:33:23 +01:00
Henri Verbeet aed85222b5 wined3d: Rename the wined3d_adapter "num" field to "ordinal".
This makes it consistent with dxgi_adapter.
2009-12-08 12:33:17 +01:00
Henri Verbeet 8a833a2d75 wined3d: Pass the correct vertex count in DrawIndexedPrimitiveStrided().
This fixes a regression introduced by 2b2fc827ce.
2009-12-08 12:33:08 +01:00
Stefan Dösinger 740e2d403e Render to fbo when the size mismatches at creation time.
This is needed because the window(and thus the GL drawable) might be
smaller than the D3D backbuffer. If we waited for the FBO switch until
Present is called we'd lose data in the first frame.
2009-12-07 14:33:56 +01:00
Stefan Dösinger 548b0bcda5 wined3d: Render to a FBO if the window size is changed. 2009-12-07 14:33:32 +01:00
Stefan Dösinger 817714912b wined3d: Infrastructure to render swapchains to a FBO. 2009-12-07 14:33:24 +01:00
Stefan Dösinger 2b0271b185 wined3d: Use GL_COLOR_ATTACHMENT0 as offscreen buffer with FBOs.
This is used by the offscreen render target->texture blit code if
FBOs are enabled, but FBO_blit is not supported
2009-12-07 14:33:04 +01:00
Stefan Dösinger 64291c60cb wined3d: A function for checking if a surface is offscreen. 2009-12-07 14:32:54 +01:00
Stefan Dösinger 54f0d3f785 wined3d: Add a function for initializing surface sysmem. 2009-12-07 14:32:29 +01:00
Francois Gouget 060934c557 wined3d: Don't define nameless structs or unions.
Fixes compilation on systems that don't support nameless unions or structs.
2009-12-07 14:18:25 +01:00
Henri Verbeet 0491fcce30 dxgi: Implement IDXGIAdapter::GetDesc(). 2009-12-04 14:34:59 +01:00
Henri Verbeet dd5fc79f56 wined3d: The stateblock doesn't really need a parent. 2009-12-04 14:34:59 +01:00
Stefan Dösinger 6a19339207 wined3d: Remove needless NULL checks (coverity). 2009-12-03 11:45:15 +01:00
Henri Verbeet ed73f0a1b0 d3d9: Implement IDirect3D9Ex::GetAdapterLUID(). 2009-12-02 13:06:08 +01:00