Commit Graph

683 Commits

Author SHA1 Message Date
Henri Verbeet 352e60e6ed d3d: Explicitly translate texture stage states.
Ddraw and d3d8 already translate half of them, it turns out the lookup
table actually saves lines there.
2009-01-06 12:45:32 +01:00
Henri Verbeet a394dbec13 d3d9: Release the vertex declaration once we're done with it. 2008-12-29 12:16:27 +01:00
Henri Verbeet 0fb3cb9314 d3d9: Don't crash in GetFVF() if a NULL vertex declaration is set. 2008-12-24 19:57:51 +01:00
Henri Verbeet 4adb342327 wined3d: Remove GetFVF() and SetFVF() from IWineD3DDevice. 2008-12-17 14:02:03 +01:00
Alexandre Julliard 8eccb01a47 d3d9: Make some functions static. 2008-12-04 12:47:04 +01:00
Francois Gouget 1c87e4664f d3d9: Remove WINAPI on static functions where not needed. 2008-11-24 14:33:06 +01:00
Francois Gouget 001288ecae d3d9: Remove IDirect3DDevice9Impl_GetFrontBuffer() as it is unused. 2008-11-24 14:33:02 +01:00
Stefan Dösinger 40c06ea296 d3d9: Add a test for GetTexture with no texture set. 2008-11-04 11:41:20 +01:00
Stefan Dösinger 123a3f44d9 d3d9: WINED3DSURFACE_DESC::MultiSampleType is not a DWORD. 2008-11-04 11:40:29 +01:00
Stefan Dösinger 3d96f97ee1 d3d9: Use the correct AddRef and Release macros. 2008-11-04 11:40:23 +01:00
Stefan Dösinger 93af8d3631 d3d: Do not restore the display mode in ddraw. 2008-11-03 13:34:13 +01:00
Rob Shearman f6813e55c5 d3d9: Fix type used to store return value in IDirect3DDevice9Impl_GetNPatchMode.
It should be a float, not an HRESULT.
2008-09-15 13:23:30 +02:00
Henri Verbeet c0d770de9e d3d9: GetDepthStencilSurface returns D3DERR_NOTFOUND when no depth stencil is present. 2008-09-10 12:03:55 +02:00
Rob Shearman 30cd9b473e d3d9: Remove unneeded local variable in IDirect3DDevice9Impl_SetFVF. 2008-08-18 17:15:57 +02:00
Rob Shearman 320aac97e4 d3d9: Fix variable type in IDirect3DDevice9Impl_GetSoftwareVertexProcessing.
IWineD3DDevice_GetSoftwareVertexProcessing returns a BOOL, not an HRESULT.
2008-08-18 17:15:56 +02:00
Tobias Jakobi fb0fbc4b85 d3d9: Remove faulty comment from CreateOffscreenPlainSurface. 2008-07-08 21:08:53 +02:00
Stefan Dösinger cd7d2dc136 d3d9: Enforce ColorFill restrictions. 2008-04-07 11:48:26 +02:00
Stefan Dösinger 8869c0f147 d3d: De-pointerize the WINED3DCAPS structure. 2008-03-25 19:36:38 +01:00
Stefan Dösinger c1a0037b88 d3d9: IDirect3DDevice9Ex stub. 2008-03-03 20:48:50 +01:00
James Hawkins 26ad93947b janitorial: Remove links to any microsoft site. 2008-03-01 12:04:09 +01:00
Rob Shearman dfda3c4dc8 d3d9: Fix copy and paste error in reset_enum_callback.
vertex_desc.Pool should obviously be used in the 
WINED3DRTYPE_VERTEXBUFFER case instead of index_desc.Pool.
2008-02-19 14:11:43 +01:00
Stefan Dösinger ef4119029b d3d9: Implement the device lost state. 2008-02-07 13:05:37 +01:00
Stefan Dösinger 80953d62d7 d3d9: Reject IDirect3DDevice9::Reset with active default pool resources. 2008-01-14 15:12:00 +01:00
Gerald Pfeifer 0060027e4b d3d9: Fix type of loop variable. 2008-01-04 12:12:34 +01:00
Gerald Pfeifer 21a9c2d2f9 wined3d: Removed dead FIXME checks. 2008-01-03 11:53:29 +01:00
Andrew Talbot 77c8a1594d d3d9: Remove unneeded casts. 2007-12-05 12:04:44 +01:00
Stefan Dösinger 22ac3704ba d3d9: Free the converted declaration data after creating the declaration. 2007-11-20 13:10:55 +01:00
Stefan Dösinger e4f8a2da2b wined3d: Depth stencil fixes. 2007-11-14 11:58:36 +01:00
Stefan Dösinger cc563b9c69 d3d9: Return the correct return value in GetDepthStencilSurface. 2007-08-27 12:00:28 +02:00
Stefan Dösinger 01c6c982bb d3d9: Some caps fixes. 2007-08-21 13:35:35 +02:00
Stefan Dösinger 0820777983 d3d9: Hold the lock in methods implemented in device.c. 2007-06-18 12:33:54 +02:00
H. Verbeet 6ee356fca0 wined3d: Get rid of the pBaseVertexIndex parameter to IWineD3DDeviceImpl_GetIndices, use GetBaseVertexIndex instead. 2007-06-07 11:20:48 +02:00
H. Verbeet 785771272a wined3d: Get rid of the BaseVertexIndex parameter to IWineD3DDeviceImpl_SetIndices, use SetBaseVertexIndex instead. 2007-06-06 12:10:47 +02:00
Stefan Dösinger 94b3fddec8 d3d: Pass the cube face to Create*Texture's surface creation callback. 2007-05-01 11:42:25 +02:00
Francois Gouget 5a8fc34033 Assorted spelling fixes. 2007-04-30 12:35:11 +02:00
Stefan Dösinger 460f71dcf8 d3d: Fix ProcessVertices.
IDirect3DDevice9::ProcessVertices takes a vertex declaration, not a
vertex buffer. The source for ProcessVertices is taken from the
stateblock, not the vertex declaration.
2007-04-26 14:54:29 +02:00
Stefan Dösinger 725f4bfeb1 d3d9: Rework the converted vertex declaration management.
Instead of creating a converted declaration each time SetFVF is
called, exactly one declaration is created for each FVF(on demand) and
stored for the lifetime of the device. This avoids memory leaks and
makes keeping track of converted declarations easier. Wether a
declaration is converted from a fvf or not is now a static information
inside the declaration. Those declarations are not destroyed in
VertexDeclaration::Release, they stay for the lifetime of the
device. This keeps us free from tracking the declaration through
stateblocks
2007-04-18 13:13:45 +02:00
Stefan Dösinger 725057da47 d3d: Remove dependency on ddraw.h header. 2007-04-16 13:20:15 +02:00
Stefan Dösinger 35dd693a79 d3d9: Fix the circular converted vertex declaration reference. 2007-04-12 16:10:48 +02:00
Andrew Talbot 43155227d6 d3d9: Void functions should not return a value. 2007-04-09 12:15:42 +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
H. Verbeet a4bc52a89c wined3d: Fix WINED3DPRESENT_PARAMETERS and use it instead of D3DPRESENT_PARAMETERS. 2007-02-16 12:31:03 +01:00
Stefan Dösinger 7f5dccb696 wined3d: Properly release the converted vertex declaration. 2007-02-14 20:46:39 +01:00
Stefan Dösinger f196680c59 wined3d: GetRenderTargetData can call BltFast. 2007-02-14 12:27:37 +01:00
Stefan Dösinger cb74603e43 d3d9: Implement IDirect3DDevice9::StretchRect. 2007-01-12 11:49:38 +01:00
Stefan Dösinger 71631f7638 wined3d: Use the baseVertexIndex in the stateblock. 2007-01-03 11:02:51 +01:00
Chris Robinson b7b9d4e3c7 d3d: GetStreamSource on a stream with NULL data isn't an error. 2006-12-26 12:52:54 +01:00
Markus Amsler 467b1dd3ad d3d9: Handle surface container in d3d9. 2006-12-18 12:08:02 +01:00
Markus Amsler 5e0fc62135 d3d: Callback infrastructure for implicit swap chain destruction in IWineD3DDevice. 2006-12-18 12:07:26 +01:00
Markus Amsler f9f3ec2f00 d3d9: Fix implicit surface refcounting. 2006-12-18 12:07:09 +01:00
Markus Amsler 04dcffe393 d3d9: Handle surface refcount forwarding in d3d9. 2006-12-18 12:01:58 +01:00
Markus Amsler 3fd04308ab d3d: Callback infrastructure for implicit depth stencil surface destruction in IWineD3DDevice. 2006-12-06 12:39:30 +01:00
Markus Amsler a60d4b2d2f d3d: Pass the superior creating object down to the callback functions. 2006-12-04 12:40:38 +01:00
Markus Amsler dc0afe4242 d3d9: Remove unreachable return. 2006-12-01 13:16:12 +01:00
Markus Amsler 61087377a0 d3d9: Use correct COM macros. 2006-12-01 12:27:15 +01:00
Markus Amsler bd072332e1 Revert "d3d: Remove AddRef from IWineD3DDevice_GetDirect3D.".
This reverts commit 167b83c28a.
2006-11-30 16:04:00 +01:00
Markus Amsler f8e7ddd798 Revert "d3d: Remove AddRef from IWineD3DDevice_GetBackBuffer.".
This reverts commit 478a414e58.
2006-11-30 16:04:00 +01:00
Markus Amsler b657cd5f58 Revert "d3d: Remove AddRef from IWineD3DDevice_GetRenderTarget.".
This reverts commit a7518f6f54.
2006-11-30 16:04:00 +01:00
Markus Amsler f5204b8afe Revert "d3d: Remove AddRef from IWineD3DDevice_GetDepthStencilSurface.".
This reverts commit 18546a65e6.
2006-11-30 16:04:00 +01:00
Markus Amsler 5bec2f57a1 Revert "d3d: Remove AddRef from IWineD3DDevice_GetTexture.".
This reverts commit 274df6ef88.
2006-11-30 16:04:00 +01:00
Markus Amsler 3a270375d7 Revert "d3d: Remove AddRef from IWineD3DDevice_GetStreamSource.".
This reverts commit 16b1e046d8.
2006-11-30 16:03:59 +01:00
Markus Amsler 9dd81f64cb Revert "d3d: Remove AddRef from IWineD3DDevice_GetIndices.".
This reverts commit 5c4008719c.
2006-11-30 16:03:59 +01:00
Markus Amsler 5c4008719c d3d: Remove AddRef from IWineD3DDevice_GetIndices. 2006-11-22 11:40:43 +01:00
Markus Amsler 16b1e046d8 d3d: Remove AddRef from IWineD3DDevice_GetStreamSource. 2006-11-22 11:40:37 +01:00
Markus Amsler 274df6ef88 d3d: Remove AddRef from IWineD3DDevice_GetTexture. 2006-11-22 11:40:31 +01:00
Markus Amsler 18546a65e6 d3d: Remove AddRef from IWineD3DDevice_GetDepthStencilSurface. 2006-11-22 11:40:24 +01:00
Markus Amsler a7518f6f54 d3d: Remove AddRef from IWineD3DDevice_GetRenderTarget. 2006-11-22 11:40:05 +01:00
Markus Amsler 478a414e58 d3d: Remove AddRef from IWineD3DDevice_GetBackBuffer. 2006-11-22 11:39:52 +01:00
Markus Amsler 167b83c28a d3d: Remove AddRef from IWineD3DDevice_GetDirect3D. 2006-11-22 11:39:39 +01:00
Andrew Talbot 3ac7720f05 d3d9: Cast-qual warnings fix. 2006-10-30 11:20:14 +01:00
Ivan Gyurdiev 9628a1b2e2 wined3d: Merge D3DRECT types into one type in WINED3D namespace. 2006-10-12 12:37:08 +02:00
Ivan Gyurdiev ac37163124 wined3d: Merge D3DMATRIX types into one type in WINED3D namespace. 2006-10-12 12:35:00 +02:00
Ivan Gyurdiev 732e0e908b wined3d: Merge GAMMARAMP types into one type in WINED3D namespace. 2006-10-11 12:22:01 +02:00
Ivan Gyurdiev 5f2987ae32 wined3d: Merge VIEWPORT types into one type in WINED3D namespace. 2006-10-11 12:21:54 +02:00
Ivan Gyurdiev 90f5be2bef wined3d: Merge MATERIAL types into one type in WINED3D namespace. 2006-10-11 12:21:14 +02:00
Ivan Gyurdiev 70bbf734b1 wined3d: Merge LIGHT types into one type in WINED3D namespace. 2006-10-11 12:21:06 +02:00
H. Verbeet cb4ad6e52c d3d9: Win64 printf format warning fixes. 2006-10-10 19:59:09 +02:00
Stefan Dösinger 3529560cd7 wined3d: Add WINED3DUSAGE_OVERLAY. 2006-10-06 12:53:24 +02:00
Stefan Dösinger 30ef7f0b08 wined3d: Minor cursor fixes. 2006-08-10 10:54:37 +02:00
H. Verbeet 7ac5bd67d5 d3d: Don't crash when SetRenderTarget() is called with a NULL pSurface. 2006-08-07 13:12:37 +02:00
Ivan Gyurdiev 1309844913 wined3d: Implement FVF to DECL9 conversion (with tests). 2006-07-06 16:07:38 +02:00
Alexandre Julliard c30d4ecd81 d3d9: Make the virtual table functions static where possible. 2006-06-10 11:51:05 +02:00
H. Verbeet 34e2e2bd39 d3d9: Fix QueryInterface.
QueryInterface should return S_OK on success and set the object
pointer to NULL on failure. This is similar to the patch Ivan
submitted a while ago for wined3d.
2006-06-07 15:28:12 +02:00
Vitaliy Margolen 19d19b2b79 d3d9: Add reference to the parent device for surfaces.
Allow some objects to have no parent device.
Tighten refcount tests and test refound decrement on Release.
2006-05-30 12:34:22 +02:00
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Stefan Dösinger d04f0507cf wined3d: Implement Init3D and Uninit3D. 2006-04-19 12:43:22 +02:00
Stefan Dösinger 03b256b16d wined3d: Add a parameter for surface type selection. 2006-04-18 11:09:17 +02:00
Stefan Dösinger d2510847b0 wined3d: Split device creation and opengl initialization. 2006-04-13 11:22:45 +02:00
Stefan Dösinger 63fd9a7a98 wined3d: Add WINED3DTEXTUREFILTERTYPE to wined3d_types.h. 2006-04-06 22:22:35 +02:00
Stefan Dösinger c289b3cc51 wined3d: Define WINED3DGAMMARAMP based on D3DGAMMARAMP / DDGAMMARAMP. 2006-04-04 20:00:41 +02:00
Stefan Dösinger 08c38a87e1 wined3d: Add WINED3DRASTERSTATUS to wined3d_types.h. 2006-04-04 11:51:37 +02:00
Stefan Dösinger f6ed704f96 wined3d: Make use of WINED3DDEVICE_CREATION_PARAMETERS. 2006-04-03 21:35:44 +02:00
Stefan Dösinger 0ad31f819d wined3d: Add WINED3DBACKBUFFER_TYPE to wined3d_types.h. 2006-04-03 12:17:35 +02:00
Stefan Dösinger fce54bcc49 wined3d: Add WINED3DDISPLAYMODE to wined3d_types.h. 2006-04-03 12:17:22 +02:00
Stefan Dösinger 1d47556195 wined3d: Use WINED3DSWAPEFFECT in the wined3d headers and code. 2006-03-28 17:51:45 +02:00
Stefan Dösinger d75fd75d48 wined3d: Add WINED3DPOOL to wined3d_types.h. 2006-03-28 17:34:42 +02:00
Stefan Dösinger b4b295c2a5 wined3d: Add WINED3DMULTISAMPLE_TYPE to wined3d_types.h. 2006-03-27 11:30:49 +02:00
Stefan Dösinger 0f7eb52789 wined3d: Add WINED3DTRIPATCH_INFO to wined3d_types.h. 2006-03-27 11:30:49 +02:00
Stefan Dösinger 6af24c816d wined3d: Rectpatch code fix.
Update the wined3d code to use WINED3DRECTPATCH_INFO, which was added
with an older patch.
2006-03-24 12:13:50 +01:00
Oliver Stieber 58fdd892c6 Remove the setting of the result pointer to NULL in creates, tests
show that windows doesn't set the result to NULL on error.
2005-11-14 11:21:46 +00:00
Francois Gouget 0edbaf7e80 Remove spaces before '\n' in traces. 2005-11-10 12:14:56 +00:00
Francois Gouget 2adb302a99 Add trailing '\n's to ok() and TRACE() calls. 2005-11-10 11:17:38 +00:00
Oliver Stieber cd159e3a74 Tidy up d3d9 and finalize passing d3d9 calls to wined3d for now. 2005-08-23 09:34:57 +00:00
Oliver Stieber 8a6799d47d Implement render targets using either textures, swapchains or
standalone surfaces.
2005-07-07 20:35:05 +00:00
Oliver Stieber 111445b944 Check for a null surface returned from CreateSurface.
Relay GetCreationParameters call to wined3d.
2005-07-01 19:15:42 +00:00
Eric Pouech 809edabfbe Const correctness fixes. 2005-06-27 09:53:46 +00:00
Oliver Stieber 46e7c30a71 Implement swapchains. 2005-06-23 11:05:24 +00:00
Oliver Stieber 0ce74f54fe Call wined3d for GetDirect3D instead of using the ->direct3D instance,
which is no longer valid.
2005-06-21 20:04:07 +00:00
Oliver Stieber e70e3ba0ff Change the way caps are sent between d3d9/d3d8 and wined3d to make it
easier for wined3d to support additional versions of Direct3D.
2005-06-17 09:59:03 +00:00
Dmitry Timoshkov 4625628e67 Make some of the OLE interface vtables const. 2005-05-27 20:17:35 +00:00
Oliver Stieber 67f2ad4563 - Volume now inherits Resource. This isn't the way Microsoft implements
the interface but it is more correct way (Microsoft even have a
  resource type of volume).
