Commit Graph

91 Commits

Author SHA1 Message Date
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
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