#include <SXCore.h>
EX sx::Shader::Shader |
( |
const string & |
id | ) |
|
EX sx::Shader::~Shader |
( |
| ) |
|
EX void sx::Shader::addShader |
( |
const string & |
code, |
|
|
ShaderType |
type |
|
) |
| |
adds new shadercode to newShaders, which will be compiled by load
EX void sx::Shader::addShaderFile |
( |
const string & |
path, |
|
|
ShaderType |
type |
|
) |
| |
adds path to new shadercode to newShaders, which will be loaded and compiled
EX void sx::Shader::addTransformFeedbackBuffer |
( |
const string & |
identifier | ) |
|
Adds the identifier of a transform feedback buffer. After executing load(), this shader is a transform feedback shader, which should only be used between the calls beginCapture and endCapture in the class BufferedMesh.
EX unsigned int sx::Shader::createTextureSlot |
( |
| ) |
|
Returns the next free texture slot which can be used by a texture to be used with this shader.
EX void sx::Shader::freeTextureSlots |
( |
| ) |
|
Releases all texture slots from being used by shaders, which are not locked.
EX vector<string> sx::Shader::getErrorLog |
( |
| ) |
const |
returns compilation/link errors generated turing the execution of load()
EX int sx::Shader::getProgramID |
( |
| ) |
const |
Returns the program ID, which is internally used to access the shader program. If the shader is not initialized, the return value is not specified.
EX int sx::Shader::getTargetLocation |
( |
const string & |
identifyer | ) |
|
Returns the location of an identifyer of a fragment output target. If the shader does not have a fragment output target named identifyer, a negative number is returned.
EX const vector<string>& sx::Shader::getTransformFeedbackBuffers |
( |
| ) |
const |
returns the identifiers of the transform feedback buffers
EX int sx::Shader::getTransformFeedbackLocation |
( |
const string & |
identifyer | ) |
|
Returns the location of the transform feedback buffer with ID identifyer. If no such transform feedback buffer exists, a negative number is returned.
EX int sx::Shader::getUniformLocation |
( |
const string & |
identifyer | ) |
|
Returns the uniform location of an identifyer. If the shader does not have a uniform named identifyer, a negative number is returned.
EX bool sx::Shader::isFragmentShading |
( |
| ) |
const |
returns true iff the program has a fragment shader
EX bool sx::Shader::isLoaded |
( |
| ) |
const |
|
virtual |
EX bool sx::Shader::isTessellating |
( |
| ) |
const |
returns true iff the program was successfully loaded with a tessellation shader
EX bool sx::Shader::isTransformFeedback |
( |
| ) |
const |
EX void sx::Shader::load |
( |
| ) |
|
|
virtual |
EX void sx::Shader::lockTextureSlots |
( |
| ) |
|
Locks all the texture slots which are used currently. (from zero to newTextureSlot - 1) The locked texture slots are not affected by an invocation of freeTextureSlots() or use()
EX int sx::Shader::Shader::getAttribLocation |
( |
const std::string & |
identifyer | ) |
|
Returns the location of an identifyer of a vertex attribute. If the shader does not have an attribute named identifyer, a negative number is returned.
EX void sx::Shader::unlockTextureSlots |
( |
| ) |
|
Undos the last lockTextureSlots operation, which has not been undone.
EX void sx::Shader::use |
( |
| ) |
|
Turns the shader into the current shader. If the shader isn't loaded, the method has no effect. Releases all unlocked texture slots.
The documentation for this class was generated from the following file: