On nVidia cards the value of GL_MAX_TEXTURE_UNITS is generally not
larger than 4. In Direct3D that would correspond to
MaxSimultaneousTextures in the caps, rather than MaxTextureBlendStages
(which can be much larger) to which it currently corresponds in
wined3d. Using register combiners we can get around that limitation
and get up to GL_MAX_GENERAL_COMBINERS_NV (typically 8) texture
stages. This patch adds code for doing the texture operations with
register combiners instead of ARB_texture_env_combine or
NV_texture_env_combine4, but doesn't make use of that code yet. That's
what the next patch will do.
Implement some basic opengl accelerated blts from and to render
targets. It's not perfect yet, but enought to make some D3D apps
happy. For now the only supported operations are:
- Full screen back -> Front buffer: Just call present
- Offscreen surface -> render target
- Render target -> offscreen surface(slow)
- render target colorfill
- add missing GL type and make GL cfg entries for A16B16G16R16
- correct L16 type to UNSIGNED_SHORT (..16 = short, not byte)
- change internal format for X8R8G8B8 from GL_RGB to GL_RGB8 which
seems more correct
Screwed up a copy/paste from one of my recent patches. This
eliminates the erroneous FIXME for calls to D3DFmtMakeGlCfg() with 0
as the Stencil format. Also, it changes the FIXME to print the
correct variable.
Map:
D3DFMT_L16 -> GL_LUMINANCE16_EXT
D3DFMT_A16B16G16R16 -> GL_RGBA16_EXT
as Raphael suggested.
Also increase the returned Bpp for unknown and unhandled formats from
4 to 8 bytes - this part fixes segfault in the F.E.A.R demo. It now
shows some flashy graphics before it dies again :)
- Move some of the screen mode related functions into wined3d and add
untested support for the new d3d9 options of providing the format to
some of the calls.
- Move other functions from the directx interface into the common
library and implement the calls from d3d9 as well.
- Copy across the first of the functions used to make traces more readable,
creating utils.c to store them in. Eventually the ones in d3d8 will be
removed but for now just duplicate the code.