X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=util.cpp;h=8dcf219b3ee6be7cd8592f26268eefb33bae3fcb;hp=2176786978544994fcb733a4a2bea5f6fb9f77f5;hb=3d1f6c11c53cd9d3d5c1fb60f4accf050b7f135e;hpb=758f632c42befae7f2b7af137554429fa544d4cb 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);