• Stefan Dösinger's avatar
    wined3d: Use GL_ARB_texture_non_power_of_two emulation. · c088edea
    Stefan Dösinger authored
    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.
    c088edea
state.c 289 KB