]> git.sesse.net Git - movit/blobdiff - util.cpp
Make the blur use the resize functionality, which also unbreaks the in-between sampli...
[movit] / util.cpp
index 2176786978544994fcb733a4a2bea5f6fb9f77f5..8dcf219b3ee6be7cd8592f26268eefb33bae3fcb 100644 (file)
--- a/util.cpp
+++ b/util.cpp
@@ -1,13 +1,9 @@
-#define GL_GLEXT_PROTOTYPES 1
-
 #include <stdio.h>
 #include <assert.h>
 
 #include <stdio.h>
 #include <assert.h>
 
-#include <GL/gl.h>
-#include <GL/glext.h>
-
 #include <math.h>
 #include "util.h"
 #include <math.h>
 #include "util.h"
+#include "opengl.h"
 
 void hsv2rgb(float h, float s, float v, float *r, float *g, float *b)
 {
 
 void hsv2rgb(float h, float s, float v, float *r, float *g, float *b)
 {
@@ -65,11 +61,11 @@ std::string read_file(const std::string &filename)
        return std::string(buf, len);
 }
 
        return std::string(buf, len);
 }
 
-GLhandleARB compile_shader(const std::string &shader_src, GLenum type)
+GLuint compile_shader(const std::string &shader_src, GLenum type)
 {
 {
-       GLhandleARB obj = glCreateShaderObjectARB(type);
+       GLuint obj = glCreateShader(type);
        const GLchar* source[] = { shader_src.data() };
        const GLchar* source[] = { shader_src.data() };
-       const GLint length[] = { shader_src.size() };
+       const GLint length[] = { (GLint)shader_src.size() };
        glShaderSource(obj, 1, source, length);
        glCompileShader(obj);
 
        glShaderSource(obj, 1, source, length);
        glCompileShader(obj);