MeVisLab Resolution Independence API
|
#include <SoShaderBuilder.h>
Public Types | |
enum | ShaderType { FRAGMENT_SHADER = 1 , VERTEX_SHADER = 2 , GEOMETRY_SHADER = 4 } |
Public Member Functions | |
SoShaderBuilder () | |
void | addSource (const char *data) |
adds the given source to the default repository | |
void | addRepository (SoShaderRepository *repository) |
Adds the given repository, ownership stays with the caller. | |
std::string | createShader (const std::string name, const std::vector< std::string > &directives=std::vector< std::string >(), SoShaderRepository *repository=nullptr) |
Creates the shader source for the given shader. | |
SoGLCompleteShader * | createCompleteShader (const std::string name, const std::vector< std::string > &directives=std::vector< std::string >(), SoShaderRepository *repository=nullptr, int directivesFlag=FRAGMENT_SHADER|GEOMETRY_SHADER|VERTEX_SHADER) |
Creates a complete shader from the given name (.VS, .FS and .GS are appended, VS and FS are required!) (ownership is passed to the caller!) | |
Definition at line 52 of file SoShaderBuilder.h.
Enumerator | |
---|---|
FRAGMENT_SHADER | |
VERTEX_SHADER | |
GEOMETRY_SHADER |
Definition at line 55 of file SoShaderBuilder.h.
SoShaderBuilder::SoShaderBuilder | ( | ) |
void SoShaderBuilder::addRepository | ( | SoShaderRepository * | repository | ) |
Adds the given repository, ownership stays with the caller.
void SoShaderBuilder::addSource | ( | const char * | data | ) |
adds the given source to the default repository
SoGLCompleteShader * SoShaderBuilder::createCompleteShader | ( | const std::string | name, |
const std::vector< std::string > & | directives = std::vector< std::string >(), | ||
SoShaderRepository * | repository = nullptr, | ||
int | directivesFlag = FRAGMENT_SHADER|GEOMETRY_SHADER|VERTEX_SHADER ) |
Creates a complete shader from the given name (.VS, .FS and .GS are appended, VS and FS are required!) (ownership is passed to the caller!)
std::string SoShaderBuilder::createShader | ( | const std::string | name, |
const std::vector< std::string > & | directives = std::vector< std::string >(), | ||
SoShaderRepository * | repository = nullptr ) |
Creates the shader source for the given shader.