]> git.sesse.net Git - movit/blobdiff - effect.h
Change to using GLEW everywhere.
[movit] / effect.h
index 3a1fc9d9b4bd548defad4e96a0b9ace03dee08b6..235558f8e1c4cf9f480361f0f428916885b1e0e5 100644 (file)
--- a/effect.h
+++ b/effect.h
@@ -16,7 +16,9 @@
 
 #include <assert.h>
 
-#include "opengl.h"
+#include <Eigen/Core>
+
+#include <GL/glew.h>
 #include "util.h"
 
 class EffectChain;
@@ -45,7 +47,7 @@ void set_uniform_float(GLuint glsl_program_num, const std::string &prefix, const
 void set_uniform_vec2(GLuint glsl_program_num, const std::string &prefix, const std::string &key, const float *values);
 void set_uniform_vec3(GLuint glsl_program_num, const std::string &prefix, const std::string &key, const float *values);
 void set_uniform_vec4_array(GLuint glsl_program_num, const std::string &prefix, const std::string &key, const float *values, size_t num_values);
-void set_uniform_mat3(GLuint glsl_program_num, const std::string &prefix, const std::string &key, const Matrix3x3 matrix);
+void set_uniform_mat3(GLuint glsl_program_num, const std::string &prefix, const std::string &key, const Eigen::Matrix3d &matrix);
 
 class Effect {
 public:
@@ -177,10 +179,10 @@ public:
 
        // Set a parameter; intended to be called from user code.
        // Neither of these take ownership of the pointer.
-       virtual bool set_int(const std::string&, int value);
-       virtual bool set_float(const std::string &key, float value);
-       virtual bool set_vec2(const std::string &key, const float *values);
-       virtual bool set_vec3(const std::string &key, const float *values);
+       virtual bool set_int(const std::string&, int value) MUST_CHECK_RESULT;
+       virtual bool set_float(const std::string &key, float value) MUST_CHECK_RESULT;
+       virtual bool set_vec2(const std::string &key, const float *values) MUST_CHECK_RESULT;
+       virtual bool set_vec3(const std::string &key, const float *values) MUST_CHECK_RESULT;
 
 protected:
        // Register a parameter. Whenever set_*() is called with the same key,