wined3d: Use GL_ARB_texture_non_power_of_two emulation.
commitc088edeae7fed4645fa3f34fb5bacc1eeaa87706
authorStefan Dösinger <stefan@codeweavers.com>
Tue, 8 Jul 2008 23:59:10 +0000 (8 18:59 -0500)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 18 Jul 2008 09:41:09 +0000 (18 11:41 +0200)
treed9c3da23d0bb25e892362567aa0793e83b6b8dc6
parenta0cc79f0bf6f0b2617ea58e591646679af156f6a
wined3d: Use GL_ARB_texture_non_power_of_two emulation.

ATI cards prior to the radeon HD series did not have unconditional non
power of two support. So far we've used texture_rectangle for that, or
created a bigger power of two texture with padding. This had the
disadvantage that we had to correct the coordinates, which causes
extreme problems with shaders(doesn't work, pretty much).

Both the MacOS and the fglrx driver have support for
GL_ARB_texture_non_power_of_two, and run it on the hardware as long as
we stay within the texture_rectangle limitations. This allows us to
have conditional non power of two textures with normalized
coordinates. This patch adds an internal extension, and the code
creates a regular GL_TEXTURE_2D texture with NP2 size, but refuses
mipmapping, filtering and texture_rectangle incompatible
operations. This makes np2 textures work with shaders on fglrx and
macos.
dlls/wined3d/basetexture.c
dlls/wined3d/cubetexture.c
dlls/wined3d/device.c
dlls/wined3d/directx.c
dlls/wined3d/state.c
dlls/wined3d/surface.c
dlls/wined3d/texture.c
dlls/wined3d/volumetexture.c
dlls/wined3d/wined3d_private.h
include/wine/wined3d_gl.h
include/wine/wined3d_interface.h