OGLplus (0.45.0) a C++ wrapper for OpenGL

Shader operations wrapper helper class. More...

#include </home/chochlik/devel/oglplus/include/oglplus/shader.hpp>

Inheritance diagram for oglplus::ShaderOps:

Classes

struct  Property
 Types related to Shader. More...
 

Public Member Functions

ShaderType Type (void) const
 Get the type of the shader. More...
 
const ShaderOpsSource (const GLchar **srcs, const GLint *lens, int count) const
 Set the source code of the shader. More...
 
const ShaderOpsSource (const String &source) const
 Set the source code of the shader. More...
 
const ShaderOpsSource (const StrLit &source) const
 Set the source code of the shader. More...
 
const ShaderOpsSource (const GLchar *source) const
 Set the source code of the shader. More...
 
const ShaderOpsSource (const GLchar **srcs, int count) const
 Set the source code of the shader. More...
 
const ShaderOpsSource (const std::vector< const GLchar * > &srcs) const
 Set the source code of the shader. More...
 
template<std::size_t N>
const ShaderOpsSource (const std::array< const GLchar *, N > &srcs) const
 Set the source code of the shader. More...
 
const ShaderOpsSource (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 ShaderOpsCompile (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...
 

Detailed Description

Shader operations wrapper helper class.

Note
Do not use this class directly, use Shader instead.
See Also
Shader
Related OpenGL symbols:
glCreateShader glDeleteShader glIsShader

Member Function Documentation

String oglplus::ShaderOps::GetInfoLog ( void  ) const

Returns the compiler output if the program is compiled.

See Also
IsCompiled
Compile
Related OpenGL symbols:
glGetShader glGetShaderInfoLog
bool oglplus::ShaderOps::IsCompiled ( void  ) const

Returns true if the shader is already compiled, returns false otherwise.

See Also
Compile
Related OpenGL symbols:
glGetShader GL_COMPILE_STATUS

References oglplus::EnumValueName(), OGLPLUS_VERIFY, and Type().

Referenced by Compile().

static void oglplus::ShaderOps::PrecisionFormat ( ShaderType  shader_type,
PrecisionType  precision_type,
GLint *  range_log_2,
GLint *  precision_log_2 
)
static

Get the shader precision format.

Requires OpenGL 4.1 or the GL_ARB_ES2_compatibility extension.

Related OpenGL symbols:
glGetShaderPrecisionFormat

References OGLPLUS_VERIFY.

static void oglplus::ShaderOps::ReleaseCompiler ( void  )
static

Indicate that the resources associated with the compiler can be freed.

Requires OpenGL 4.1 or the GL_ARB_ES2_compatibility extension.

Related OpenGL symbols:
glReleaseShaderCompiler

References OGLPLUS_VERIFY.

const ShaderOps& oglplus::ShaderOps::Source ( const GLchar **  srcs,
const GLint *  lens,
int  count 
) const
const ShaderOps& oglplus::ShaderOps::Source ( const String source) const

Set the source code of the shader.

Related OpenGL symbols:
glShaderSource

References Source().

const ShaderOps& oglplus::ShaderOps::Source ( const StrLit source) const

Set the source code of the shader.

Related OpenGL symbols:
glShaderSource

References oglplus::StrLit::c_str(), oglplus::StrLit::size(), and Source().

const ShaderOps& oglplus::ShaderOps::Source ( const GLchar *  source) const

Set the source code of the shader.

Related OpenGL symbols:
glShaderSource

References Source().

const ShaderOps& oglplus::ShaderOps::Source ( const GLchar **  srcs,
int  count 
) const

Set the source code of the shader.

Related OpenGL symbols:
glShaderSource

References Source().

const ShaderOps& oglplus::ShaderOps::Source ( const std::vector< const GLchar * > &  srcs) const

Set the source code of the shader.

Related OpenGL symbols:
glShaderSource

References Source().

template<std::size_t N>
const ShaderOps& oglplus::ShaderOps::Source ( const std::array< const GLchar *, N > &  srcs) const

Set the source code of the shader.

Related OpenGL symbols:
glShaderSource

References Source().

const ShaderOps& oglplus::ShaderOps::Source ( const GLSLSource glsl_source) const

Set the source code of the shader.

Related OpenGL symbols:
glShaderSource

References oglplus::GLSLSource::Count(), oglplus::GLSLSource::Lengths(), oglplus::GLSLSource::Parts(), and Source().

ShaderType oglplus::ShaderOps::Type ( void  ) const

Get the type of the shader.

Related OpenGL symbols:
glGetShader GL_SHADER_TYPE

References oglplus::EnumValueName(), and OGLPLUS_VERIFY.

Referenced by Compile(), and IsCompiled().


The documentation for this class was generated from the following file:
  • /home/chochlik/devel/oglplus/include/oglplus/shader.hpp

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Wed Apr 30 2014 by Doxygen (version 1.8.4).