8 #ifndef META_OCEAN_PLATFORM_GL_SHADER_PROGRAM_H
9 #define META_OCEAN_PLATFORM_GL_SHADER_PROGRAM_H
53 inline GLuint id()
const;
63 bool createProgram(
const std::string& vertexCode,
const std::string& fragmentCode, std::string* errorMessage =
nullptr);
77 bool setUniform(
const std::string& uniformName,
const int value);
85 bool setUniform(
const std::string& uniformName,
const float value);
129 explicit inline operator bool()
const;
141 bool createShader(
const std::string& code, GLuint& shaderId,
const GLenum shaderType, std::string* errorMessage =
nullptr);
158 programVertexShaderId(0u),
159 programFragmentShaderId(0u)
167 programVertexShaderId(0u),
168 programFragmentShaderId(0u)
178 inline ShaderProgram::operator bool()
const
180 ocean_assert(programId == 0u || (programVertexShaderId != 0u || programFragmentShaderId != 0u));
181 return programId != 0u;
This class implements the base class for all object which have an associated context.
Definition: ContextAssociated.h:31
This class encapsulates an OpenGL context.
Definition: platform/gl/Context.h:29
This class implements a 4x4 square matrix.
Definition: SquareMatrix4.h:85
This class implements a vector with two elements.
Definition: Vector2.h:96
This class implements a vector with three elements.
Definition: Vector3.h:97
This class implements a vector with four elements.
Definition: Vector4.h:97
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15