if(mask&MAG_FILTER)
glTexParameteri(target, GL_TEXTURE_MAG_FILTER, mag_filter);
if(mask&MAX_ANISOTROPY)
- glTexParameteri(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, max_anisotropy);
+ glTexParameterf(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, max_anisotropy);
if(mask&WRAP_S)
glTexParameteri(target, GL_TEXTURE_WRAP_S, wrap_s);
if(mask&WRAP_T)
void Texture::set_generate_mipmap(bool gm)
{
- if(gm)
+ if(gm && !EXT_framebuffer_object)
static Require _req(SGIS_generate_mipmap);
gen_mipmap = gm;
- if(get_gl_api()!=OPENGL_ES2)
+ if(!EXT_framebuffer_object)
update_parameter(GENERATE_MIPMAP);
}
void Texture::auto_generate_mipmap()
{
- if(get_gl_api()==OPENGL_ES2)
- {
- // glGenerateMipmap is defined here
- static Require _req(EXT_framebuffer_object);
+ // glGenerateMipmap is defined here
+ if(EXT_framebuffer_object)
glGenerateMipmap(target);
- }
}
void Texture::set_compare_enabled(bool c)