unit TextureLODBias;

interface

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

procedure SetTextureLOD(lod: single);

implementation

var
  GL_EXT_texture_lod_bias_loaded: boolean = false;

procedure SetTextureLOD;
begin
  if not GL_EXT_texture_lod_bias_loaded then
  begin
    if not glext_ExtensionSupported('GL_EXT_texture_lod_bias') then
         raise Exception.Create('GL_EXT_texture_lod_bias required!');
    GL_EXT_texture_lod_bias_loaded := true;
  end;
  glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, lod);
end;

end.
