Commit Graph

78 Commits

Author SHA1 Message Date
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
Jason Edmeades 02f3df3988 Windows never reports 24 bit colours, and some games fail to work
unless in specific modes. Report 16bit colour for 24bit modes.
2003-04-20 02:43:05 +00:00
Jason Edmeades 5abc0654b5 Correct device capabilites including support in previous patch, as
well as making the texture operations capabilities more accurate.
2003-04-19 20:33:23 +00:00
Jason Edmeades 55e85807f8 Add DotProduct3 support if supported by opengl. 2003-04-19 20:30:58 +00:00
Jason Edmeades 2a7f46d0b4 Make codesampler texture addressing mode sample work better.
Add mirrorsupport (if opengl 1.3) and make clamp and border appear
more similar to Windows.
2003-04-19 20:08:14 +00:00
Christian Costa 7f1250e5cf Handle creation of a depth/stencil buffer when creating a device.
Implement IDirect3D8DeviceImpl_GetDepthStencilBuffer.
2003-04-17 02:16:07 +00:00
Christian Costa 074d293c85 Increase MaxStreams to 2 in CAPS. 2003-04-13 01:03:05 +00:00
Alexandre Julliard 31e78f479e Header files must not include config.h. 2003-04-12 00:06:42 +00:00
Rok Mandeljc c895fc9d04 Added version info. 2003-04-03 23:55:27 +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
Jason Edmeades 043680c140 Correct some capabilities, and default others to fully supported for
now.
2003-02-01 00:35:36 +00:00
Raphael Junqueira 92155f158f - Defer of IDirect3DVertexShader_SetConstant, waiting for
DrawPrimitive call.
- Beginning of VertexShader constants support into stateblock (only
  stored, not captured yet).
- Fix compiation with nivdia GL/gl.h and mesa Gl/glext headers as
  reported by Andrew John Hughes.
- One glActiveTexture/glActiveTextureARB missing.
2003-01-30 00:18:27 +00:00
Raphael Junqueira 4b0297d894 Some needed cleanups for future dx9 and d3d common layer support:
- stateblocks to IDirect3DStateBlockImpl interface and moving into
    a new file (stateblock.c)
  - shaders to IDirect3D*ShaderImpl interfaces
  - splitting vshader and vshader declaration as in dx9 into 2
    interfaces (for future common layer use)
  - vshader declaration code to a new file (vsaderdeclaration.c)
  - device calls to new interfaces (redirect stubs)
Simple texture fix for a little regression after last Jason's patches.
Some caps code using the GL/glext.h defines (GL_VERSION_*).
2003-01-28 01:12:23 +00:00
Jason Edmeades aaa68a32f7 Add support for color material sources, with help from Lucho. 2003-01-24 00:48:10 +00:00
Jason Edmeades 5840a1bffc Use device max lights and clipplane support. Also change clipplane to
be affected by view matrix.
2003-01-23 22:38:51 +00:00
Alexandre Julliard f8aa3b506c Added -Wpointer-arith gcc flag, and fixed the resulting warnings. 2003-01-23 21:32:35 +00:00
Jason Edmeades b4a3f1dc68 Ensure using correct args during complement texture operations. 2003-01-21 00:41:32 +00:00
Jason Edmeades ffd4fd517e Restore the texture env mode on SetTexture - Fixes problem in
codesampler demo.
2003-01-21 00:30:27 +00:00
Jason Edmeades f5885defc9 Only reload the mipmap images when dirty. 2003-01-20 23:23:41 +00:00
Raphael Junqueira 9e43683316 - beginning of vertex matrix blending using extensions (currently
alpha alpha stage as i haven't understand needed extension behavior)
- modify SetRenderState for matrix blending specific params
- by default diffuse color is white ;)
- comments most of the traces (else flood ...)
- add more urls in comments
- indent, cleanups
2003-01-14 23:12:37 +00:00
Raphael Junqueira 72fb7acf8d Beginning of more COM compliant behavior:
- AddRef/Release where needed
- use IUnknown* instead void*
- fix many GetDevice using AddRef
- fix IDirect3DSurface8Impl_GetContainer using QueryInterface
2003-01-14 23:05:39 +00:00
Jason Edmeades 7472d72e03 Copyrect should flag destination texture as dirty, to force it to be
reloaded.
2003-01-14 22:53:50 +00:00
Jason Edmeades bcb05fd43e Add support for some of the texture address states and border colour. 2003-01-14 22:50:00 +00:00
Raphael Junqueira 6b03dd5c85 - move input and output data in VertexShader struct
- better traces
- specific input data filling function for vertex shaders using vertex
  shader declaration (and not FVF ... maybe FVF will return for fast
  path with simples vertex shader declarations)
- huge vertex shader fixes:
  - add and fix many vs (1.0->2.0) used opcodes in complex shaders
  - improvements to programs parser: parse comments, version, ..
  - add a vertex shader input filler function (parsing vertex shader
    declaration): almost complete
- comments most of the traces (else flood ...)
- add more urls in comments
- indent, cleanups
2003-01-14 20:29:33 +00:00
Jason Edmeades cf5c35bc81 Calculate starting position for a copyrect correctly. 2003-01-09 06:02:39 +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
Dimitrie O. Paun 297f3d898d Define NONAMELESS{STRUCT,UNION} explicitly in the files that need them. 2003-01-07 20:36:20 +00:00