35 if (vsFile ==
"" || psFile ==
"")
37 LogError(
"A program must have a vertex shader and a pixel shader.");
80 LogError(
"A program must have a compute shader.");
102 std::ifstream
input(filename);
108 getline(input, line);
109 source += line +
"\n";
115 LogError(
"Cannot open file " + filename);
virtual std::shared_ptr< VisualProgram > CreateFromNamedSources(std::string const &vsName, std::string const &vsSource, std::string const &psName, std::string const &psSource, std::string const &gsName, std::string const &gsSource)=0
std::shared_ptr< ComputeProgram > CreateFromSource(std::string const &csSource)
virtual ~ProgramFactory()
GLsizei GLsizei GLchar * source
virtual std::shared_ptr< ComputeProgram > CreateFromNamedSource(std::string const &csName, std::string const &csSource)=0
GLsizei const GLchar *const * string
#define LogError(message)
std::stack< unsigned int > mFlagsStack
std::shared_ptr< VisualProgram > CreateFromFiles(std::string const &vsFile, std::string const &psFile, std::string const &gsFile)
std::stack< ProgramDefines > mDefinesStack
std::shared_ptr< VisualProgram > CreateFromSources(std::string const &vsSource, std::string const &psSource, std::string const &gsSource)
GLenum GLenum GLenum input
static std::string GetStringFromFile(std::string const &filename)
std::shared_ptr< ComputeProgram > CreateFromFile(std::string const &csFile)