Commit Graph

431 Commits

Author SHA1 Message Date
Lionel Ulmer 8944b25ead Be more stringent in the 'Lock' invalid RECT check. 2003-06-13 16:31:41 +00:00
Lionel Ulmer f0339d222d Fix the BLT COLOR_FILL case. 2003-06-13 16:29:18 +00:00
Lionel Ulmer 068fa5d471 - fix the texture upload code when RECT is actually used
- optimize FB Locks / Unlocks when RECTs are used
2003-06-04 23:43:29 +00:00
Lionel Ulmer e14233ae03 - Viewport hack to get some old D3D1 games to work
- TRACEing fix
2003-06-04 23:39:13 +00:00
Lionel Ulmer 3f61d28661 - small TRACEing fix
- fix bug in texture upload (I wonder how I missed this :-/ )
- improve the D3D1/2 texture mapping modes
2003-06-04 23:38:22 +00:00
Lionel Ulmer ed88304868 - fix (stupid) regressions introduced by last series of patch
- 24 bpp handling for lock / unlock code
- some better checks for AlphaPixel value
- better TRACEing to better catch threading problems
2003-06-04 23:36:48 +00:00
Lionel Ulmer fc58c2a933 - some GL critical section fixes
- only bind textures at start of rendering
- optimized the texture parameter code
- optimize of the 'dirty checking code' for mipmapping
- handles the MAXMIPLEVEL texture parameter
2003-06-04 23:34:58 +00:00
Lionel Ulmer 4aba282bb8 - proper (tested on Win2K) reference counting for Direct3D object
- fix one case of reference counting on textures
- fix stupid bug in texture upload code
- yet another texture enumeration reordering
2003-06-04 23:31:39 +00:00
Lionel Ulmer f683839c13 Fixed a bug in the FrameBuffer => Texture blits. 2003-06-04 23:27:28 +00:00
Lionel Ulmer 97140ba2d1 - added RECT support to the texture upload code
- use the common code for the FB Unlock code
2003-06-04 23:26:53 +00:00
Lionel Ulmer 3383ce5d51 - some clean-ups (extension code to be added soon)
- some interface changes for future reuse for Blt / Lock code
- fixed some Pitch problems in texture uploads (mostly for 'small'
  mip-mapping levels)
2003-06-04 23:24:59 +00:00
Lionel Ulmer 094f6bc985 Refactoring of the texture upload code. 2003-06-04 23:22:13 +00:00
Lionel Ulmer 934d97b56b Fix texture parameters handling on texture change. 2003-06-04 23:19:14 +00:00
Lionel Ulmer 8352f1f48a - remove some extraneous saving of the read buffer settings
- cleaned-up the GL / device critical section handling
2003-06-04 23:18:24 +00:00
Lionel Ulmer 241d306221 - protect viewport setting with GL lock
- no need anymore to flush to FB on execute buffer calling
2003-06-04 23:17:23 +00:00
Lionel Ulmer f87c54f14f Some threading fixes (prevents some dead-locks). 2003-06-04 23:16:28 +00:00
Lionel Ulmer 21856fbd1c - implement FB => Texture blits
- fix compilation on non-recent glext.h systems
2003-06-04 23:10:38 +00:00
Lionel Ulmer c312ff950b - do not search for attached surfaces if the texture doesn't have the
MIPMAP flag set
- add GL crit. section support for matrix setting
- support the various BLEND texture operations
2003-06-04 21:53:43 +00:00
Yorick Hardy a856019687 Added the D3DTBLEND_DECAL render state. 2003-06-04 21:52:46 +00:00
Alexandre Julliard 24d0a8394f Authors: Mike McCormack <mike@codeweavers.com>, Lionel Ulmer <lionel.ulmer@free.fr>
Make DDraw not linked 'statically' to OpenGL.
2003-06-04 20:13:21 +00:00
Lionel Ulmer a4d733ae5a - remove fogging too when doing the flush of the frame buffer
- handle dest rect in the Blt DEPTH_FILL case
- fix QueryInterface on the D3D Device
2003-05-22 03:38:22 +00:00
Christian Costa 1392c77d7e Remove all openGL calls in execute buffers and use the Direct3D7 APIs.
Enable retrieving the render target surface of a device through its
QueryInterface method.
Avoid lights updating when a viewport and a device have not been
associated to them.
Clear the Z buffer only when we're asked to by Checking D3DBTL_FILL
flag.
2003-05-20 17:49:40 +00:00
Lionel Ulmer 97f216c93c - some tracing fixes
- flush the right buffer to the screen
2003-05-20 04:27:04 +00:00
Lionel Ulmer c577c27e2b No need to flush the surface back if last lock was a RO lock. 2003-05-20 04:21:46 +00:00
Lionel Ulmer 8daf96c203 - fix bug in 'Blt DEPTH_FILL' override
- added a lock around the flushing of a surface to the frame buffer
- optimize texture loading my minimizing the cases where a conversion
  needs to occur and also by reusing the allocated memory
