Commit Graph

81 Commits

Author SHA1 Message Date
Henri Verbeet b3defd4c80 wined3d: Rename "wineD3DDevice" to "device". 2009-12-10 11:54:47 +01:00
Henri Verbeet b6ef17f23d wined3d: Remove unused GetDevice() implementations. 2009-12-09 13:51:04 +01:00
Henri Verbeet d7b087618b wined3d: Remove some unused GLINFO_LOCATION definitions. 2009-10-29 13:09:20 +01:00
Henri Verbeet eeb54b9922 wined3d: Keep better track of where we're using wined3d contexts.
The idea here is that we can restore the thread's current GL context on
context_release() if it doesn't correspond to the current wined3d context on
context_acquire().
2009-10-28 11:15:19 +01:00
Henri Verbeet 47c84f4f7f wined3d: Use the DXGI naming convention for all formats. 2009-09-25 15:15:44 +02:00
Stefan Dösinger 5b5e3bd0d2 wined3d: Track GL texture states in a separate structure. 2009-09-23 13:24:16 +02:00
Henri Verbeet dbc4dfc495 wined3d: Move "parent_ops" to IWineD3DResourceClass. 2009-09-18 08:55:33 -05:00
Henri Verbeet a8e8f763bf wined3d: Don't free D3D textures until the wined3d texture is destroyed. 2009-09-18 08:54:34 -05:00
Henri Verbeet 83b3d4f27a wined3d: Move vtable initialization to the texture init functions. 2009-09-16 13:05:45 -05:00
Henri Verbeet a5214c306f wined3d: Don't free D3D surfaces until the wined3d surface is destroyed.
This prevents for example a d3d9 depth stencil from being destroyed when it
has no external references but is still in use by the device/stateblock. A
nice side effect is that it simplifies handling of "implicit" surfaces like
the frontbuffer and backbuffers, as well as the forwarding of reference counts
for surfaces that are part of a texture.
2009-09-16 13:04:32 -05:00
Stefan Dösinger 531ec2267b wined3d: Allow filtering on RECT textures.
There is no reason to disable linear filtering, we just cannot use mipmapping.
2009-08-31 12:18:01 +02:00
Roderick Colenbrander 5a00c8053e wined3d: Get rid of two dead render target lock mode options. 2009-08-10 13:10:49 +02:00
Henri Verbeet a86f31658b wined3d: Move texture filter lookup table initialization to basetexture_init(). 2009-08-05 11:20:19 +02:00
Henri Verbeet ee4d18cc83 wined3d: Pass NULL to ActivateContext() when we don't need a specific target.
Once we keep track of the wined3d context for each thread,
lastActiveRenderTarget won't do what we want here.
2009-07-21 14:22:44 +02:00
Henri Verbeet 43e6686a78 wined3d: Rename _WineD3D_GL_Info to struct wined3d_gl_info. 2009-07-17 11:22:07 +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 7363b6e2e3 wined3d: Document GL context dependencies. 2009-06-26 12:05:07 +02:00
Henri Verbeet 5171a65d81 wined3d: Introduce texture_init() to handle most of the 2D texture initialization. 2009-06-03 11:38:50 +02:00
Henri Verbeet 22022cf8b3 wined3d: Create a texture_cleanup() function. 2009-06-02 11:57:22 +02:00
Henri Verbeet 91c3a5eac1 wined3d: Directly call basetexture_apply_state_changes().
All the implementations of IWineD3DBaseTexture::ApplyStateChanges() forward to
basetexture_apply_state_changes().
2009-05-13 11:55:01 +02:00
Henri Verbeet 42e31a4242 wined3d: Fix a few sign compare warnings. 2009-03-25 11:12:30 +01:00
Henri Verbeet 2dc7fc2916 wined3d: Remove the format field from IWineD3DResourceClass. 2009-03-13 11:29:19 +01:00
Stefan Dösinger 4386a827e9 wined3d: Pass the requested srgb flag to PreLoad.
Add a new wined3d-internal PreLoad function to textures and surfaces
that takes a parameter specifying wether the rgb or srgb texture
should be loaded.
2009-02-17 12:51:36 +01:00
Stefan Dösinger c585b4de99 wined3d: Duplicate GL textures for srgb switching.
This reduces the number of srgb switching reloads quite a lot. The only
situation in which a reload is needed is if the rgb copy is modified on the GL
side and the srgb copy is needed.
2009-02-17 12:48:05 +01:00
Henri Verbeet 9440dfedf4 wined3d: Remove AddDirtyRect() from the public interface. 2009-01-14 13:51:00 +01:00
Henri Verbeet 007c648c20 d3d: Correct some debug levels. 2008-12-30 11:36:50 +01:00
Henri Verbeet 2acf8d7947 wined3d: Rename resource functions to reflect that they're not COM functions. 2008-12-03 09:47:26 +01:00
Henri Verbeet 4d60b6633c wined3d: Rename basetexture functions to reflect that they're not COM functions. 2008-12-03 09:47:16 +01:00
Alexandre Julliard 6cfef95ce7 wined3d: Convert source files to utf-8. 2008-10-18 19:21:20 +02:00
Henri Verbeet 0ee57cf142 wined3d: Set the texture name at surface creation.
This prevents the target from changing during the first PreLoad() call
on a surface, which would be inconvenient when attaching a surface to
a FBO for example.
2008-09-25 11:52:50 +02:00
Henri Verbeet eaf2474003 wined3d: Split SetGlTextureDesc() up.
This creates a function for setting the texture name and one for
setting the texture target. The idea is that the texture target should
get set right after the surface is created, and won't change, while
generating a texture name can wait.
2008-09-25 11:52:42 +02:00
Henri Verbeet 728932f2eb wined3d: Don't needlessly bind the texture in PreLoad(). 2008-09-17 20:49:47 +02:00
Stefan Dösinger 750973cec5 wined3d: Remove BaseTexture::UnBindTexture. 2008-08-28 11:24:49 +02:00
Stefan Dösinger 5b77a2f90b wined3d: Override the default filter of conditional np2 textures. 2008-08-25 12:24:06 +02:00
Stefan Dösinger c425bbccab wined3d: Set the texture wrap default with the NP2 emulation properly. 2008-08-21 13:33:42 +02:00
Stefan Dösinger c088edeae7 wined3d: Use GL_ARB_texture_non_power_of_two emulation.
ATI cards prior to the radeon HD series did not have unconditional non
power of two support. So far we've used texture_rectangle for that, or
created a bigger power of two texture with padding. This had the
disadvantage that we had to correct the coordinates, which causes
extreme problems with shaders(doesn't work, pretty much).

Both the MacOS and the fglrx driver have support for
GL_ARB_texture_non_power_of_two, and run it on the hardware as long as
we stay within the texture_rectangle limitations. This allows us to
have conditional non power of two textures with normalized
coordinates. This patch adds an internal extension, and the code
creates a regular GL_TEXTURE_2D texture with NP2 size, but refuses
mipmapping, filtering and texture_rectangle incompatible
operations. This makes np2 textures work with shaders on fglrx and
macos.
2008-07-18 11:41:09 +02:00
Alexander Dorofeyev d6ba069d9e wined3d: Improve detection of device palette change. 2008-04-03 11:31:57 +02:00
Alexander Dorofeyev 9b04822170 wined3d: Remove ENTER_GL/LEAVE_GL in IWineD3DTextureImpl_PreLoad. 2008-04-03 11:31:19 +02:00
Stefan Dösinger b1d8af7926 wined3d: Update copyright lines. 2008-04-02 20:22:42 +02:00
Stefan Dösinger a0f2e6e55e wined3d: Move some UnLoad code to the base texture class. 2008-02-05 12:32:58 +01:00
Andrew Talbot 35c3bfe25c wined3d: Remove unneeded casts. 2008-01-24 11:41:47 +01:00
Stefan Dösinger 5d7b8dafb8 wined3d: Implement IWineD3DTexture::UnLoad. 2008-01-14 15:11:18 +01:00
Stefan Dösinger e59ddb0ab1 wined3d: Add a new IWineD3DResource::UnLoad method. 2008-01-14 15:10:17 +01:00
H. Verbeet 2820ecc5fe wined3d: Call SetGlTextureDesc() from BindTexture() rather than from PreLoad(). 2008-01-03 11:40:31 +01:00
Stefan Dösinger d09cbcec91 wined3d: Activate GL_ARB_texture_rectangle. 2007-11-29 13:36:55 +01:00
Stefan Dösinger 26f7eae9cf wined3d: Non power of two texture fixes. 2007-11-14 11:59:21 +01:00
Stefan Dösinger 24564915b7 wined3d: Clean up AddDirtyRect. 2007-09-18 09:34:08 +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 a460a2df43 wined3d: Store the gl information in a per adapter structure and initialize it only once. 2007-06-11 13:51:06 +02:00
Phil Costin 622f62d352 wined3d: Enable the loading and reloading of gamma corrected textures. 2007-06-07 13:02:04 +02:00