]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture.h
Support linear to sRGB conversion when loading materials and textures
[libs/gl.git] / source / texture.h
index c091c884cacfd592833120b785c7f83ff2fe303e..477eaca382fa55dbe6ab1925fb62677db1ed72c1 100644 (file)
@@ -8,6 +8,8 @@
 namespace Msp {
 namespace GL {
 
+class Resources;
+
 enum TextureFilter
 {
        /// No filtering
@@ -66,11 +68,17 @@ wrapping is applied.  The default for all directions is REPEAT.
 class Texture
 {
 protected:
-       class Loader: public DataFile::ObjectLoader<Texture>
+       class Loader: public DataFile::CollectionObjectLoader<Texture>
        {
+       protected:
+               bool srgb;
+
        public:
                Loader(Texture &);
+               Loader(Texture &, Collection &);
        private:
+               void init();
+
                void filter(TextureFilter);
                void generate_mipmap(bool);
                void mag_filter(TextureFilter);