2003-05-20 04:10:22 +00:00
Lionel Ulmer 7b245fa7de Have Lights and Clipplanes transformed properly. 2003-05-20 03:58:01 +00:00
Lionel Ulmer 11b1b94a67 - implement the TFACTOR texture stage state
- support Texture matrices
- various misc. clean-ups
2003-05-20 02:15:24 +00:00
Lionel Ulmer 86f69135c4 Added support for non-full screen viewports and clearing. 2003-05-19 23:03:38 +00:00
Lionel Ulmer 5d62e55d3d Better handling of pitch set to 0. 2003-05-19 21:38:58 +00:00
Lionel Ulmer 2d27504fc1 Added RGB 32 surface locking (seems to work fine without resorting to
Alpha hacks).
2003-05-19 21:37:50 +00:00
Lionel Ulmer 783b3236f5 Support for device surface locking. 2003-05-17 18:41:26 +00:00
Lionel Ulmer 166750299e Silence some TRACEs to better spot real errors. 2003-05-17 18:30:27 +00:00
Francois Gouget f803e2a92d Fix miscellaneous spelling errors and typos. 2003-05-13 00:41:57 +00:00
Lionel Ulmer a872c781ea - separate geometry tracing in a new debug channel (ddraw_geom)
- added handling for some new texturing ops
- prepare for addition of multi-texturing
- another way to fix the device enumeration for the reference device
- fix compilation with some glext.h files
- fix a bug in one texture conversion function
- added new texture format (but still texturing problems in 3DMark2000)
2003-05-12 03:09:17 +00:00
Lionel Ulmer 7ebdcb3538 Initialize the dwMipmapCount field even if the application forgets it. 2003-05-11 03:46:53 +00:00
Lionel Ulmer 449f6b212f - added mipmapping support
- added locking for concurrent access to the D3D device
- improved tracing
- added support for most texture combine stages (inspired by the D3D8
  code)
