All Classes Files Functions Variables Typedefs Pages
Public Member Functions | Static Public Attributes | List of all members
Shader< Type > Class Template Reference

Description

template<ShaderType Type>
class lumina::Shader< Type >

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.

Template Parameters
TypeType 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)
 
- Public Member Functions inherited from SingleBase
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

- Protected Member Functions inherited from GLContextFreeObject
template<typename... Ts>
void checkGLError (Ts...)
 
template<typename... Ts>
void checkGLWarning (Ts...)
 
template<typename... Ts>
void logThrowGL (Ts...)
 
- Protected Member Functions inherited from SingleBase
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)
 
- Protected Member Functions inherited from NotCopyable
 NotCopyable (const NotCopyable &)=delete
 
NotCopyableoperator= (const NotCopyable &)=delete
 
- Static Protected Attributes inherited from GLContextFreeObject
static constexpr PrintGL GLERR = PrintGL::Error