Commit Graph

190 Commits

Author SHA1 Message Date
Felix Nawothnig e600f7d082 wined3d: Issue an error when the render target is read back without SFLAG_INDRAWABLE being set. 2007-04-09 12:17:17 +02:00
Felix Nawothnig c0782603d0 wined3d: Allow np2 textures to be loaded for SFLAG_INDRAWABLE. 2007-04-09 12:15:56 +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 4f5d33311b wined3d: Use GL_APPLE_client_storage if available. 2007-04-02 11:34:12 +02:00
Stefan Dösinger e25a16fda5 wined3d: General signed format correction without native signed formats.
Implement signed d3d formats for D3DFMT_V8U8 and D3DFMT_Q8W8V8U8 if no
suitable opengl signed format is supported.
2007-03-21 22:51:19 +01:00
Stefan Dösinger ede01abee2 wined3d: Support GL_ATI_envmap_bumpmap for D3DFMT_V8U8. 2007-03-21 22:50:41 +01:00
Stefan Dösinger fcb83e7111 wined3d: Activate a context before doing opengl calls. 2007-03-19 12:22:57 +01:00
Erich Hoover 01199072dd wined3d: Fix LockRect memory location calculation for WINED3DFMT_DXT*. 2007-03-17 19:51:34 +01:00
Stefan Dösinger 0b46254b57 wined3d: Blitting to offscreen target.
Fix the NULL deref that occured when blitting to offscreen targets and
select the proper gl drawing buffer instead.
2007-03-15 12:14:39 +01:00
Erich Hoover 9795e6839f wined3d: Allow SetCursorProperties on existing cursor. 2007-03-14 13:14:08 +01:00
Stefan Huehner 4d1d01f266 Mark several functions as static. 2007-03-13 13:35:12 +01:00
Fabian Bieler 8dae597f24 wined3d: Implemented signed texture formats via NV_TEXTURE_SHADER. 2007-03-13 11:51:56 +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 ebe274feed wined3d: Remove IWineD3DSurface::SetPBufferState.
The method is removed because it does not really help with
anything. It should not be exported from wined3d, there is no need for
the other libs to call it. It does not help abstraction and code
simplification in any way because it is very specific and the code
calling it has to know what is happening in the surface to use this
method.
2007-03-07 12:17:33 +01:00
Stefan Dösinger daeffc897b wined3d: Use an aux buffer as blitting helper if available.
This helps performance a bit because the function does not have to
wait for the 2nd read to finish before returning. Only do that if we
have an aux buffer to mess with for free though.
2007-03-06 22:16:44 +01:00
Stefan Dösinger ae57138eae wined3d: WINED3DFMT_U8V8 is signed.
Plain OpenGL does not provide any signed pixel formats, so the
unsigned GL_RGB is used for loading perturbation data into pixel
shaders that use texbem. For correct loading, the signedness has to be
considered.
2007-03-06 22:16:12 +01:00
Stefan Dösinger 424d34f84f wined3d: Use the source surface's texture for writing the backup.
The hwstretch blit code creates a new texture each time it is called
to back up the back buffer and releases it afterwards. It is more
efficient to keep the texture and release it with the surface.
2007-03-01 11:39:52 +01:00
Stefan Dösinger 8d9a553d89 wined3d: Support for using auxilliary buffers for offscreen rendering.
OpenGL AUX buffers provide a way for offscreen rendering which is very
similar to our back buffer "offscreen" rendering emulation. Not all
card support aux buffers, but if they are available they are a nice
present which is easy to use.
2007-02-28 21:04:47 +01:00
Francois Gouget 93494f2ac0 Assorted spelling fixes. 2007-02-20 20:30:51 +01:00
Stefan Dösinger 7676462a3d wined3d: Fix d3d8/9 style palettes. 2007-02-20 11:46:20 +01:00
Stefan Dösinger 5e37345b30 wined3d: Activate a different context if the active render target is destroyed. 2007-02-19 13:10:51 +01:00
Stefan Dösinger 1f32d6235e wined3d: Convert the full surface for now.
Until we have proper subrectangle handling for offscreen surfaces,
surface conversion has to use the real surface sizes, and not the size
of the opengl subrectangle that it is going to upload. Due to the
power of 2 limitations the gl height may be bigger than the real
surface height. If that is not the case, the uploading function will
pick the correct parts from the converted surface data.
2007-02-15 17:22:27 +01:00
Stefan Dösinger 20a07693b5 wined3d: Read offscreen render targets upside down when blitting them to a texture. 2007-02-15 17:22:06 +01:00
H. Verbeet 75ebf29e1b wined3d: Get rid of any remaining d3d9 stuff in surface.c and surface_gdi.c. 2007-02-15 14:21:11 +01:00
Stefan Dösinger 1282b43302 wined3d: Restore blitting environment after modifying it. 2007-02-15 11:41:05 +01:00
Stefan Dösinger 8b8e30b1e1 ddraw, wined3d: Color keying tests and fixes. 2007-02-15 11:37:00 +01:00
Stefan Dösinger ccd2772e28 wined3d: Accelerated blits from and to offscreen render targets. 2007-02-15 11:36:39 +01:00
Stefan Dösinger de036ff68e wined3d: Convert and load U8V8 surfaces as rgb.
GL_INDEX is definitly not the way to load U8V8 surfaces
2007-02-15 11:36:28 +01:00
Stefan Dösinger b90a665d20 wined3d: Do not allocate compressed surfaces with glTexImage2D. 2007-02-14 12:29:42 +01:00
Stefan Dösinger 403b5ecf60 wined3d: Partial render target locking. 2007-02-14 12:29:11 +01:00
Stefan Dösinger b48dfb3c54 wined3d: Always use np2 repacking if no native np2 support is available. 2007-02-14 12:29:01 +01:00
Stefan Dösinger 21172f1dec wined3d: Improve render target locking. 2007-02-14 12:28:39 +01:00
Stefan Dösinger c3f0eb489b wined3d: Remove pow2Size from the surfaces. 2007-02-14 12:28:19 +01:00
Stefan Dösinger 12252d0589 wined3d: Use the context manager to select the primary render target. 2007-02-13 12:05:35 +01:00
Stefan Dösinger e534340450 wined3d: Improve render target to texture blits. 2007-02-13 12:04:20 +01:00
Stefan Dösinger f22d37e4dd wined3d: Use the context manager to prepare for blitting. 2007-02-13 12:04:08 +01:00
Stefan Dösinger e6c9a073b0 wined3d: Store state optmization members in the context. 2007-02-13 11:50:38 +01:00
Stefan Dösinger c739c387b6 wined3d: Add a per context structure for context management. 2007-02-13 11:50:14 +01:00
Stefan Dösinger 67b1f4a7e9 wined3d: BeginScene and EndScene tests and fixes. 2007-02-12 12:08:34 +01:00
Stefan Dösinger 03389acc30 wined3d: Do not free regularily locked surfaces. 2007-01-15 12:43:29 +01:00
Stefan Dösinger 723b32b1c9 wined3d: Do not perform a NULL check on riid (Coverity). 2007-01-12 11:49:46 +01:00
Stefan Dösinger d0f1c23c93 wined3d: Select a proper texture unit in LockRect and dirtify the state. 2007-01-03 11:20:06 +01:00
Stefan Dösinger e26e3ee5f3 wined3d: Remove d3ddevice_set_ortho. 2007-01-03 11:19:55 +01:00
Stefan Dösinger 82bd0790ed wined3d: Move the projection matrix into its own state. 2007-01-03 11:19:45 +01:00
Stefan Dösinger 5fa0f7f775 wined3d: Move the world matrix to the state table. 2007-01-03 11:19:09 +01:00
Alexandre Julliard 656fc93815 Use GetDC instead of CreateDC where possible. 2007-01-02 17:16:36 +01:00
Stefan Dösinger 603038a07a wined3d: Do not setup states for unlocking if unlocking is disabled. 2006-12-29 12:49:41 +01:00
Stefan Dösinger 666b507766 wined3d: Move samplers to the state table. 2006-12-20 17:07:56 +01:00
H. Verbeet 8355b1a501 wined3d: Allow the device to store multiple render targets. 2006-12-20 12:31:40 +01:00
Markus Amsler 9b397ec2d5 wined3d: Remove IWineD3DSurface_GetContainerParent. 2006-12-18 12:02:17 +01:00