- disable current lock / unlock code pending proper solution
2003-05-11 03:44:53 +00:00
Christian Costa 0955adfc2e Enable branch forward operation in execute buffer. 2003-05-11 03:28:53 +00:00
Christian Costa 4ea9589981 Put the device name string on the stack during devices enumeration.
Disable reference enumeration.
2003-05-11 03:28:33 +00:00
Lionel Ulmer 9914a8ec5d - only enumerate 32 bpp ARGB texture format and remove RGBA one
- add support for 32 bpp ARGB texture format
2003-05-08 21:03:57 +00:00
Lionel Ulmer 1279d9a0f4 Actually set the GL context before doing any GL calls. 2003-05-04 02:24:03 +00:00
Alexandre Julliard 69361e08b9 Moved x11drv.h to dlls/x11drv. 2003-04-22 04:05:08 +00:00
Alexandre Julliard 31e78f479e Header files must not include config.h. 2003-04-12 00:06:42 +00:00
Alexandre Julliard f00c46f030 Use a more compatible technique to declare COM interfaces methods,
using Microsoft's STDMETHOD macros instead of the Wine-specific
ICOM_METHOD ones.
2003-04-10 00:19:24 +00:00
Rok Mandeljc ef141f721c Update version info to 8.1. 2003-04-03 23:56:12 +00:00
Alexandre Julliard 114a31a2a8 Take advantage of new winebuild syntax to remove redundant function
names in spec files.
2003-03-20 03:53:12 +00:00
Tony Lambregts 2e24a148bf Replace DPRINTF with TRACE. 2003-03-15 00:12:42 +00:00
Lionel Ulmer 68c3a284aa - some Caps clean-up when no OpenGL compiled in
- fix some fonts displaying problems
2003-03-07 20:34:34 +00:00
Lionel Ulmer 19e6bf96e8 Use the dwStartVertex argument in the Draw*PrimitiveVB methods. 2003-02-12 21:40:25 +00:00
Lionel Ulmer b307e6a77f Change algorithm to detect lighted / unlighted vertices. 2003-02-12 21:36:56 +00:00
Lionel Ulmer 4d09cba51d Handle the COLORVERTEX render state. 2003-02-12 21:35:06 +00:00
Lionel Ulmer db9b5f74dc Trace after the matrix has been copied, not before. 2003-02-12 21:34:46 +00:00
Lionel Ulmer dff968b5f3 - fixed GetTransform
- implemented MultiplyTransform
2003-02-12 21:26:28 +00:00
Lionel Ulmer 6238f9a6fb Added fogging for transformed vertices. 2003-02-12 21:26:05 +00:00
Christian Costa f21887f431 Fix comment in ZfromZproj.
Fix missing path in lighting code.
Move some OpenGL fog init to the right place.
2003-02-12 01:11:17 +00:00
Christian Costa 3268097dcd Implemented IDirect3DDevice7_Load. 2003-02-12 01:10:03 +00:00
Christian Costa 93a943eecc Add support for 24 bpp to _Blt_ColorFill.
Fix endianness issue in DIB_DirectDrawSurface_Blt.
2003-02-11 21:58:07 +00:00
Alexandre Julliard f8aa3b506c Added -Wpointer-arith gcc flag, and fixed the resulting warnings. 2003-01-23 21:32:35 +00:00
Christian Costa a49cc9e4e1 Implement vertex and pixel fog.
Fix fog color initialization.
2003-01-23 01:21:50 +00:00
Christian Costa 820b8ca0e8 Handle more light states. 2003-01-20 23:27:08 +00:00
Christian Costa 6d9630f397 Make D3D1..3 lights code rely on D3D7. 2003-01-20 23:24:05 +00:00
Lionel Ulmer f85759bcc9 Update the 'DIRECTDRAW7' flag according to the interface initialized. 2003-01-13 18:30:47 +00:00
Dan Kegel 0fd521fee3 Change RECT to use LONG to match win32 standard headers and fix format
strings to use %ld for RECT elements.
2003-01-08 21:09:25 +00:00
Lionel Ulmer 1213c17489 - rewrote a little bit the state magagement to remove the RenderState
stucture and use only the state_block code
 - factorize some code between interface revisions
 - fix some smalls bugs
2003-01-07 23:08:31 +00:00
Dimitrie O. Paun 297f3d898d Define NONAMELESS{STRUCT,UNION} explicitly in the files that need them. 2003-01-07 20:36:20 +00:00
Christoph Frick 7f4cb0621b Implementation of (Get|Set)ClipPlane for d3d7. 2003-01-07 19:42:26 +00:00
Lionel Ulmer 76beb5b7ec Factorize the 'ortho' code (will be needed later on). 2003-01-05 20:28:35 +00:00
Lionel Ulmer 2d7c07c7c3 Ignore the LPSURFACE bit if ALLOCONLOAD is set. 2003-01-05 20:28:17 +00:00
Lionel Ulmer 07f1269302 - fix in the GetHandle method
- factorize some code between D3D1/2/3 and D3D7
- fix reference counting for palettes
2003-01-05 01:04:55 +00:00
Lionel Ulmer 330a1b5f2d Enable Z buffer by default. 2003-01-03 22:32:30 +00:00
Lionel Ulmer f89ea6499d - some fixes / optimisations in the color keying code
- minimize at the maximum texture uploads
2003-01-03 21:17:47 +00:00
Lionel Ulmer cec93d0abd - re-activate the color-keying code
- fix yet again texture enumeration to please all games :-/
2003-01-03 21:16:03 +00:00
Christian Costa b110a96226 Reenable device's default render states initialization. 2003-01-03 21:10:11 +00:00
Lionel Ulmer e51b007088 Fix order of texture enumeration to fix yet another set of dumb games. 2003-01-03 21:09:25 +00:00
Christian Costa 4fc7a8495a Beginning of state block.
Initialize the device with the right D3D default values.
Implements GetRenderState, GetTextureStageState and GetLightState.
2003-01-03 21:08:50 +00:00
Lionel Ulmer c064dcf50c - hack for one case of the ProcessVertices case
- some changes in the execute buffer to reuse the new Matrix code
- always reinitialize the enumeration structures in case some games
  modify them
