Commit Graph

114 Commits

Author SHA1 Message Date
Alexandre Julliard d09b2b988a Warning fix. 2003-07-15 20:52:21 +00:00
Raphael Junqueira d5ca917a36 - some cosmetic fixes
- fix a bug on IDirect3DVolume8Impl_AddDirtyBox
2003-07-08 21:01:48 +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
Jason Edmeades 9a9fcd1ad4 Ensure MIPMAP levels is reset when rebinding an existing texture to a
texture unit.
2003-07-02 00:38:01 +00:00
Jason Edmeades 39538a5a9c Add GetLevelCount to the basetexture class. 2003-07-02 00:37:40 +00:00
Jason Edmeades 86cb1cec75 Ensure pixel coordinates point to the bottom left of the pixel not the
middle.
2003-07-02 00:36:59 +00:00
Dmitry Timoshkov 4e1ef0c114 For all DLLs with defined DllMain and which do not require
DLL_THREAD_ATTACH/DLL_THREAD_DETACH notifications, call
DisableThreadLibraryCalls() in order to slightly improve performance
on thread creation/exiting.
2003-06-30 20:53:48 +00:00
Raphael Junqueira dcddfbc140 - currently always use sloaw path as fast path have some problems
- fix APIENTRY mismatched value used by gl func pointers (in
  d3dcore_gl.h)
2003-06-27 22:20:44 +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
Raphael Junqueira bf2121a312 Fix AddDirtyRect uncorrect behavior (crash in some cases). Based on a
patch from Roderick Colenbrander.
2003-06-16 20:20:25 +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 5593a08334 When emulating fullscreen it helps to not allocate space for menu bars
and borders. Make this window a popup window.
2003-06-13 18:53:06 +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
Jason Edmeades bca452eea6 Fix the glRead call when pRect != NULL, resolve the file format of the
saved snapshot correctly.
2003-06-04 22:51:14 +00:00
Raphael Junqueira 8bde56dad0 - fix another time the stupid locking bug (i had already fixed it in
ActiveRender)
- fix stupid rescaling of colors values on SaveSnapshot
2003-06-04 22:47:53 +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
Jason Edmeades 84cd1925fe Opengl 1.4 added stencil wrap support as per directx (also in the
GL_EXT_stencil_wrap extension).
2003-06-04 22:01:05 +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 ef104680ed Fix compilation error reported by Stefan Leichter when using old
openGL headers.
2003-05-15 04:16:47 +00:00
Jason Edmeades 1e9689e487 Previous viewport fix only works for full screen applications as we
didn't change the back buffer size information until after copying the
presentation parameters, so when setting up the viewport the
backbufferwidth/height was 0. Moved the copy until after it has been
corrected.
2003-05-15 04:16:16 +00:00
Raphael Junqueira c816f31416 - new debug channel for shaders code 'd3d_shader'
- more debugging traces
2003-05-14 19:34:00 +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
Raphael Junqueira 128fd3496a Declare that we can support cube textures now (currently only creation
is done).
2003-05-14 19:32:24 +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
Raphael Junqueira ad9121c4ad - moved loading code of volume texture to VolumeTexture::Preload as
done in Texture/CubeTexture
- fixed some stubs return values
2003-05-13 23:52:50 +00:00
Raphael Junqueira b3ee1f7460 - cubetexture loading/preloading
- some stubs must return 0 (and non D3D_OK)
- fix IDirect3DCubeTexture8Impl::Get* (potentials CD)
2003-05-13 23:52:23 +00:00
Jason Edmeades fe30ce3444 Properly support texture coordinate indexes. 2003-05-13 23:51:58 +00:00
Jason Edmeades 3a812c6435 Make sure we advertize our capabilites correctly. 2003-05-13 23:50:05 +00:00
Jason Edmeades 4c39042acd Initialize the tex coord index correctly. 2003-05-13 23:40:20 +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
Christian Costa 6e0703d11b Mark some surface formats as not supported. 2003-05-13 23:39:14 +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