Commit Graph

334 Commits

Author SHA1 Message Date
Henri Verbeet d09ad48328 ddraw: Read/draw from/to the actual screen when there is no swapchain window. 2011-10-25 16:57:24 +02:00
Henri Verbeet 14ca56ed97 ddraw: Destroy the swapchain in ddraw_destroy() if it still exists. 2011-10-18 15:10:21 +02:00
Ričardas Barkauskas 472a8f7a67 ddraw: COM cleanup for IDirect3DDevice7 interface. 2011-10-17 18:24:58 +02:00
Ričardas Barkauskas 7dc08745d1 ddraw: Use impl_from_IDirect3DDevice7 for application provided interfaces. 2011-10-17 18:24:42 +02:00
Ričardas Barkauskas 6b7e3e77d0 ddraw: COM cleanup for IDirect3DDevice3 interface. 2011-10-17 18:24:21 +02:00
Ričardas Barkauskas d32df839ac ddraw: COM cleanup for IDirect3DDevice2 interface. 2011-10-17 18:23:42 +02:00
Stefan Dösinger 496b438ede wined3d: Remove d3d8/9 palette support. 2011-10-11 13:37:49 +02:00
Ričardas Barkauskas 6253d319cb ddraw: COM cleanup for IDirect3DViewport3 interface. 2011-10-04 15:25:20 -05:00
Ričardas Barkauskas a6656468ef ddraw: COM cleanup for the IDirectDrawPalette interface. 2011-10-04 15:24:44 -05:00
Akihiro Sagawa f2044702fa ddraw: Use the same device name as Windows for the Direct3D HAL device. 2011-10-03 11:25:59 -05:00
Henri Verbeet 4228bbc5bf ddraw: Store the wined3d swapchain reference in the ddraw object instead of the primary surface. 2011-09-20 16:21:38 +02:00
Henri Verbeet cc45316d02 ddraw: Setup swapchain dimensions and format using the current display mode in ddraw_create_swapchain(). 2011-09-20 16:21:38 +02:00
Henri Verbeet ec04f80cf6 ddraw: Implement ddraw7_Initialize(). 2011-09-19 17:56:05 +02:00
Henri Verbeet feb96511a9 ddraw: Get rid of IDirectDraw3. 2011-09-19 17:56:05 +02:00
Henri Verbeet b9fcf71c71 ddraw: Use real flips. 2011-09-16 17:23:08 +02:00
Henri Verbeet 1aeee59bd8 ddraw: Use offscreen backbuffers.
In principle this allows us to use more than one backbuffer in ddraw. It's
also a requirement for the next patch.
2011-09-16 17:23:08 +02:00
Henri Verbeet 5186882098 ddraw: Store the primary surface. 2011-09-16 17:23:08 +02:00
Henri Verbeet f60b54d952 ddraw: Get rid of the surfaces field in IDirectDrawImpl. 2011-09-15 15:41:40 +02:00
Henri Verbeet 5de020342c ddraw: Get rid of the unused "initialized" field in IDirectDrawImpl. 2011-09-14 09:59:12 +02:00
Henri Verbeet 8173e6f539 ddraw: Just use a static variable for vblank emulation. 2011-09-14 09:58:58 +02:00
Henri Verbeet 60f6c41a67 ddraw: Just use a static variable for scanline emulation.
Tracking it per ddraw object doesn't add much.
2011-09-14 09:58:53 +02:00
Francois Gouget 8973c20f7d Assorted spelling fixes. 2011-09-13 11:27:01 +02:00
Henri Verbeet b23809868a ddraw: Get the total amount of video memory from wined3d.
Instead of hoping that what's available at ddraw_init() time is the total.
2011-09-12 10:08:52 +02:00
Henri Verbeet f3e1a9fa16 ddraw: Initialize the swapchain presentation parameters in ddraw_create_swapchain(). 2011-09-12 10:08:38 +02:00
Henri Verbeet bbfbd66d9f ddraw: Introduce a function for creating the swapchain. 2011-09-08 11:11:20 +02:00
Henri Verbeet cbc009b8d2 ddraw: Also check errors returned by ddraw_create_gdi_swapchain() in CreateSurface(). 2011-09-08 11:11:15 +02:00
Stefan Dösinger 8e79a7e664 ddraw: Add some NULL pointer tests. 2011-09-07 11:15:09 +02:00
Henri Verbeet 5824551d76 ddraw: Set the swap effect to WINED3DSWAPEFFECT_COPY in ddraw_create_gdi_swapchain().
The actual swapchain implementation ignores the swap effect and always does a
copy anyway, but this makes it consistent with ddraw_attach_d3d_device().
2011-09-07 11:12:43 +02:00
Henri Verbeet 582767ce45 ddraw: Only explicitly initialize non-zero fields in ddraw_create_gdi_swapchain().
Update ddraw_attach_d3d_device() for consistency.
2011-09-07 11:12:34 +02:00
Stefan Dösinger 42b7ad4fd4 ddraw: Convert dwZBufferBitDepth into a DDPIXELFORMAT. 2011-08-31 19:43:09 +02:00
Stefan Dösinger c42277883a ddraw: Introduce a function to convert a DDSURFACEDESC2 to a DDSURFACEDESC. 2011-08-31 19:43:09 +02:00
Stefan Dösinger 76fecde8fb ddraw: Introduce a function to convert a DDSURFACEDESC to a DDSURFACEDESC2. 2011-08-31 19:43:09 +02:00
Henri Verbeet 43ad90ce31 ddraw: Get rid of the ImplType fields in IDirectDrawImpl and IDirectDrawSurfaceImpl. 2011-08-31 19:42:55 +02:00
Henri Verbeet c89a3ffe80 ddraw: Get rid of the surface implementation switching code. 2011-08-31 19:42:52 +02:00
Henri Verbeet 8f46cb6b8b ddraw: Introduce a separate function for setting the focus window. 2011-08-29 19:42:46 +02:00
Henri Verbeet 93b5f681d9 ddraw: Remove a redundant check from ddraw7_SetCooperativeLevel(). 2011-08-29 19:42:41 +02:00
Henri Verbeet cad9cbe445 ddraw: Trace which surfaces we enumerate in ddraw7_EnumSurfaces(). 2011-08-29 19:42:31 +02:00
Stefan Dösinger 899b278558 ddraw: Emulate a 24 bit depth format without stencil or padding. 2011-08-29 13:56:33 +02:00
Ričardas Barkauskas bf7df85169 ddraw: Do not create implicit depth buffer. 2011-08-25 11:31:38 +02:00
Ričardas Barkauskas 5c8ad26757 ddraw: Do not AddRef IDirectDraw7 iface in CreateSurface helper. 2011-08-22 17:15:54 +02:00
Frédéric Delanoy f932abf326 dlls: Assorted spelling fixes. 2011-08-01 18:26:27 +02:00
Henri Verbeet 2256a7e804 wined3d: wined3d_device_evict_managed_resources() doesn't need a return value. 2011-07-29 12:09:39 +02:00
Henri Verbeet 84413298de ddraw: Resize the window after setting the new display mode. 2011-07-22 12:57:18 +02:00
Henri Verbeet 04d541c26d ddraw: Just use SetWindowPos() in ddraw_set_display_mode().
Instead of going through wined3d_device_restore_fullscreen_window() /
wined3d_device_setup_fullscreen_window(). The main point of those functions is
changing the window styles, but we don't actually need that here. More
importantly, we filter the messages generated by those functions in wined3d,
while tests show that messages generated by SetDisplayMode() /
RestoreDisplayMode() are visible to the application. Applications depend on
WM_SIZE in particular.
2011-07-19 14:05:56 +02:00
Henri Verbeet ddc29c40e6 wined3d: Make D3DRS_ZBIAS work.
D3DRS_ZBIAS is poorly defined, but it makes sense that the bias should be
format independent. Looking at application behaviour, it seems to include a
slope scale factor as well. This fixes a couple of regressions introduced by
96b758f7b3, although it was broken before as
well, just in a different way.
2011-07-05 13:46:07 +02:00
Ričardas Barkauskas 5f6d7021aa ddraw: Separate IDirectDrawSurface and IDirectDrawSurface7 reference counts. 2011-06-28 11:57:50 -05:00
Ričardas Barkauskas 9190d349d2 ddraw: Separate IDirectDrawSurface4 reference count. 2011-06-28 11:57:50 -05:00
Henri Verbeet c461d312ba wined3d: Request per-surface palettes in the client libs. 2011-06-24 08:49:48 -05:00
Henri Verbeet b296f181dd wined3d: Explicitly set surface alignment in the client libs.
Instead of using dxVersion.
2011-06-24 08:49:42 -05:00
Ričardas Barkauskas 8959a1395a ddraw: Remove ddraw_set_surface_version and set surface version when initialising it. 2011-06-21 17:09:02 +02:00
Ričardas Barkauskas 4c0c0d3aeb ddraw: Fix ddraw4_EnumSurfaces to pass correct iface in callbacks. 2011-06-20 19:33:30 +02:00
Michael Stefaniuc 588ddee736 ddraw: COM cleanup for the IDirectDrawClipper iface. 2011-06-20 19:32:03 +02:00
Stefan Dösinger 07c761a6a1 ddraw: Implement IDirect3D7::EvictManagedTextures. 2011-06-17 15:37:33 +02:00
Michael Stefaniuc d7768739ec ddraw: COM cleanup for the IDirect3DVertexBuffer7 iface. 2011-06-15 20:04:39 +02:00
Michael Stefaniuc 60223057f0 ddraw: COM cleanup for the IDirect3DVertexBuffer iface. 2011-06-15 20:04:39 +02:00
Michael Stefaniuc ca1ee4a7c3 ddraw: Avoid unsafe IDirect3DVertexBuffer to object casts. 2011-06-15 20:04:39 +02:00
Michael Stefaniuc d010dac84d ddraw: Rename d3d_vertex_buffer_init() and have it allocate the object too. 2011-06-15 20:04:39 +02:00
Ričardas Barkauskas f3ae1b99f6 ddraw: Separate IDirectDrawSurface vtable. 2011-06-10 15:26:52 +02:00
Ričardas Barkauskas 27063ffeaa ddraw: Use unsafe_impl_from_IDirectDrawSurface() for application provided interfaces. 2011-06-10 15:26:29 +02:00
Michael Stefaniuc 0519450708 ddraw: COM cleanup for the IDirect3DLight iface. 2011-06-09 13:28:08 +02:00
Michael Stefaniuc d9fb7b9b92 ddraw: COM cleanup for the IDirect3DMaterial3 iface. 2011-06-08 17:43:07 +02:00
Michael Stefaniuc 8d91f8b614 ddraw: Avoid "unsafe" IDirect3DMaterial3 to object casts. 2011-06-08 17:37:33 +02:00
Michael Stefaniuc db15ce6580 ddraw: Rename d3d_material_init() and have it allocate the object too. 2011-06-08 17:37:24 +02:00
Michael Stefaniuc e3a32e8d95 ddraw: COM cleanup for the IDirect3DMaterial iface. 2011-06-07 14:18:32 +02:00
Michael Stefaniuc 0586dd8bbe ddraw: COM cleanup for the IDirect3DMaterial2 iface. 2011-06-07 14:18:32 +02:00
Ričardas Barkauskas bb063b994c ddraw: Separate IDirectDrawSurface4 vtable. 2011-06-06 21:49:23 +02:00
Ričardas Barkauskas 4582562f55 ddraw: Use unsafe_impl_from_IDirectDrawSurface4. 2011-06-06 21:49:23 +02:00
Ričardas Barkauskas 2f02bbb41f ddraw: Change lpVtbl to IDirectDrawSurface7_iface. 2011-06-06 21:49:23 +02:00
Ričardas Barkauskas 4074dd7615 ddraw: Avoid IDirectDrawSurfaceX to IDirectDrawSurface7 casts. 2011-06-06 21:49:23 +02:00
Ričardas Barkauskas 93dfe5afc3 ddraw: Use impl_from_IDirectDrawSurface7() instead of casts. 2011-06-06 21:49:23 +02:00
Ričardas Barkauskas 705548a6ef ddraw: Separate conversion from IDirectDrawSurface7 iface to object and conversion to other iface. 2011-06-06 21:49:22 +02:00
Ričardas Barkauskas 4123c7a38a ddraw: Pass an object instead of iface to helper function CreateSurface. 2011-06-06 21:49:22 +02:00
Ričardas Barkauskas 28ce1c00a7 ddraw: Use unsafe_impl_from_IDirectDrawSurface7() for application provided interfaces. 2011-06-06 21:49:22 +02:00
Andrew Nguyen a90b698e0c ddraw: Handle a callback cancellation attempt in d3d7_EnumDevices. 2011-06-01 16:09:58 +02:00
Andrew Nguyen f2f529ae38 ddraw: Extend the lifetime of the EnumDevices strings beyond function scope. 2011-06-01 16:09:53 +02:00
Ričardas Barkauskas 6d5be5033e ddraw: Change IDirectDrawSurface3_vtbl to IDirectDrawSurface3_iface. 2011-05-31 19:24:10 +02:00
Ričardas Barkauskas fb6ceb971b ddraw: Use unsafe_impl_from_IDirectDrawSurface3() for application provided interfaces. 2011-05-31 19:22:52 +02:00
Andrew Nguyen cf6d56a43a ddraw: Add a NULL callback pointer check in the EnumDevices implementations. 2011-05-31 18:32:59 +02:00
Dylan Smith f7002c6627 ddraw: Don't interpret end padding as dwCaps2 for x64. 2011-05-24 12:47:28 +02:00
Dylan Smith 3871329872 ddraw: Avoid clearing some memory unnecessarily. 2011-05-24 12:47:27 +02:00
Henri Verbeet f147c1e928 ddraw: Don't touch the window during mode setting if we're not in exclusive mode. 2011-05-24 11:53:47 +02:00
Henri Verbeet 3032b40c80 wined3d: Get rid of the IWineD3DDeviceParent interface. 2011-05-19 10:06:21 +02:00
Henri Verbeet 8d4ca1f815 wined3d: Remove COM from the device implementation. 2011-05-17 10:06:18 +02:00
Ričardas Barkauskas a7bd11afb0 ddraw: Fix filtering of enumerated display modes. 2011-05-12 18:22:25 +02:00
Henri Verbeet 00a5f38595 wined3d: Remove object creation methods from the IWineD3DDevice interface. 2011-05-11 14:56:48 +02:00
Henri Verbeet 5e4145d0ff ddraw: Skip redundant mode setting calls. 2011-05-11 14:56:48 +02:00
Henri Verbeet 1c1de920e3 wined3d: Remove COM from the surface implementation. 2011-04-29 16:52:13 +02:00
Henri Verbeet 6ff226f502 ddraw: Destroy the ddraw surface after the wined3d surface is destroyed. 2011-04-21 16:53:41 +02:00
Henri Verbeet 5492560cb5 ddraw: Introduce a separate function for texture creation. 2011-04-20 13:06:45 +02:00
Henri Verbeet 2c450571e5 wined3d: Remove COM from the volume implementation. 2011-04-15 10:07:57 +02:00
Henri Verbeet 3ec19590d5 wined3d: Remove COM from the swapchain implementation. 2011-04-14 17:13:57 +02:00
Henri Verbeet d2e665230a wined3d: Get rid of the swapchain destroy callback. 2011-04-13 14:13:51 +02:00
Henri Verbeet dd2c7d0d8c wined3d: Don't free D3D swapchains until the wined3d swapchain is destroyed.
This will allow us the get rid of the swapchain refcounting hacks in d3d9 in
particular. This is similar to the way we handle resources that are still in
use by a stateblock, but aren't referenced anywhere by the application.
2011-04-08 14:40:48 +02:00
Henri Verbeet fd8e18bd2b wined3d: Remove COM from the texture implementation. 2011-03-28 17:08:52 +02:00
Henri Verbeet b8c40f3a7e wined3d: Get rid of IWineD3DCubeTexture. 2011-03-18 15:59:04 +01:00
Henri Verbeet f1ec3820d7 wined3d: Get rid of IWineD3DTexture. 2011-03-17 10:40:52 +01:00
Henri Verbeet 2b18192e7a wined3d: Get rid of IWineD3DSurface::GetDesc(). 2011-03-11 11:40:31 +01:00
Henri Verbeet 756fdb7c5a wined3d: Merge the various resource desc structures. 2011-03-09 12:28:58 +01:00
Henri Verbeet 015ad93d47 ddraw: Just pass NULL as swapchain parent.
The swapchain was the last place using IParent, so this allows us to kill
IParent completely.
2011-03-08 12:28:20 +01:00
Henri Verbeet b9fae5e9a8 wined3d: Don't require container parents for IWineD3DDeviceParent methods to be COM objects. 2011-03-08 12:27:41 +01:00