Commit Graph

104 Commits

Author SHA1 Message Date
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
Jason Edmeades 5ba50508ff Add support for MultiplyTransform (helps make the SkimmedMesh SDK
sample look better).
2003-05-06 00:19:11 +00:00
Jason Edmeades cb677f6388 Add the beginnings of support for texture coordinates. 2003-05-06 00:15:49 +00:00
Christian Costa 6dca3ecc45 Reserve space for 16 streams in the stateblock. 2003-04-29 22:44:18 +00:00
Alexandre Julliard 69361e08b9 Moved x11drv.h to dlls/x11drv. 2003-04-22 04:05:08 +00:00
Jason Edmeades e0d2fb6779 Only reapply the world, view or projection transform changes if we
really have to.
2003-04-21 23:53:03 +00:00
Jason Edmeades 9fdc759b90 MIRROR_ARB support is not dependent on OpenGL 1.3 as I originally
ifdef'ed. It is apparently introduced fully in 1.4, or dependent on
another ifdef, GL_ARB_texture_mirrored_repeat.
2003-04-21 23:29:39 +00:00
Jason Edmeades b830439bf5 Don't reapply all the texture states if the texture we are replacing
is the same as the texture there already and the texture is not
'dirty'.
2003-04-21 23:20:51 +00:00
Jason Edmeades cab99dbcaf Silence index buffer lock + offset fixme to a trace because the
behaviour under that scenario works.
2003-04-21 22:38:14 +00:00
Jason Edmeades 53391ac33f DOT3 isn't there on earlier opengl versions. 2003-04-21 22:37:48 +00:00
Jason Edmeades 4df43cc263 When a game requests fullscreen, make its window the dimensions
requested. Ideally this should be followed by making the screen that
resolution, but this suffices for now.
2003-04-20 02:47:22 +00:00