]> git.tdb.fi Git - libs/gl.git/blobdiff - source/material.h
Support linear to sRGB conversion when loading materials and textures
[libs/gl.git] / source / material.h
index 5a71aa34bae2be1470016f1c9ef7a3848447503a..a38dddd6a8d5efe097882e44623a3f1f7474a118 100644 (file)
@@ -16,12 +16,18 @@ objects, application of material is done with several calls to glMaterial.
 class Material: public BindableWithDefault<Material>
 {
 public:
-       class Loader: public DataFile::ObjectLoader<Material>
+       class Loader: public DataFile::CollectionObjectLoader<Material>
        {
+       private:
+               bool srgb;
+
        public:
                Loader(Material &);
-
+               Loader(Material &, Collection &);
        private:
+               void init();
+
+               Color make_color(float, float, float, float);
                void ambient(float, float, float, float);
                void diffuse(float, float, float, float);
                void specular(float, float, float, float);