Commit Graph

104 Commits

Author SHA1 Message Date
Henri Verbeet 3ec639e38c wined3d: Fix swapchain draw buffer cleanup.
Destroying the first back buffer before the other ones might cause an already
freed surface to be used as target in FindContext().
2009-08-12 13:22:25 +02:00
Henri Verbeet 7165bd19c1 wined3d: WINED3DTEXF_NONE only makes sense as a mip filter. 2009-08-05 11:20:43 +02:00
Henri Verbeet da1e5573da wined3d: Rename WineD3DContext to struct wined3d_context. 2009-08-03 15:01:48 +02:00
Henri Verbeet 43bfb240ad wined3d: Use the context's current render target the get the swapchain drawable size.
"surface" might point to the frontbuffer while we're rendering to the
backbuffer, etc.
2009-08-03 15:01:25 +02:00
Henri Verbeet 2c71b85334 wined3d: Explicitly pass the context to get_drawable_size(). 2009-07-24 13:10:37 +02:00
Henri Verbeet 401e99b0c0 wined3d: Remove some unnecessary code.
Now that we don't depend on activeContext and lastActiveRenderTarget to be
non-NULL this code can go.
2009-07-23 11:22:08 +02:00
Henri Verbeet 69b7612265 wined3d: Get rid of struct glDescriptor.
In general it might not be a bad idea to group GL specific data into a
separate struct, but IWineD3DSurfaceImpl is currently the only thing that
bothers. It doesn't get it quite right either, since e.g. the PBO isn't in
glDescriptor either.
2009-07-10 12:13:24 +02:00
Henri Verbeet 6d8e1e52c8 wined3d: Avoid destroying the currently active context for non-implicit swapchains. 2009-07-08 20:14:25 +02:00
Henri Verbeet 2ac34bf231 wined3d: Add some missing float suffixes.
The compiler should be smart enough to fix most of these, but it looks sloppy.
2009-07-07 11:50:05 +02:00
Henri Verbeet 2dc7fc2916 wined3d: Remove the format field from IWineD3DResourceClass. 2009-03-13 11:29:19 +01:00
Andrew Talbot 33e0d1610a wined3d: Sign-compare warnings fix. 2008-12-02 14:12:39 +01:00
Marcus Meissner f1271f846b wined3d: Output the rectangles in the debug message. 2008-12-01 14:01:21 +01:00
Stefan Dösinger 93af8d3631 d3d: Do not restore the display mode in ddraw. 2008-11-03 13:34:13 +01:00
Alexandre Julliard 6cfef95ce7 wined3d: Convert source files to utf-8. 2008-10-18 19:21:20 +02:00
Henri Verbeet 9d192c6251 wined3d: Skip copying the depth stencil if it's discarded.
This gives a small performance improvement for applications that are
smart enough to set the D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL flag, or
to create depth stencils with Discard set to TRUE.
2008-09-23 12:25:18 +02:00
Stefan Dösinger 3d49e8cd5e wined3d: Add a swapchain method to set the dest override.
DDraw can draw to the front buffer only, thus there's never a Present
call which could pass this window. Due to that a drawing-independent
method is needed.
2008-08-19 12:25:20 +02:00
Stefan Dösinger 7f2b8f9bba wined3d: Support redirecting the primary context. 2008-08-19 12:21:49 +02:00
Stefan Dösinger e5de2fc82c wined3d: Move some swapchain code into a base class. 2008-08-19 12:20:47 +02:00
Stefan Dösinger b0c4673779 wined3d: Update the surface locations in Present. 2008-08-05 14:09:37 +02:00
Stefan Dösinger 851dd7339e wined3d: Implement overlay flipping. 2008-08-05 14:09:36 +02:00
Stefan Dösinger 8d930f6009 wined3d: Restore the gamma when destroying the swapchain. 2008-07-02 12:27:05 +02:00
Francois Gouget 633ee950a1 Assorted spelling fixes. 2008-05-07 12:07:11 +02:00
Stefan Dösinger b1d8af7926 wined3d: Update copyright lines. 2008-04-02 20:22:42 +02:00
Stefan Dösinger cd858dfa22 wined3d: Disable the SWAPEFFECT_DISCARD clear. 2007-12-18 13:23:00 +01:00
Stefan Dösinger 7f10ee453a wined3d: Use the adapter to read the display mode. 2007-12-11 12:14:35 +01:00
Stefan Dösinger 9bc6200ece wined3d: Add a method for querying the gl drawable size of rendertarget. 2007-12-04 14:32:39 +01:00
Stefan Dösinger c698052b31 wined3d: Destroy GL contexts before changing the screen resolution. 2007-11-16 13:23:15 +01:00
Stefan Dösinger a34c1f948b wined3d: Free the backbuffer array. 2007-11-07 12:08:46 +01:00
Stefan Dösinger 4d4fce7e33 wined3d: Disconnect allocatedMemory and Heap allocation. 2007-11-01 12:38:37 +01:00
Stefan Dösinger dcff7dc213 wined3d: Begin centralizing surface location management. 2007-10-26 15:17:19 +02:00
Roderick Colenbrander 001f380ac9 wined3d: CreateContext should not be called between ENTER_GL/LEAVE_GL. 2007-10-01 12:35:36 +02:00
Stefan Dösinger 271fb0052f wined3d: Add support for showing a logo. 2007-09-14 14:26:00 +02:00
Roderick Colenbrander ad692f2a83 wined3d: Add PBO support for dynamically locked surfaces. 2007-09-13 11:00:47 +02:00
Roderick Colenbrander 5754726aeb wined3d: Use the proper depth stencil format. 2007-08-13 12:36:55 +02:00
Roderick Colenbrander ac3927a73e wined3d: Move over to WGL. 2007-08-08 15:32:01 +02:00
Roderick Colenbrander e77da5ef8a wined3d: Don't call ActivateContext between ENTER_GL/LEAVE_GL. 2007-08-07 12:36:32 +02:00
Stefan Dösinger 38c7e9356e wined3d: Present requires the swapchain's context. 2007-08-06 12:05:50 +02:00
H. Verbeet 2785395080 wined3d: glXSwapBuffers needs a GLX context. 2007-07-19 11:57:16 +02:00
Stefan Dösinger b462ff0876 wined3d: Create multiple contexts for onscreen render targets. 2007-07-03 12:32:33 +02:00
Stefan Dösinger 078523f73e wined3d: Present does not clear the depth stencil. 2007-06-14 13:22:19 +02:00
Stefan Dösinger c9b8a79e0b wined3d: Implement vertical refresh sync. 2007-06-14 13:21:54 +02:00
Stefan Dösinger 43fda1f4f0 wined3d: Only swap system memory resources of front and back buffer if they have the same size. 2007-06-14 13:20:53 +02:00
H. Verbeet e49c480820 wined3d: Don't try to clear the depth stencil if there is none. 2007-04-17 11:13:03 +02:00
Stefan Dösinger 725057da47 d3d: Remove dependency on ddraw.h header. 2007-04-16 13:20:15 +02:00
Stefan Dösinger 290f2eb146 wined3d: Add Filtering to IWineD3DSurface::Blt and handle it.
This is to allow StretchRect to pass the texture filter to WineD3D.
DirectDraw sets the texture filter to WINED3DTEXF_NONE, simmilar to all
other functions which do not need filtering.
2007-04-07 10:58:10 +02:00
Stefan Dösinger 90fe64cee0 wined3d: Store an array of contexts in the swapchain.
This is a preparation for using multiple contexts on one drawable to
handle multithreading.
2007-03-19 12:23:16 +01:00
Stefan Dösinger fcb83e7111 wined3d: Activate a context before doing opengl calls. 2007-03-19 12:22:57 +01:00
Andrew Talbot 2f5f3825c6 wined3d: Replace inline static with static inline. 2007-03-17 20:04:46 +01:00
Stefan Dösinger c54a0fc2cf wined3d: Rework surface dirtification.
Previously the surfaces stored a flag if the system memory copy was
ahead of the gl copy(SFLAG_DIRTY) or the gl copy is
ahead(SFLAG_GLDIRTY). The pbuffer copy was 'managed' differently using
SFLAG_INPBUFFER and SFLAG_INTEXTURE.

This patch replaces them with 3 flags, INSYSMEM, INPBUFFER and
INTEXTURE which specify which copy contains the most up to date
copy. It is perfectly valid to have more than one of those flags
set. One must be set at least (except at init, when no content is in
the surface yet). When one copy is modified, the flags for the others
are removed.
2007-03-07 12:18:14 +01:00
Stefan Dösinger 5916fdd560 wined3d: Remove an outdated TODO comment.
BltFast takes care of activating the correct context nowadays.
2007-02-19 13:02:19 +01:00