X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=util.cpp;h=8dcf219b3ee6be7cd8592f26268eefb33bae3fcb;hb=24660d2111d0ee97228016a7072304ff657d297b;hp=2176786978544994fcb733a4a2bea5f6fb9f77f5;hpb=758f632c42befae7f2b7af137554429fa544d4cb;p=movit diff --git a/util.cpp b/util.cpp index 2176786..8dcf219 100644 --- a/util.cpp +++ b/util.cpp @@ -1,13 +1,9 @@ -#define GL_GLEXT_PROTOTYPES 1 - #include #include -#include -#include - #include #include "util.h" +#include "opengl.h" 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); } -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 GLint length[] = { shader_src.size() }; + const GLint length[] = { (GLint)shader_src.size() }; glShaderSource(obj, 1, source, length); glCompileShader(obj);