+
+ if(mask&MIN_FILTER)
+ set_parameter_i(GL_TEXTURE_MIN_FILTER, min_filter);
+ if(mask&MAG_FILTER)
+ set_parameter_i(GL_TEXTURE_MAG_FILTER, mag_filter);
+ if(mask&MAX_ANISOTROPY)
+ set_parameter_f(GL_TEXTURE_MAX_ANISOTROPY_EXT, max_anisotropy);
+ if(mask&WRAP_S)
+ set_parameter_i(GL_TEXTURE_WRAP_S, wrap_s);
+ if(mask&WRAP_T)
+ set_parameter_i(GL_TEXTURE_WRAP_T, wrap_t);
+ if(mask&WRAP_R)
+ set_parameter_i(GL_TEXTURE_WRAP_R, wrap_r);
+ if(mask&GENERATE_MIPMAP)
+ set_parameter_i(GL_GENERATE_MIPMAP, gen_mipmap);
+ if(mask&COMPARE)
+ set_parameter_i(GL_TEXTURE_COMPARE_MODE, (compare ? GL_COMPARE_R_TO_TEXTURE : GL_NONE));
+ if(mask&COMPARE_FUNC)
+ set_parameter_i(GL_TEXTURE_COMPARE_FUNC, cmp_func);
+}
+
+void Texture::set_parameter_i(GLenum param, int value) const
+{
+ if(ARB_direct_state_access)
+ glTextureParameteri(id, param, value);