Encapsulates OpenGL shaders.
More...
#include <globjects/include/globjects/Shader.h>
Encapsulates OpenGL shaders.
A shader can be constructed using an AbstractStringSource. A shader can be attached to a program using Program::attach(). A Shader subclasses either ChangeListener and Changeable to react to changing shader sources and to propagate this change to ChangeListeners.
- See also
- http://www.opengl.org/wiki/Shader
-
Program
-
ShaderSource
-
ChangeListener
-
Changeable
◆ IncludePaths
◆ IncludeImplementation
Enumerator |
---|
ShadingLanguageIncludeARB | |
Fallback | |
◆ Shader() [1/2]
globjects::Shader::Shader |
( |
const gl::GLenum |
type | ) |
|
◆ Shader() [2/2]
◆ ~Shader()
virtual globjects::Shader::~Shader |
( |
| ) |
|
|
protectedvirtual |
◆ hintIncludeImplementation()
◆ fromString()
static Shader * globjects::Shader::fromString |
( |
const gl::GLenum |
type, |
|
|
const std::string & |
sourceString, |
|
|
const IncludePaths & |
includePaths = IncludePaths() |
|
) |
| |
|
static |
◆ fromFile()
static Shader * globjects::Shader::fromFile |
( |
const gl::GLenum |
type, |
|
|
const std::string & |
filename, |
|
|
const IncludePaths & |
includePaths = IncludePaths() |
|
) |
| |
|
static |
◆ globalReplace() [1/2]
static void globjects::Shader::globalReplace |
( |
const std::string & |
search, |
|
|
const std::string & |
replacement |
|
) |
| |
|
static |
◆ globalReplace() [2/2]
static void globjects::Shader::globalReplace |
( |
const std::string & |
search, |
|
|
int |
i |
|
) |
| |
|
static |
◆ clearGlobalReplacements()
static void globjects::Shader::clearGlobalReplacements |
( |
| ) |
|
|
static |
◆ accept()
virtual void globjects::Shader::accept |
( |
ObjectVisitor & |
visitor | ) |
|
|
overridevirtual |
◆ type()
gl::GLenum globjects::Shader::type |
( |
| ) |
const |
◆ setSource() [1/2]
◆ setSource() [2/2]
void globjects::Shader::setSource |
( |
const std::string & |
source | ) |
|
◆ source()
◆ updateSource()
void globjects::Shader::updateSource |
( |
| ) |
|
◆ includePaths()
const IncludePaths & globjects::Shader::includePaths |
( |
| ) |
const |
◆ setIncludePaths()
void globjects::Shader::setIncludePaths |
( |
const IncludePaths & |
includePaths | ) |
|
◆ compile()
bool globjects::Shader::compile |
( |
| ) |
const |
◆ isCompiled()
bool globjects::Shader::isCompiled |
( |
| ) |
const |
◆ invalidate()
void globjects::Shader::invalidate |
( |
| ) |
|
◆ get()
gl::GLint globjects::Shader::get |
( |
gl::GLenum |
pname | ) |
const |
◆ getSource()
std::string globjects::Shader::getSource |
( |
| ) |
const |
◆ checkCompileStatus()
bool globjects::Shader::checkCompileStatus |
( |
| ) |
const |
◆ infoLog()
std::string globjects::Shader::infoLog |
( |
| ) |
const |
◆ typeString() [1/2]
std::string globjects::Shader::typeString |
( |
| ) |
const |
◆ objectType()
virtual gl::GLenum globjects::Shader::objectType |
( |
| ) |
const |
|
overridevirtual |
◆ typeString() [2/2]
static std::string globjects::Shader::typeString |
( |
gl::GLenum |
type | ) |
|
|
static |
◆ notifyChanged()
virtual void globjects::Shader::notifyChanged |
( |
const Changeable * |
changeable | ) |
|
|
overrideprotectedvirtual |
◆ shaderString()
std::string globjects::Shader::shaderString |
( |
| ) |
const |
|
protected |
◆ Program
◆ m_type
gl::GLenum globjects::Shader::m_type |
|
protected |
◆ m_source
◆ m_includePaths
◆ m_compiled
bool globjects::Shader::m_compiled |
|
mutableprotected |
◆ m_compilationFailed
bool globjects::Shader::m_compilationFailed |
|
mutableprotected |
◆ s_globalReplacements
std::map<std::string, std::string> globjects::Shader::s_globalReplacements |
|
staticprotected |
The documentation for this class was generated from the following file: