unit AnisotropicFilter;

interface

uses Windows, SysUtils, GL, GLu, GLext, WGLext, GLtools, Textures;

procedure TextureAnisotropy(tex: TTexture; max: GLfloat);

implementation

var
  GL_EXT_texture_filter_anisotropic_loaded: boolean = false;

procedure TextureAnisotropy;
begin
  if not GL_EXT_texture_filter_anisotropic_loaded then
  begin
    if not glext_ExtensionSupported('GL_EXT_texture_filter_anisotropic') then
      raise Exception.Create('GL_EXT_texture_filter_anisotropic required!');
    GL_EXT_texture_filter_anisotropic_loaded := true;
  end;
  tex.Parameterf(GL_TEXTURE_MAX_ANISOTROPY_EXT, max);
end;

end.
