]> git.tdb.fi Git - libs/gl.git/blobdiff - source/resources.cpp
Add some accessors to View
[libs/gl.git] / source / resources.cpp
index 2fd6950370df6580fe08cdf54139bef9b6d50316..61d05c9b3d831867e8b36af2f1f8cb70bb916c58 100644 (file)
@@ -1,4 +1,5 @@
 #include <msp/fs/utils.h>
+#include <msp/gl/extensions/sgis_generate_mipmap.h>
 #include "animation.h"
 #include "armature.h"
 #include "font.h"
@@ -20,7 +21,7 @@ namespace Msp {
 namespace GL {
 
 Resources::Resources():
-       default_tex_filter(LINEAR_MIPMAP_LINEAR),
+       default_tex_filter(SGIS_generate_mipmap ? LINEAR_MIPMAP_LINEAR : LINEAR),
        srgb_conversion(false),
        resource_manager(0)
 {
@@ -92,7 +93,6 @@ Texture2D *Resources::create_texture2d(const string &name)
                        tex->set_mag_filter(default_tex_filter);
                tex->set_min_filter(default_tex_filter);
 
-               // TODO Somehow pass the srgb flag if a resource manager is in use
                if(resource_manager)
                        resource_manager->set_resource_location(*tex, *this, name);
                else