]> git.tdb.fi Git - libs/gl.git/blobdiff - source/shader.h
Drop Id tags and copyright notices from files
[libs/gl.git] / source / shader.h
index 4e02b08464ffbb2dbd00ef24806c7311a7d6c8d5..c1fd6b2294a47c57c38b62ce9aa41241c19bc9c6 100644 (file)
@@ -1,43 +1,39 @@
-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef MSP_GL_SHADER_H_
 #define MSP_GL_SHADER_H_
 
 #include <string>
-#include <GL/gl.h>
-#include "types.h"
+#include "gl.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);
-       bool compile();
-       uint get_id() const { return id; }
-       bool get_compiled() const { return compiled; }
-       int get_param(GLenum param) const;
+       void compile();
+       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