]> git.sesse.net Git - movit/blobdiff - flat_input.h
Merge branch 'master' into epoxy
[movit] / flat_input.h
index 2f636f0862f9ed6d8d2c8c94e4550913f2cb2ca7..8ac98ba64a3b0f1dce1968d39dafe0d0350860e0 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _MOVIT_FLAT_INPUT_H
 #define _MOVIT_FLAT_INPUT_H 1
 
-#include <GL/glew.h>
+#include <epoxy/gl.h>
 #include <assert.h>
 #include <string>
 
@@ -78,7 +78,15 @@ public:
                invalidate_pixel_data();
        }
 
-       void set_pixel_data(const fp16_int_t *pixel_data, GLuint pbo = 0)
+       void set_pixel_data(const unsigned short *pixel_data, GLuint pbo = 0)
+       {
+               assert(this->type == GL_UNSIGNED_SHORT);
+               this->pixel_data = pixel_data;
+               this->pbo = pbo;
+               invalidate_pixel_data();
+       }
+
+       void set_pixel_data_fp16(const fp16_int_t *pixel_data, GLuint pbo = 0)
        {
                assert(this->type == GL_HALF_FLOAT);
                this->pixel_data = pixel_data;