2#include <QOpenGLShaderProgram>
141 std::map<Uniform, TypeInfo> _uniforms;
147#include <xgl/ShaderProgram.hpp>
Shader program having a default vertex and fragment shader.
Definition ShaderProgram.h:13
ShaderProgram(QObject *parent=nullptr)
Constructs a new shader program and attaches it to parent. The program will be invalid until addShade...
const QOpenGLContext * context() const
Get the OpenGL context of the program.
Uniform
Enumeration of available shader uniforms. The names of the enumerates need to correspond with the nam...
Definition ShaderProgram.h:39
@ uProgram
Definition ShaderProgram.h:44
@ uProjectionMatrix
Definition ShaderProgram.h:54
@ uAmbientStrength
Definition ShaderProgram.h:66
@ uModelMatrix
Definition ShaderProgram.h:48
@ uPointSize
Definition ShaderProgram.h:46
@ uLightPosition
Definition ShaderProgram.h:56
@ uLightDirection
Definition ShaderProgram.h:58
@ uShininess
Definition ShaderProgram.h:72
@ uViewMatrix
Definition ShaderProgram.h:50
@ uOffsetMatrix
Definition ShaderProgram.h:52
@ uCutoff
Definition ShaderProgram.h:60
@ uTexture
Definition ShaderProgram.h:76
@ uOuterCutoff
Definition ShaderProgram.h:62
@ uDiffuseStrength
Definition ShaderProgram.h:68
@ uColor
Definition ShaderProgram.h:74
@ uSpecularStrength
Definition ShaderProgram.h:70
@ uLightColor
Definition ShaderProgram.h:64
bool link() override
Overridden from base class. Adds the shader sources to this instance.
Attribute
Enumeration of available shader attributes to map data in the object buffers. The names of the enumer...
Definition ShaderProgram.h:22
@ aNormal
Definition ShaderProgram.h:26
@ aColor
Definition ShaderProgram.h:28
@ aPosition
Definition ShaderProgram.h:24
int attributeLocation(Attribute sa) const
Gets layout input location of the given shader attribute.
void setUniform(Uniform su, const T &value)
Sets a uniform value by type.
void report(std::ostream &os) const
Writes information on the shader programs.
Definition DemoRenderer.h:6
#define _XGL_CLASS
Definition xgl/global.h:35