Even if SGIS_generate_mipmap isn't. The latter functionality has been
removed from modern OpenGL.
#include <msp/datafile/builtinsource.h>
#include <msp/fs/utils.h>
-#include <msp/gl/extensions/sgis_generate_mipmap.h>
#include "animation.h"
#include "armature.h"
#include "font.h"
void init_shaderlib(DataFile::BuiltinSource &);
Resources::Resources():
- default_tex_filter(SGIS_generate_mipmap ? LINEAR_MIPMAP_LINEAR : LINEAR),
+ default_tex_filter(Texture::can_generate_mipmap() ? LINEAR_MIPMAP_LINEAR : LINEAR),
srgb_conversion(false),
resource_manager(0)
{
update_parameter(WRAP_R);
}
+bool Texture::can_generate_mipmap()
+{
+ return (EXT_framebuffer_object || SGIS_generate_mipmap);
+}
+
void Texture::set_generate_mipmap(bool gm)
{
if(gm && !EXT_framebuffer_object)
void set_wrap_t(TextureWrap);
void set_wrap_r(TextureWrap);
+ static bool can_generate_mipmap();
+
/** Sets automatic mipmap generation. If enabled, mipmaps are generated
when a texture image is uploaded. */
void set_generate_mipmap(bool);