71 #define C_VB_INDEX_BUFFER 0
72 #define C_VB_POSITION 1
74 #define C_VB_TEXCOORD 3
76 #define C_VB_TANGENT 5
77 #define C_VB_BITANGENT 6
cShaderType m_type
Shader type (C_VERTEX_SHADER or C_FRAGMENT_SHADER).
Definition: CShader.h:172
std::string m_source
The shader source code (i.e. the GLSL code itself).
Definition: CShader.h:178
std::shared_ptr< cShader > cShaderPtr
Definition: CShader.h:89
std::string getLog() const
This method returns the log file generated from compilation.
Definition: CShader.h:146
Implements mathematical constants.
Implements option settings for CHAI3D.
std::string m_log
Log message following compilation.
Definition: CShader.h:181
This class implements a shader primitive.
Definition: CShader.h:106
Implements utility functions for manipulating strings.
GLuint getId() const
This method returns the shader OpenGL ID.
Definition: CShader.h:149
bool m_compiled
If true then shader was compiled successfully, false otherwise.
Definition: CShader.h:184
static bool hasOpenGLShaders(cShaderType a_type)
This method returns true if shaders are supported on this computer, false otherwise.
bool compile()
This method compiles a shader and display any problems if compilation fails.
Definition: CShader.cpp:157
static cShaderPtr create(cShaderType a_type)
Shared cShader allocator.
Definition: CShader.h:121
bool loadSourceFile(const std::string &a_fileName)
This method loads the shader content from a file.
Definition: CShader.cpp:123
virtual ~cShader()
Destructor of cShader.
Definition: CShader.h:118
Definition: CAudioBuffer.cpp:56
cShaderType
Definition: CShader.h:81
bool isCompiled() const
This method returns true if shader has been compiled successfully, false otherwise.
Definition: CShader.h:143
std::string getSource()
This method returns the source code of the shader.
Definition: CShader.h:152
GLuint m_id
Handle ID for the shader.
Definition: CShader.h:175
bool loadSourceCode(const char *a_source)
This method loads the shader content from a char array.
Definition: CShader.cpp:88
cShader(cShaderType a_type)
Constructor of cShader.
Definition: CShader.cpp:68