- Moved usage, format, allocatedMemory and size onto the resource
  class structure.
- Refactored Preload for classes that inherit BaseTexture, preload now
  binds the texture instead of bind texture calling preload, bindTexture
  allocated a glTexture if there isn't one.
- Added two new class static members BaseTexture_CleanUp and
  Resource_CleanUp that should be called by classes that implement
  BaseTexture or Resource.
2005-03-29 19:01:00 +00:00
Oliver Stieber 2121f7831e Put all the stubs in wined3d in place, with some functionality copied
across from d3d9.
Make sure all d3d9 device function call their wined3d counterpart (or
perform a function).
2005-03-02 12:16:10 +00:00
Paul Vriens 8efb8794e8 Check that ppZStencilSurface is not null. 2005-02-10 20:25:20 +00:00
Raphael Junqueira 1226e72bf7 - add vertex Declaration support (using wined3d)
- minimal impl for SetRenderTarget and CreateQuery (needed to get
  some samples working)
- remove no longer needed #undef GL_VERSION_1_4
2005-01-28 14:03:32 +00:00
Paul Vriens 7a49e82dac - use Interlocked* functions in AddRef and Release.
- store the result of the Interlocked functions and use only this.
2005-01-24 11:31:45 +00:00
Jason Edmeades 33025b203c - Handle failures to allocate storage more gracefully.
- Only prototype the interfaces which are subclassed (I overdid it
  last time!).
