Make register_int call register_uniform_int, now that we require GLSL 1.30.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 21 Dec 2015 12:46:23 +0000 (13:46 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 21 Dec 2015 12:46:23 +0000 (13:46 +0100)
effect.cpp
effect.h

index 9a30b93..3446b42 100644 (file)
@@ -61,6 +61,7 @@ void Effect::register_int(const string &key, int *value)
 {
        assert(params_int.count(key) == 0);
        params_int[key] = value;
+       register_uniform_int(key, value);
 }
 
 void Effect::register_float(const string &key, float *value)
index fe76a75..67e6423 100644 (file)
--- a/effect.h
+++ b/effect.h
@@ -316,11 +316,8 @@ protected:
        //
        // Neither of these take ownership of the pointer.
 
-       // int is special since GLSL pre-1.30 doesn't have integer uniforms.
-       // Thus, ints that you register will _not_ be converted to GLSL uniforms.
+       // These correspond directly to int/float/vec2/vec3/vec4 in GLSL.
        void register_int(const std::string &key, int *value);
-
-       // These correspond directly to float/vec2/vec3/vec4 in GLSL.
        void register_float(const std::string &key, float *value);
        void register_vec2(const std::string &key, float *values);
        void register_vec3(const std::string &key, float *values);