Shader operations wrapper helper class. 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... | |
const ShaderOps & | Source (const GLchar **srcs, const GLint *lens, int count) const |
Set the source code of the shader. More... | |
const ShaderOps & | Source (const String &source) const |
Set the source code of the shader. More... | |
const ShaderOps & | Source (const StrLit &source) const |
Set the source code of the shader. More... | |
const ShaderOps & | Source (const GLchar *source) const |
Set the source code of the shader. More... | |
const ShaderOps & | Source (const GLchar **srcs, int count) const |
Set the source code of the shader. More... | |
const ShaderOps & | Source (const std::vector< const GLchar * > &srcs) const |
Set the source code of the shader. More... | |
template<std::size_t N> | |
const ShaderOps & | Source (const std::array< const GLchar *, N > &srcs) const |
Set the source code of the shader. More... | |
const ShaderOps & | Source (const GLSLSource &glsl_source) const |
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... | |
const ShaderOps & | Compile (void) const |
Compiles the shader. More... | |
Static Public Member Functions | |
static void | ReleaseCompiler (void) |
Indicate that the resources associated with the compiler can be freed. More... | |
static void | PrecisionFormat (ShaderType shader_type, PrecisionType precision_type, GLint *range_log_2, GLint *precision_log_2) |
Get the shader precision format. More... | |
Shader operations wrapper helper class.
const ShaderOps& oglplus::ShaderOps::Compile | ( | void | ) | const |
Compiles the shader.
Error | CompileError |
References oglplus::EnumValueName(), IsCompiled(), OGLPLUS_CHECK, OGLPLUS_IS_ERROR, and Type().
String oglplus::ShaderOps::GetInfoLog | ( | void | ) | const |
Returns the compiler output if the program is compiled.
bool oglplus::ShaderOps::IsCompiled | ( | void | ) | const |
Returns true if the shader is already compiled, returns false otherwise.
GL_COMPILE_STATUS
References oglplus::EnumValueName(), OGLPLUS_VERIFY, and Type().
Referenced by Compile().
|
static |
Get the shader precision format.
Requires OpenGL 4.1 or the GL_ARB_ES2_compatibility extension.
References OGLPLUS_VERIFY.
|
static |
Indicate that the resources associated with the compiler can be freed.
Requires OpenGL 4.1 or the GL_ARB_ES2_compatibility extension.
References OGLPLUS_VERIFY.
const ShaderOps& oglplus::ShaderOps::Source | ( | const GLchar ** | srcs, |
const GLint * | lens, | ||
int | count | ||
) | const |
Set the source code of the shader.
Referenced by Source().
Set the source code of the shader.
References oglplus::StrLit::c_str(), oglplus::StrLit::size(), and Source().
const ShaderOps& oglplus::ShaderOps::Source | ( | const GLchar * | source) | const |
const ShaderOps& oglplus::ShaderOps::Source | ( | const GLchar ** | srcs, |
int | count | ||
) | const |
const ShaderOps& oglplus::ShaderOps::Source | ( | const std::vector< const GLchar * > & | srcs) | const |
const ShaderOps& oglplus::ShaderOps::Source | ( | const std::array< const GLchar *, N > & | srcs) | const |
const ShaderOps& oglplus::ShaderOps::Source | ( | const GLSLSource & | glsl_source) | const |
Set the source code of the shader.
References oglplus::GLSLSource::Count(), oglplus::GLSLSource::Lengths(), oglplus::GLSLSource::Parts(), and Source().
ShaderType oglplus::ShaderOps::Type | ( | void | ) | const |
Get the type of the shader.
GL_SHADER_TYPE
References oglplus::EnumValueName(), and OGLPLUS_VERIFY.
Referenced by Compile(), and IsCompiled().