- Implement Get/Set Texture and GetBackBuffer, plus device's
  GetDisplayMode / GetDeviceCaps.
- Make some of the d3d9 skeleton code issue fixme's to highlight code
  which hasn't been migrated yet.
- Correct the d3d9 headers for D3DSURFACE_DESC which caused stack
  corruption in demos.
2005-01-18 11:42:29 +00:00
Jason Edmeades bcecddc084 - Add texture support for all the texture types for d3d9->wined3d.
- Add prototypes for the COM interfaces.
- Fix some incorrect types from the last patch.
2005-01-17 13:44:57 +00:00
Jason Edmeades 41427857b1 Add render target support, and ensure there is a front and back buffer
created during device creation.
2005-01-09 17:37:02 +00:00
Jason Edmeades c4de952eb5 Add Clear, Present and EndScene support and fix a bug in the drawing
code.
2004-12-14 11:54:27 +00:00
Jason Edmeades 2003c7ab11 Add {G,S}etRenderState and {G,S}etTextureStageState support, and
ensure the stateblock is fully populated at device startup.
2004-12-13 13:35:38 +00:00
Jason Edmeades f738c146e2 Add {G,S}etIndices, {G,S}Viewport and enable the basic drawing
functionality into wined3d and call from d3d9.
2004-12-09 11:42:34 +00:00
Jason Edmeades 0a944ae319 Implement Material, Clip plane and Light support plus
MultiplyTransform.
2004-11-29 17:53:42 +00:00
Jason Edmeades eba27af4f1 Add Get/Set Transform support, plus BeginScene (does nothing). 2004-11-28 15:04:41 +00:00
Jason Edmeades 289562eeb5 - Implement SetStreamSource
- Ensure wined3d objects maintain a reference count of at least that
  of the d3dx version.
