void GlShaderProgram::addShaderFromSourceFile(const ShaderType shaderType, const std::string &shaderSrcFilename) { GlShader *shader = new GlShader(shaderType); shader->setAnonymousCreation(true); shader->compileFromSourceFile(shaderSrcFilename); 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); }