Represents an OpenGL Shader.
It's templated with the shader type. Currently vertex and fragment shaders are supported. FShader and VShader are short typedefs for those. You can compile a shader, but you need to link it within a Program to use it.
Type | Type of the shader (Vertex or Fragment) |
Inherits GLObject.
Public Member Functions | |
GLuint | getHandle () const |
Returns native OpenGL handle. | |
std::string | getFilename () const |
Returns the filename of the shader. | |
void | compile (ShaderSource source) |
Compiles the shader from a ShaderSource. | |
void | compile (std::string code) |
Compiles the shader from raw GLSL code (filename is set to unknown-file) | |
![]() | |
void | setServiceContext (config::ServiceContext cnt) |
template<typename Ex , LogLevel LL, typename... Ts> | |
Error Notice Debug void | logAndThrow (Ts...args) |
Static Public Attributes | |
static constexpr ShaderType | shaderType = Type |
Additional Inherited Members | |
![]() | |
template<typename... Ts> | |
void | checkGLError (Ts...) |
template<typename... Ts> | |
void | checkGLWarning (Ts...) |
template<typename... Ts> | |
void | logThrowGL (Ts...) |
![]() | |
template<typename... Ts> | |
void | logCritical (Ts...args) |
template<typename... Ts> | |
void | logError (Ts...args) |
template<typename... Ts> | |
void | logWarning (Ts...args) |
template<typename... Ts> | |
void | logNotice (Ts...args) |
template<typename... Ts> | |
void | log (Ts...args) |
template<typename... Ts> | |
void | logDebug (Ts...args) |
template<typename Ex , LogLevel LL = LogLevel::Error, typename... Ts> | |
void | logAndThrow (Ts...args) |
![]() | |
NotCopyable (const NotCopyable &)=delete | |
NotCopyable & | operator= (const NotCopyable &)=delete |
![]() | |
static constexpr PrintGL | GLERR = PrintGL::Error |