OGLplus (0.52.0) a C++ wrapper for OpenGL

oglplus::ObjectOps< tag::DirectState, tag::Shader > Class Template Reference

Class wrapping shader functions (with direct state access) More...

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

Inheritance diagram for oglplus::ObjectOps< tag::DirectState, tag::Shader >:
Collaboration diagram for oglplus::ObjectOps< tag::DirectState, tag::Shader >:

Classes

struct  Property
 Types related to Shader. More...
 

Public Member Functions

ShaderType Type (void) const
 Get the type of the shader. More...
 
ObjectOpsSource (const GLsizei count, const GLchar *const *srcs, const GLint *lens)
 Set the source code of the shader. More...
 
ObjectOpsSource (GLSLString &&source)
 Set the source code of the shader. More...
 
ObjectOpsSource (GLSLStrings &&source)
 Set the source code of the shader. More...
 
ObjectOpsSource (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...
 
ObjectOpsCompile (void)
 Compiles the shader. More...
 
ObjectOpsCompileInclude (GLsizei count, const GLchar *const *paths, const GLint *lengths)
 Compiles the shader using the specified include paths. More...
 
ObjectOpsCompileInclude (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...
 

Detailed Description

template<>
class oglplus::ObjectOps< tag::DirectState, tag::Shader >

Class wrapping shader functions (with direct state access)

Note
Do not use this class directly, use Shader instead.

Member Function Documentation

ObjectOps& oglplus::ObjectOps< tag::DirectState, tag::Shader >::Compile ( void  )

Compiles the shader.

Postcondition
IsCompiled()
Exceptions
ErrorCompileError
See Also
IsCompiled
Related OpenGL symbols:
glCompileShader
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.

Postcondition
IsCompiled()
Exceptions
ErrorCompileError
See Also
IsCompiled

Requires OpenGL ARB.shading_language_include.

Related OpenGL symbols:
glCompileShaderIncludeARB
ObjectOps& oglplus::ObjectOps< tag::DirectState, tag::Shader >::CompileInclude ( GLSLString &&  incl)

Compiles the shader using the specified include paths.

Postcondition
IsCompiled()
Exceptions
ErrorCompileError
See Also
IsCompiled

Requires OpenGL ARB.shading_language_include.

Related OpenGL symbols:
glCompileShaderIncludeARB
String oglplus::ObjectOps< tag::DirectState, tag::Shader >::GetInfoLog ( void  ) const

Returns the compiler output if the program is compiled.

See Also
IsCompiled
Compile
Related OpenGL symbols:
glGetShader glGetShaderInfoLog
bool oglplus::ObjectOps< tag::DirectState, tag::Shader >::IsCompiled ( void  ) const

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

See Also
Compile
Related OpenGL symbols:
glGetShader GL_COMPILE_STATUS
static void oglplus::ObjCommonOps< tag::Shader >::PrecisionFormat ( ShaderType  shader_type,
PrecisionType  precision_type,
GLint *  range_log_2,
GLint *  precision_log_2 
)
staticprotectedinherited

Get the shader precision format.

Requires OpenGL 4.1 or the GL_ARB_ES2_compatibility extension.

Related OpenGL symbols:
glGetShaderPrecisionFormat
static void oglplus::ObjectOps< tag::DirectState, tag::Shader >::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
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.

Related OpenGL symbols:
glShaderSource
ObjectOps& oglplus::ObjectOps< tag::DirectState, tag::Shader >::Source ( GLSLString &&  source)

Set the source code of the shader.

Related OpenGL symbols:
glShaderSource
ObjectOps& oglplus::ObjectOps< tag::DirectState, tag::Shader >::Source ( GLSLStrings &&  source)

Set the source code of the shader.

Related OpenGL symbols:
glShaderSource
ObjectOps& oglplus::ObjectOps< tag::DirectState, tag::Shader >::Source ( const GLSLSource glsl_source)

Set the source code of the shader.

Related OpenGL symbols:
glShaderSource
ShaderType oglplus::ObjectOps< tag::DirectState, tag::Shader >::Type ( void  ) const

Get the type of the shader.

Related OpenGL symbols:
glGetShader GL_SHADER_TYPE

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 Mon Sep 22 2014 by Doxygen (version 1.8.6).