92 template<
typename... Args >
159 GLuint geometryOutputType );
179 void SetParameter(
int aParameterNumber,
float aValue )
const;
180 void SetParameter(
int aParameterNumber,
int aValue )
const;
182 void SetParameter(
int aParameterNumber,
float f0,
float f1,
float f2,
float f3 )
const;
190 int GetAttribute(
const std::string& aAttributeName )
const;
198 static std::string
ReadSource(
const std::string& aShaderSourceName );
bool IsLinked() const
Return true if shaders are linked correctly.
bool LoadShaderFromStrings(SHADER_TYPE aShaderType, Args &&... aArgs)
Add a shader and compile the shader sources.
SHADER_TYPE
Type definition for the shader.
The Cairo implementation of the graphics abstraction layer.
int GetAttribute(const std::string &aAttributeName) const
Get an attribute location.
GLuint geomInputType
Output type [e.g. GL_LINES, GL_TRIANGLES, GL_QUADS etc.].
void Use()
Use the shader.
void SetParameter(int aParameterNumber, float aValue) const
Set a parameter of the shader.
bool IsActive() const
Return the current state of the shader.
bool Link()
Link the shaders.
void programInfo(GLuint aProgram)
Get the shader program information.
bool LoadShaderFromFile(SHADER_TYPE aShaderType, const std::string &aShaderSourceName)
Load one of the built-in shaders and compiles it.
bool isShaderLinked
Is the shader linked?
GLuint maximumVertices
The maximum of vertices to be generated.
std::deque< GLuint > shaderNumbers
Shader number list.
bool loadShaderFromStringArray(SHADER_TYPE aShaderType, const char **aArray, size_t aSize)
Compile vertex of fragment shader source code into the program.
int AddParameter(const std::string &aParameterName)
Add a parameter to the parameter queue.
void shaderInfo(GLuint aShader)
Get the shader information.
void Deactivate()
Deactivate the shader and use the default OpenGL program.
static std::string ReadSource(const std::string &aShaderSourceName)
Read the shader source file.
Provide the access to the OpenGL shaders.
bool isProgramCreated
Flag for program creation.
GLuint programNumber
Shader program number.
bool active
Is any of shaders used?
void ConfigureGeometryShader(GLuint maxVertices, GLuint geometryInputType, GLuint geometryOutputType)
Configure the geometry shader - has to be done before linking!
std::deque< GLint > parameterLocation
Location of the parameter.
const char * translateStringArg(const std::string &str)