|
GL++
0.1
OpenGL API C++ Wrapper
|
GPU Shader object. More...
#include <shader.hpp>
Public Member Functions | |
| shader (shader_type type, const std::string &source) | |
| Construct from source. | |
| ~shader () | |
| Destroy and release shader. | |
| const std::string & | source () const |
| Get GLSL source code of this shader. | |
| std::string & | source () |
| Get reference to GLSL source code of this shader. | |
| void | compile () throw (compile_error) |
| Compile this shader to shader object. | |
| bool | is_compiled () const |
| Return true only if it is compiled successfully. | |
| std::string | info_log () const |
| Get the information log about compilation of this shader. | |
| const shader_type & | type () const |
| Get the type of this shader. | |
Public Member Functions inherited from glpp::named_object< GLint > | |
| name_type | object_name () const |
| Return the name of object (handle) | |
Public Member Functions inherited from glpp::noncopyable | |
| noncopyable (noncopyable &) | |
| noncopyable & | operator= (noncopyable &) |
Protected Member Functions | |
| void | initialize () |
| Generic initialize function. | |
Protected Attributes | |
| shader_type | m_type |
| Type of this shader (Fragment, Geometry .. ) | |
| std::string | m_source |
| Source code of this shader. | |
Protected Attributes inherited from glpp::named_object< GLint > | |
| GLint | m_gl_name |
| Stored object name. | |
Additional Inherited Members | |
Public Types inherited from glpp::named_object< GLint > | |
| typedef GLint | name_type |
| Type of the name. | |
GPU Shader object.
| glpp::shader::shader | ( | shader_type | type, |
| const std::string & | source | ||
| ) |
Construct from source.
| type | Type of this shader (Fragment, Geometry .. ) |
| source | The GLSL source code of this shader. |
| void glpp::shader::compile | ( | ) | throw (compile_error) |
Compile this shader to shader object.
http://www.opengl.org/sdk/docs/man4/xhtml/glCompileShader.xml
| std::string glpp::shader::info_log | ( | ) | const |
Get the information log about compilation of this shader.
http://www.opengl.org/sdk/docs/man4/xhtml/glGetShaderInfoLog.xml
| bool glpp::shader::is_compiled | ( | ) | const |
Return true only if it is compiled successfully.
http://www.opengl.org/sdk/docs/man4/xhtml/glCompileShader.xml
|
inline |
Get reference to GLSL source code of this shader.
Changing source code has effect only if the object is not compiled yet.