2004-11-23 13:52:46 +00:00
Jason Edmeades 447d5ed048 Implement the beginnings of the stateblock class, and a first method
to use it.
2004-10-21 20:59:12 +00:00
Jason Edmeades db7a50582c - Add support (as far as was previously) for the VertexBuffer and
Resource classes in wined3d and use when called from d3d9.
- Reduce the header includes in all the d3d9 interface to one common
  set in the private header.
2004-10-14 00:32:04 +00:00
Jason Edmeades b9e2bedac1 Copy and tidy up the code from dx8 create device into wined3d. Call
from wined3d and d3d8, but short term only use the code for real from
d3d9.
2004-10-08 20:52:33 +00:00
Jason Edmeades ac490fabac Add a IWineD3DDevice object type (empty for now), and create one when
an IDirect3DDevice object is created.
2004-10-07 04:22:21 +00:00
Alexandre Julliard f5f7a1822c Removed some more uses of the non-standard ICOM_THIS macro. 2004-09-08 01:50:37 +00:00
Alexandre Julliard f714b39762 Get rid of the no longer used ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
macro.
2004-08-23 19:39:48 +00:00
Alexandre Julliard 48c4bb3c31 Get rid of the non-standard ICOM_VTABLE macro. 2004-08-12 23:00:51 +00:00
Alexandre Julliard e37c6e18d0 Fixed header dependencies to be fully compatible with the Windows
headers (with help from Dimitrie O. Paun).
2003-09-05 23:08:26 +00:00
Raphael Junqueira a3dbd7e2c7 - some cleanups and fixes on d3d8 and d3d9 headers
- a lot of stubs for d3d9.dll
2003-07-01 01:09:17 +00:00