25 #ifndef __glfShaderProgram_hh__
26 #define __glfShaderProgram_hh__
28 #include <Base/Math/Vector.hh>
29 #include <Base/Math/Matrix.hh>
30 #include "glfShader.hh"
31 #include "glfMatrix.hh"
54 void AttachShader(
const glfShader& shader);
62 void AttachShaderFromSource(GLenum type,
const std::string& sourceCode);
71 void AttachShaderFromFile(GLenum type,
const std::string& fileName);
86 std::string GetInfoLog()
const;
94 void SetUniform(
const std::string& varName,
float value);
95 void SetUniform(
const std::string& varName,
double value);
96 void SetUniform(
const std::string& varName,
int value);
97 void SetUniform(
const std::string& varName,
bool value);
98 void SetUniform(
const std::string& varName,
int count,
int *value);
99 void SetUniform(
const std::string& varName,
int count,
float *value);
105 void SetUniform(
const std::string& varName,
const glfMatrix& m);
109 void AutoSetSamplerUniforms();
113 #ifdef GL_VERSION_3_0
119 void BindAttribLocation(GLuint indexSlot,
const std::string& VertexAttributeName);
127 static int GetMaxCombinedTextureUnits();
130 GLint GetUniformLocation(
const std::string& varName);
133 bool IsSamplerType_(GLenum type);
134 GLint GetUniformLocation_(
const std::string& varName);
149 std::vector<glfShader*> shaders_attached_from_source_;
150 std::vector<GLuint> shaders_attached_as_object_;
156 #endif // __glfShaderProgram_hh__
A shader program composed of several shaders.
A GLSL vertex shader or fragment shader, which must be linked in a shader program.
matrix class with arbitrary size, indexing is row major.
A 4x4 matrix in native OpenGL format.