- added support for the (unused) Reserved1 field in the FVF formats
- fix 32 bit texturing and added more checks
- remove some useless and annoying fixme
2003-01-03 21:07:22 +00:00
Lionel Ulmer 0114945b6d - create a function to set the various transformation matrices to
factorize the code between the various code path
- fixed some logging stuff
2003-01-03 21:05:38 +00:00
Lionel Ulmer 74c95ec008 - more thunking in the D3DVertexBuffer COM object
- added 'support' for GetInfo
2003-01-03 21:04:12 +00:00
Lionel Ulmer d0f1569218 - light improvements
- misc. fixes
2003-01-03 21:03:15 +00:00
Lionel Ulmer 5f87d778aa - some additionnal flags logged
- fixes in the vertex buffer thunking + optimized flag support
2003-01-03 19:10:48 +00:00
Lionel Ulmer 442b235e63 Fix for stupid applications reading some bytes after the end of the
surface memory.
2003-01-02 20:14:24 +00:00
Lionel Ulmer 00a3d5f3f8 - added enumeration of the Reference device (some games seems to need
it to work and they want it enumerated first..)
- some comments about potential problems with Z masking
2003-01-02 20:13:47 +00:00
Lionel Ulmer 4dac4a5580 Added support for per-vertex material properties. 2003-01-02 20:12:16 +00:00
Christian Costa bc2cf94d2f Reimplemented SwapTextureHandles. 2003-01-02 20:07:05 +00:00
Lionel Ulmer ae10e9c5aa - removed some useless WARNs
- fixed backface culling and material settings
2003-01-02 20:05:48 +00:00
Christian Costa f78cf542dc Fix IDirect3DVertexBuffer interface.
Implements GetVertexBufferDesc.
Remove some useless FIXME.
2003-01-02 20:02:49 +00:00
Lionel Ulmer d70a2c0322 - beginning of Material and Light support for D3D7
- new rendering states supported
2003-01-02 20:01:54 +00:00
Lionel Ulmer 825ad05656 Fixed texturing. 2003-01-02 20:00:25 +00:00
Lionel Ulmer b07df8a198 - allow application to load palette-less textures
- handle palette change of loaded textures
- some changes in the ExecuteBuffer
2003-01-02 19:59:49 +00:00
Lionel Ulmer bb9837d2a4 - added some tracing in the fake ZBuffer methods
- added support for the DEPTH_FILL BLT
- set by defaut perspective correction to nicest.
- decrease the limit where 'w' is ignored
2003-01-02 19:58:21 +00:00
Lionel Ulmer f0541aa544 Added some blend states. 2003-01-02 19:56:52 +00:00
Christian Costa eb620386dd Handle more blend states. 2003-01-02 19:56:08 +00:00
Lionel Ulmer 07bcdf40d1 Prevent memory leak in freeing of the VertexBuffer. 2003-01-02 19:54:09 +00:00
Lionel Ulmer eb6e830727 Implement GetTransform and rework a bit the matrices storage. 2003-01-02 19:53:43 +00:00
Lionel Ulmer 7a025001d3 - implemented GetTexture
- semi-stubbed ValidateTexture
- fixed some errors in logging
2003-01-02 19:52:22 +00:00
Lionel Ulmer 6fb7ed8fa7 Added 'blt' and 'bltfast' override functions. 2003-01-02 19:51:25 +00:00
Lionel Ulmer ce3d96889f Added 'emulated' VertexBuffer support. 2003-01-02 19:46:46 +00:00
Lionel Ulmer c3d89f5566 - do not use the alpha coordinates when ALPHABLEND is disabled
- disable fogging in the XYZRHW case
- various other small fixes
2003-01-02 19:45:23 +00:00
Lionel Ulmer 62d4f41ee8 Factorize some code in the texture uploading function. 2003-01-02 19:44:14 +00:00
Lionel Ulmer da66dad0cc Handle texture addressing the D3D7 way. 2003-01-02 19:43:08 +00:00
Lionel Ulmer ffc8344ef2 Prevent lock-up in paletted texture with no palette case. 2003-01-02 19:41:25 +00:00