]> git.sesse.net Git - movit/blobdiff - util.cpp
Do not send uninitialized memory as a texture.
[movit] / util.cpp
index 2176786978544994fcb733a4a2bea5f6fb9f77f5..70c9af2dc0d91be4951db50e90f9c6d79e77ba36 100644 (file)
--- a/util.cpp
+++ b/util.cpp
@@ -65,11 +65,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);