MeVisLab Resolution Independence API
SoShaderBuilder Class Reference

#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.
 
SoGLCompleteShadercreateCompleteShader (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!)
 

Detailed Description

Definition at line 52 of file SoShaderBuilder.h.

Member Enumeration Documentation

◆ ShaderType

Enumerator
FRAGMENT_SHADER 
VERTEX_SHADER 
GEOMETRY_SHADER 

Definition at line 55 of file SoShaderBuilder.h.

Constructor & Destructor Documentation

◆ SoShaderBuilder()

SoShaderBuilder::SoShaderBuilder ( )

Member Function Documentation

◆ addRepository()

void SoShaderBuilder::addRepository ( SoShaderRepository * repository)

Adds the given repository, ownership stays with the caller.

◆ addSource()

void SoShaderBuilder::addSource ( const char * data)

adds the given source to the default repository

◆ createCompleteShader()

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!)

◆ createShader()

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.


The documentation for this class was generated from the following file: