Commit Graph

95 Commits

Author SHA1 Message Date
Francois Gouget ad5ff7ceeb Assorted spelling and case fixes. 2004-02-09 22:07:42 +00:00
Francois Gouget 640cc3f3e1 Assorted spelling fixes. 2004-01-06 22:08:33 +00:00
Jason Edmeades 61608b71fc If swap mode is discard, clear the backbuffer before moving onto the
next frame.
2003-11-17 20:04:30 +00:00
Raphael Junqueira 63c1093f24 - stupid typos fixes on software vertex shader operands
- CopyRects fix (problem in error paths) based on Carlos Lozano patch
2003-11-11 00:43:51 +00:00
Carlos Lozano d970c097f4 Check that we don't write out of the defined range of palettes. 2003-11-04 04:17:28 +00:00
Jason Edmeades 2b832f11a5 Make support for CopyRects to a small area of the back buffer, and
correct the general method of updating the back buffer.
2003-10-31 04:15:07 +00:00
Jason Edmeades ef8a634cb4 Clear should not be affected by write masks. 2003-10-31 03:35:43 +00:00
Jason Edmeades ef65d2a6a6 ColorWriteEnable should not impact clearing the screen. 2003-10-31 00:09:07 +00:00
Jason Edmeades 0b37bf74b9 CopyRects (per rect) copied one too many lines, trashing the heap.
Also tidies up scissor test from previous patch.
2003-10-30 23:24:44 +00:00
Jason Edmeades c922278bfa Culling to different viewports failed as clearing the whole viewport
cleared the screen.
2003-10-30 23:05:09 +00:00
Jason Edmeades 14231aa83b Correct writing to back buffer in non-ortho mode, and ensure the line
stipple is passed correctly to enable proper wireframe support.
2003-10-30 22:46:29 +00:00
Jason Edmeades 06fd1e25f7 Minor fixes - Remove light debug statements, handle disabled specular
material properly, release surfaces when debugging and clean up trace
a little.
2003-10-03 03:35:53 +00:00
Jason Edmeades 8b2c10bcd4 MaxActiveLights means number of concurrent lights, but any number can
be  set up. Change support for lights into a linked list and only set
up an equivalent gl light when the light is enabled.
2003-09-30 00:21:07 +00:00
Jason Edmeades ce85a90538 DXTn format has odd mipmap levels in that the space allocated for
small levels needs a lot of padding.
2003-09-19 04:02:35 +00:00
Jason Edmeades 7ac9d258c3 GL doesn't like incorrect lengths passed into DXTN processing. 2003-09-19 00:20:19 +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
Jason Edmeades beb4ac8fe1 DXT1/3/5 support was broken, but unnoticeable since we also indicated
it wasn't supported.
2003-08-15 03:50:08 +00:00
Jason Edmeades d8b2109e61 Only reapply the texture states necessary when a different texture
gets bound to the same texture unit.
2003-08-05 19:18:58 +00:00
Jason Edmeades 2ec3bbccc1 glColorMaterial enable/disable setup is only done when really necessary.
If glColorMaterial is set to track current color and none is supplied,
it gets disabled.
glMaterial is reset when I think it is necessary.
Slow mode now has defaults for when fvf parms are not supplied (as per
fast mode).
Slow mode now sets up the specular color (forgot that bit previously,
I think!).
Trace now lists the front, back and stencil buffers for ease of
debugging.
2003-08-05 18:29:20 +00:00
Jason Edmeades 564f5828b0 Add fps debug channel, so we can see how the d3d code is performing and
their impact of performance changes.
SetTransform almost rewritten in a much neater way, and in
coordination with drawprim it significantly reduces the number of
times that we reload the matrixes.
2003-07-19 03:02:42 +00:00
Alexandre Julliard d09b2b988a Warning fix. 2003-07-15 20:52:21 +00:00
Jason Edmeades 021604c600 Implement UpdateTexture for 2D textures only.
Handle alphaop disabled but color op not-disable in a more appropriate
way (Docs say this is an illegal state and then proceed to use it).
Trace out textures as they are created.
Update the comments around the debug code and complete the debugging
set so textures which are used in the game can also be viewed.
2003-07-03 18:10:22 +00:00
Raphael Junqueira 44edc0c0ec - dsound and d3d works better when x11drv locks/unlocks are correct
- more traces
2003-06-18 03:17:42 +00:00
Jason Edmeades 21a092816a Fix the texture operations to resolve glitches shown in UT2003 when
get quad damage.
checkGLcall must not supply a \n as that is supplied by its
expansion.
Performance fixes to save applying the same states 6 times and to
reduce function calls when accessing front/back buffers.
Make traces more readable by more constants -> english descriptions.
2003-06-13 19:14:34 +00:00
Jason Edmeades 3cf874bb04 Make the fixed function pipeline support multiple streams for created
vertex shaders with no function supplied. Also split down draw
primitive along the lines of the d3dcore requirements and put in some
diagnostic aids.
2003-06-13 18:09:05 +00:00
Raphael Junqueira 85aa298ad2 Fixed compilation problems. 2003-06-06 18:12:59 +00:00
Raphael Junqueira e4882b1548 - cleaning of volume.c/volumetexture.c as done previously for
surface.c/*texture.c (with add of lockable, locked and Dirty flags)
- add of dirtyRect/dirtyBox for better dirtification management (not
  used yet, but huge optimisation can be possible now)
- fix some debug traces (well it's better to use debug_d3dpool)
- fix some stupid regression on point parameters (forgot to check
  extension on fillcaps)
2003-06-04 23:05:46 +00:00
Raphael Junqueira 713013a978 - add a new private header d3dcore_gl.h that declares needed opengl
defines and the caps defines
- cleanup of device.c using the caps defines (avoid the #ifdef
  nigthmare)
- add {Set,Get}GammaRamp support
2003-06-04 23:01:49 +00:00
Raphael Junqueira 24be30657d - some cleanup and warning fixes
- split of CreateDevice gl/gxl detection code into FillGLCaps
- implementation of resolution change (using ChangeDisplaySettings)
  but desactived as ChangeDisplaySettings don't seem to work well
- begin of swap chain support (now need to split/clean
  gxlpbuffer/glxpixmap code for swap chain use)
2003-06-04 22:55:19 +00:00
Raphael Junqueira b050a3dbf1 - pixel shader program dump code
- pixel shader code split into a new "COM object" (as done before for
  vertex shader)
- some fixes on Validate* functions call types
- add pixel shader (ie fragment_program) detection on caps code
2003-06-04 22:45:57 +00:00
Jason Edmeades 3d51c865d4 Add support for a lot of the remaining texture ops, move code into the
utils module, and clean up the main code path.
2003-06-04 22:20:47 +00:00
Raphael Junqueira 0b5e9d9feb - some cleanups
- more cubetextures fixes (now d3d8 sdk cubemap sample work almost
  perfectly)
- add a new debug function "debug_d3dpool" and use it
- add a new param (the device) for the conversions functions (because
  we need to check caps to see how to convert)
- some crashes fixed in render to surface code with no stencil-depth
  surface
- a very simple cliplane fix
- a stupid palettes fix (stupid language)
- begin of anisotropic filter support
- begin of compressed textures support
- a very useful debug functions: IDirect3DSurface8Impl_SaveSnapshot to
  dump surfaces as png ;)
- many useful surfaces debug code (using SaveSnapshot)
2003-06-04 22:12:34 +00:00
Jason Edmeades 4e3100825f Correct specular enable renderstate. 2003-06-04 22:04:44 +00:00
Jason Edmeades 2eaf05bfd5 Avoid the use of glGet when we know the information locally. 2003-06-04 22:02:06 +00:00
Raphael Junqueira 3cae8cfa69 - implemented render to surfaces (and render to new rendertargets)
using glx pbuffers (with a useful debug code to display rendered
  surface into window drawable)
- better cubetextures
- split utilities functions into utils.c and added more
- more readable debug again
- a better caps code (not perfect but i'll use glx code later)
- use of the new caps code
- begin of UpdateTexture
- begin of Cursor support
- cleaning most of deprecated #if 0/#endif
- correct some lockable/unlockable behavior
- correct some returns code
2003-06-04 21:55:29 +00:00
Jason Edmeades 350aa2dcc4 Fill in lots of unimplemented render states. 2003-06-04 20:10:43 +00:00
Jason Edmeades 7f53bb8f8c Avoid setting and resetting the same values when there are many
rectangles.
2003-05-22 03:35:24 +00:00
Raphael Junqueira 9489f8bdc0 - mor usefull debug functions debug_d3dusage and debug_d3ddevicetype
- fix a crash in pixel shader parser (happened with unreal2)
- currently desactive pixel shaders caps (with #define) while hw
  shaders code isn't merged
- when we have a special debug channel for shader, use it ;)
- fix again some stubs return value
- more more readable traces now (principaly IDirect3D8 capacities
  check and surface locking code) using new debug functions
- fix/cleaning the surface locking code
- now we support D3DTOP_SUBSTRACT so declare it in caps
- now support true 32bit (well X 24 bit can be used as 32 bit in caps
  code)
- first try to get D3DTSS_TCI_CAMERASPACENORMAL and
  D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR look good
- native support 32 bit support (now application can choose 16 or 32
  bit support) if current resolution is 24 bit (as we can only launch
  games in windowed mode)
- textures palettes support
- fix reflexion placement code (the sdk sample begin to work)
- fix a stupid crash when using traces in vshaderdeclaration
- more more readable traces (init/caps)
- more cubetextures fixes
2003-05-17 18:33:02 +00:00
Jason Edmeades ae004ab312 Implement texture transform flags the best we can for now. 2003-05-16 20:11:14 +00:00
Jason Edmeades c71eba90fe Fixed range checking on the number of lights.
Silence the fixmes.
2003-05-16 00:04:07 +00:00
Jason Edmeades 575dbfa769 Supply the correct box on the screen to be processed during the clear
call, using opengl coordinates, not directx coordinates.
2003-05-15 23:14:33 +00:00
Jason Edmeades f8f7cdf0e8 Solved the transparency problem seen in the ClipMirror SDK sample
properly. Also a few tabs->spaces to correct formatting.
2003-05-15 22:56:10 +00:00
Raphael Junqueira 3385990368 - declare a new debug chanel for vertex shaders
- some useful debug functions for textures format
- correct DrawPrimitive (RHW correctness and vshader RHW)
- more copyrects fixes (only two unimplemented behavior remain)
- fix GetFrontBuffer to get screenshots samples working
- add D3DCOLORTOGLFLOAT4 and use it
- first try of D3DRS_FOGTABLEMODE support
2003-05-14 19:33:35 +00:00
Jason Edmeades ec2f96151f Make sure the viewport is from the GL (bottom left) not the DirectX
(top left).
2003-05-14 00:00:12 +00:00
Jason Edmeades fe30ce3444 Properly support texture coordinate indexes. 2003-05-13 23:51:58 +00:00
Jason Edmeades 9c34f04e1e CopyRects needs to lock the area it is copying to (esp. if that area
is the back buffer, as locking/unlocking causes glread/draw pixels).
2003-05-13 23:39:53 +00:00
Raphael Junqueira eb36d31d6f - surface pool init fixes
- minor indentation and traces fixes
- fix locking/unlocking/dirty behavior (dirtify on lock) +
  optimisations (only copy when dirty)
- fix IDirect3DDevice8::Clear behavior (problem seen after a
  locking/unlocking code error)
- begin to fix volume and cube textures management
2003-05-12 03:10:27 +00:00
Raphael Junqueira 89ec35fe43 - minor COM fixes (fixes some crashes on stupid games)
- minor indentation changes
- fix SELECTARG2 behavior (with help from Lionel Ulmer)
- surface locking/unlocking (only rendering and textures surfaces
  supported now)
- beginning of Target/Front surface support
- try to get D3DTOP_SELECTARG_* working
- implemented D3DTOP_SUBTRACT: currently only if OpenGL1.3 is used, we
  have to use GL_SUBTRACT_ARB for other versions
2003-05-11 03:35:27 +00:00
Raphael Junqueira 18af8d8611 - Disable some 'classic' debug traces (avoid useless flood of traces
while debugging games).
- Fix the texture size caps using GL_MAX_TEXTURE_SIZE.
2003-05-08 17:36:00 +00:00
Jason Edmeades 8534f79124 - Move texture loading into PreLoad for 2D textures (needs doing for
the others as well), and call when needed as well.
- Change D3DFMT_R5G6B5 handling to make backdrop of Max Payne appear.
- Add code to reject attempts to use invalid texture units (Max Payne
  did this a lot).
- ValidateDevice fixme silenced as harmless but occurs frequently.
- Add trace which can be compiled in to debug vertex shaders, and
  correct fixmes and dprintf's into appropriate trace statements.
- Ensure we trace what we return when querying the device caps.
- Correct bug with negative numbers in vertex shader code.
2003-05-08 03:49:04 +00:00