H. Verbeet : wined3d: Add support for native NPOT textures.

Frank Richter frank.richter at gmail.com
Wed Sep 27 08:38:18 CDT 2006


On 27.09.2006 10:46, Alexandre Julliard wrote:
> @@ -765,6 +768,12 @@ #undef USE_GL_FUNC
>  
>      gl_info->max_sampler_stages = max(gl_info->max_samplers, gl_info->max_texture_stages);
>  
> +    /* We can only use NP2_NATIVE when the hardware supports it. */
> +    if (wined3d_settings.nonpower2_mode == NP2_NATIVE && !gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO]) {
> +        WARN_(d3d_caps)("GL_ARB_texture_non_power_of_two not supported, falling back to NP2_NONE NPOT mode.\n");
> +        wined3d_settings.nonpower2_mode = NP2_NONE;
> +    }
> +

FYI, ATI r300+ hardware has some limited support for NP2 textures - that
is, 2D textures without mipmaps and repeat mode CLAMP. But since that
does not fulfill the ARB_tnpot requirements this extension isn't
published. Still, maybe you can exploit that feature somehow...

-f.r.



More information about the wine-devel mailing list