]> git.tdb.fi Git - libs/gl.git/blobdiff - source/shader.h
Convert svn:ignore to .gitignore
[libs/gl.git] / source / shader.h
index cd01f2acda49a8c3374bc97c356263bccb653b91..9482c4ad3730b1c68e63494f433e1f604a487aca 100644 (file)
@@ -10,35 +10,37 @@ Distributed under the LGPL
 
 #include <string>
 #include "gl.h"
-#include "types.h"
 
 namespace Msp {
 namespace GL {
 
 enum ShaderType
 {
-       FRAGMENT_SHADER = GL_FRAGMENT_SHADER,
-       VERTEX_SHADER   = GL_VERTEX_SHADER
+       FRAGMENT_SHADER = GL_FRAGMENT_SHADER_ARB,
+       VERTEX_SHADER   = GL_VERTEX_SHADER_ARB
 };
 
 class Shader
 {
+private:
+       unsigned id;
+       bool compiled;
+
 public:
        Shader(ShaderType t);
        Shader(ShaderType t, const std::string &);
+private:
+       void init(ShaderType);
+public:
        ~Shader();
 
-       void source(sizei count, const char **str, const int *len);
+       void source(unsigned count, const char **str, const int *len);
        void source(const std::string &str);
        void source(const char *str, int len);
        void compile();
-       uint get_id() const { return id; }
-       bool get_compiled() const { return compiled; }
-       int get_param(GLenum param) const;
+       unsigned get_id() const { return id; }
+       bool is_compiled() const { return compiled; }
        std::string get_info_log() const;
-private:
-       uint id;
-       bool compiled;
 };
 
 } // namespace GL