minor refactor
This commit is contained in:
@@ -76,6 +76,14 @@ void GLSLExtension::undefine(const std::string& name) {
|
||||
}
|
||||
}
|
||||
|
||||
void GLSLExtension::setDefined(const std::string& name, bool defined) {
|
||||
if (defined) {
|
||||
define(name, "TRUE");
|
||||
} else {
|
||||
undefine(name);
|
||||
}
|
||||
}
|
||||
|
||||
inline std::runtime_error parsing_error(
|
||||
const io::path& file, uint linenum, const std::string& message
|
||||
) {
|
||||
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
|
||||
void define(const std::string& name, std::string value);
|
||||
void undefine(const std::string& name);
|
||||
void setDefined(const std::string& name, bool defined);
|
||||
void addHeader(const std::string& name, ProcessingResult header);
|
||||
|
||||
const ProcessingResult& getHeader(const std::string& name) const;
|
||||
|
||||
Reference in New Issue
Block a user