]> git.tdb.fi Git - libs/gl.git/blobdiff - source/material.h
Give materials the capability to automatically create a suitable shader
[libs/gl.git] / source / material.h
index df55a56767c6318ad9f6f3effed314520604fcd7..3e9765d2a2b9cbfa7d408a37642ca12577fa9ed1 100644 (file)
@@ -82,6 +82,11 @@ protected:
 public:
        virtual ~Material() { }
 
+       virtual Program *create_compatible_shader() const;
+       virtual const Program *create_compatible_shader(DataFile::Collection &) const;
+protected:
+       virtual std::string create_program_source() const = 0;
+
 public:
        /** Returns the uniforms for the material. */
        const ProgramData &get_shader_data() const { return shdata; }