Ejemplo n.º 1
0
void GlShaderProgram::addShaderFromSourceFile(const ShaderType shaderType, const std::string &shaderSrcFilename) {
  GlShader *shader = new GlShader(shaderType);
  shader->setAnonymousCreation(true);
  shader->compileFromSourceFile(shaderSrcFilename);
  addShader(shader);

}
Ejemplo n.º 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);
}