+ set_parameter_i(GL_TEXTURE_COMPARE_FUNC, cmp_func);
+ if(mask&FORMAT_SWIZZLE)
+ {
+ if(get_gl_api()==OPENGL_ES2)
+ {
+ set_parameter_i(GL_TEXTURE_SWIZZLE_R, swizzle_orders[swizzle*4]);
+ set_parameter_i(GL_TEXTURE_SWIZZLE_G, swizzle_orders[swizzle*4+1]);
+ set_parameter_i(GL_TEXTURE_SWIZZLE_B, swizzle_orders[swizzle*4+2]);
+ set_parameter_i(GL_TEXTURE_SWIZZLE_A, swizzle_orders[swizzle*4+3]);
+ }
+ else
+ {
+ if(ARB_direct_state_access)
+ glTextureParameteriv(id, GL_TEXTURE_SWIZZLE_RGBA, swizzle_orders+swizzle*4);
+ else
+ glTexParameteriv(target, GL_TEXTURE_SWIZZLE_RGBA, swizzle_orders+swizzle*4);
+ }
+ }
+}
+
+void Texture::set_parameter_i(GLenum param, int value) const
+{
+ if(ARB_direct_state_access)
+ glTextureParameteri(id, param, value);
+ else
+ glTexParameteri(target, param, value);
+}
+
+void Texture::set_parameter_f(GLenum param, float value) const
+{
+ if(ARB_direct_state_access)
+ glTextureParameterf(id, param, value);
+ else
+ glTexParameterf(target, param, value);