Class wrapping shader functions (with direct state access) More...
#include </home/chochlik/devel/oglplus/include/oglplus/shader.hpp>
Classes | |
struct | Property |
Types related to Shader. More... | |
Public Member Functions | |
ShaderType | Type (void) const |
Get the type of the shader. More... | |
ObjectOps & | Source (const GLsizei count, const GLchar *const *srcs, const GLint *lens) |
Set the source code of the shader. More... | |
ObjectOps & | Source (GLSLString &&source) |
Set the source code of the shader. More... | |
ObjectOps & | Source (GLSLStrings &&source) |
Set the source code of the shader. More... | |
ObjectOps & | Source (const GLSLSource &glsl_source) |
Set the source code of the shader. More... | |
bool | IsCompiled (void) const |
Returns true if the shader is already compiled, returns false otherwise. More... | |
String | GetInfoLog (void) const |
Returns the compiler output if the program is compiled. More... | |
ObjectOps & | Compile (void) |
Compiles the shader. More... | |
ObjectOps & | CompileInclude (GLsizei count, const GLchar *const *paths, const GLint *lengths) |
Compiles the shader using the specified include paths. More... | |
ObjectOps & | CompileInclude (GLSLString &&incl) |
Compiles the shader using the specified include paths. More... | |
Static Public Member Functions | |
static void | ReleaseCompiler (void) |
Indicate that the resources associated with the compiler can be freed. More... | |
Static Protected Member Functions | |
static void | PrecisionFormat (ShaderType shader_type, PrecisionType precision_type, GLint *range_log_2, GLint *precision_log_2) |
Get the shader precision format. More... | |
Class wrapping shader functions (with direct state access)
ObjectOps& oglplus::ObjectOps< tag::DirectState, tag::Shader >::Compile | ( | void | ) |
Compiles the shader.
Error | CompileError |
ObjectOps& oglplus::ObjectOps< tag::DirectState, tag::Shader >::CompileInclude | ( | GLsizei | count, |
const GLchar *const * | paths, | ||
const GLint * | lengths | ||
) |
Compiles the shader using the specified include paths.
Error | CompileError |
Requires OpenGL ARB.shading_language_include.
ObjectOps& oglplus::ObjectOps< tag::DirectState, tag::Shader >::CompileInclude | ( | GLSLString && | incl | ) |
Compiles the shader using the specified include paths.
Error | CompileError |
Requires OpenGL ARB.shading_language_include.
String oglplus::ObjectOps< tag::DirectState, tag::Shader >::GetInfoLog | ( | void | ) | const |
Returns the compiler output if the program is compiled.
bool oglplus::ObjectOps< tag::DirectState, tag::Shader >::IsCompiled | ( | void | ) | const |
Returns true if the shader is already compiled, returns false otherwise.
GL_COMPILE_STATUS
|
staticprotectedinherited |
Get the shader precision format.
Requires OpenGL 4.1 or the GL_ARB_ES2_compatibility extension.
|
static |
Indicate that the resources associated with the compiler can be freed.
Requires OpenGL 4.1 or the GL_ARB_ES2_compatibility extension.
ObjectOps& oglplus::ObjectOps< tag::DirectState, tag::Shader >::Source | ( | const GLsizei | count, |
const GLchar *const * | srcs, | ||
const GLint * | lens | ||
) |
Set the source code of the shader.
ObjectOps& oglplus::ObjectOps< tag::DirectState, tag::Shader >::Source | ( | GLSLString && | source | ) |
Set the source code of the shader.
ObjectOps& oglplus::ObjectOps< tag::DirectState, tag::Shader >::Source | ( | GLSLStrings && | source | ) |
Set the source code of the shader.
ObjectOps& oglplus::ObjectOps< tag::DirectState, tag::Shader >::Source | ( | const GLSLSource & | glsl_source | ) |
Set the source code of the shader.
ShaderType oglplus::ObjectOps< tag::DirectState, tag::Shader >::Type | ( | void | ) | const |
Get the type of the shader.
GL_SHADER_TYPE