24 #ifndef __GLIP_SHADERSOURCE__
25 #define __GLIP_SHADERSOURCE__
70 LineInfo(
const std::string& _sourceName,
int _lineNumber);
77 std::vector<size_t> lineFirstChar,
79 std::vector<std::string> inSamplers2D;
80 std::vector<std::string> uniformVars;
81 std::vector<GLenum> uniformVarsType;
82 std::vector<std::string> outFragments;
83 bool compatibilityRequest;
88 void parseLines(
void);
89 bool removeBlock(std::string& line,
const std::string& bStart,
const std::string& bEnd,
bool nested);
90 void wordSplit(
const std::string& line, std::vector<std::string>& split);
91 GLenum parseUniformTypeCode(
const std::string& str,
const std::string& cpl);
92 GLenum parseOutTypeCode(
const std::string& str,
const std::string& cpl);
102 ShaderSource(
const std::string& src,
const std::string& _sourceName=
"",
int startLine=1,
const std::map<int,LineInfo>& _linesInfo=std::map<int,LineInfo>());
108 bool empty(
void)
const;
109 const std::string& getSource(
void)
const;
110 const std::string& getSourceName(
void)
const;
111 const char* getSourceCstr(
void)
const;
112 int getNumLines(
void)
const;
113 std::string getLine(
int l,
bool withNewLine=
true)
const;
115 Exception errorLog(
const std::string& log)
const;
116 bool requiresCompatibility(
void)
const;
117 int getVersion(
void)
const;
119 const std::vector<std::string>& getInputVars(
void)
const;
120 const std::vector<std::string>& getOutputVars(
void)
const;
121 const std::vector<std::string>& getUniformVars(
void)
const;
122 const std::vector<GLenum>& getUniformTypes(
void)
const;
Information about a specific line in ShaderSource.
Definition: ShaderSource.hpp:62
std::string sourceName
The name of the source (for example, the filename).
Definition: ShaderSource.hpp:67
static std::string portNameForFragColor
Name for the port mapping to gl_FragColor, if used.
Definition: ShaderSource.hpp:97
Definition: Component.hpp:32
std::map< int, LineInfo > linesInfo
Map containing information about specific lines of this source. The key represent the line number sta...
Definition: ShaderSource.hpp:100
Shader source code and infos.
Definition: ShaderSource.hpp:55
Exception class, derived from std::exception.
Definition: Exception.hpp:40
OpenGL includes and tools.
int lineNumber
The number of the line (including the offset).
Definition: ShaderSource.hpp:65