void GlShaderProgram::addShaderFromSourceCode(const GlShader::ShaderType shaderType, const std::string &shaderSrc) { GlShader *shader = new GlShader(shaderType); shader->setAnonymousCreation(true); shader->compileFromSourceCode(shaderSrc); addShader(shader); }
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); }
void GlShaderProgram::addGeometryShaderFromSourceCode(const char *geometryShaderSrc, GLenum inputPrimitiveType, GLenum outputPrimitiveType) { GlShader *shader = new GlShader(inputPrimitiveType, outputPrimitiveType); shader->setAnonymousCreation(true); shader->compileFromSourceCode(geometryShaderSrc); addShader(shader); }