예제 #1
0
void GlShaderProgram::addShaderFromSourceCode(const GlShader::ShaderType shaderType, const std::string &shaderSrc) {
    GlShader *shader = new GlShader(shaderType);
    shader->setAnonymousCreation(true);
    shader->compileFromSourceCode(shaderSrc);
    addShader(shader);

}
예제 #2
0
void GlShaderProgram::addGeometryShaderFromSourceFile(const std::string &geometryShaderSrcFilename, GLenum inputPrimitiveType, GLenum outputPrimitiveType) {
  GlShader *shader = new GlShader(inputPrimitiveType, outputPrimitiveType);
  shader->setAnonymousCreation(true);
  shader->compileFromSourceFile(geometryShaderSrcFilename);
  addShader(shader);
}
예제 #3
0
void GlShaderProgram::addGeometryShaderFromSourceCode(const char *geometryShaderSrc, GLenum inputPrimitiveType, GLenum outputPrimitiveType) {
  GlShader *shader = new GlShader(inputPrimitiveType, outputPrimitiveType);
  shader->setAnonymousCreation(true);
  shader->compileFromSourceCode(geometryShaderSrc);
  addShader(shader);
}