24 #ifndef __UNIFORMS_VARS_LOADER_INCLUDE__
25 #define __UNIFORMS_VARS_LOADER_INCLUDE__
38 using namespace CoreGL;
39 using namespace CorePipeline;
44 enum UniformsLoaderKeyword
60 KW_UL_GL_UNSIGNED_INT,
61 KW_UL_GL_UNSIGNED_INT_VEC2,
62 KW_UL_GL_UNSIGNED_INT_VEC3,
63 KW_UL_GL_UNSIGNED_INT_VEC4,
140 static const char* keywords[UL_NumKeywords];
187 Resource(
const VanillaParserSpace::Element& e);
194 const std::string& getName(
void)
const;
197 int applyTo(
Filter& filter,
bool forceWrite=
true)
const;
198 VanillaParserSpace::Element getCodeElement(
void)
const;
209 std::map<const std::string, Node> subNodes;
210 std::map<const std::string, Resource> resources;
214 Node(
const VanillaParserSpace::Element& e);
221 void softCopy(
const Node& cpy,
bool appendNewNodes=
true,
bool appendNewResources=
true,
bool removeAbsentNodes=
true,
bool removeAbsentResources=
true);
224 const std::string& getName(
void)
const;
225 bool isFilter(
void)
const;
226 bool isPipeline(
void)
const;
227 bool empty(
void)
const;
229 bool hasModifications(
void)
const;
230 void clearModifiedFlags(
bool value=
false);
232 int getNumSubNodes(
void)
const;
233 std::vector<std::string> getSubNodesNamesList(
void)
const;
234 bool subNodeExists(
const std::string& nodeName)
const;
235 const Node& subNode(
const std::string& nodeName)
const;
236 Node& subNode(
const std::string& nodeName);
237 void eraseNode(
const std::string& nodeName);
238 NodeConstIterator nodeBegin(
void)
const;
239 NodeConstIterator nodeEnd(
void)
const;
240 NodeConstIterator findNode(
const std::string& nodeName)
const;
241 NodeIterator nodeBegin(
void);
242 NodeIterator nodeEnd(
void);
243 NodeIterator findNode(
const std::string& nodeName);
245 int getNumResources(
void)
const;
246 std::vector<std::string> getResourcesNamesList(
void)
const;
247 bool resourceExists(
const std::string& resourceName)
const;
248 const Resource& resource(
const std::string& resourceName)
const;
249 Resource& resource(
const std::string& resourceName);
250 void eraseResource(
const std::string& resourceName);
251 ResourceConstIterator resourceBegin(
void)
const;
252 ResourceConstIterator resourceEnd(
void)
const;
253 ResourceConstIterator findResource(
const std::string& resourceName)
const;
254 ResourceIterator resourceBegin(
void);
255 ResourceIterator resourceEnd(
void);
256 ResourceIterator findResource(
const std::string& resourceName);
259 int applyTo(
Pipeline& pipeline,
Filter& filter,
bool forceWrite=
true,
bool silent=
false)
const;
260 VanillaParserSpace::Element getCodeElement(
void)
const;
264 std::map<const std::string, Node> nodes;
271 void load(std::string source,
LoadingFilter loadingFilter=LoadAll,
int lineOffset=1);
274 bool empty(
void)
const;
276 void clear(
const std::string& name);
277 bool hasPipeline(
const std::string& name)
const;
278 std::vector<std::string> getPipelinesTypeNames(
void)
const;
279 const Node& getRootNode(
const std::string& name)
const;
280 Node& getRootNode(
const std::string& name);
281 NodeConstIterator rootNodeBegin(
void)
const;
282 NodeConstIterator rootNodeEnd(
void)
const;
283 NodeIterator rootNodeBegin(
void);
284 NodeIterator rootNodeEnd(
void);
285 int applyTo(
Pipeline& pipeline,
bool forceWrite=
true,
bool silent=
false)
const;
286 std::string getCode(
void)
const;
287 std::string getCode(
const std::string& name)
const;
288 void writeToFile(
const std::string& filename)
const;
290 static const char* getKeyword(UniformsLoaderKeyword k);
OpenGL Dynamic Memory Allocator.
Filter layout (Read Only).
Definition: Filter.hpp:59
Pipeline layout (Read Only).
Definition: Pipeline.hpp:63
Definition: Component.hpp:32
Dynamic allocator for GL types (run-time resolution of type).
Definition: HdlDynamicData.hpp:65
OpenGL Pixel and Fragment Shader Handle.
Pipeline object.
Definition: Pipeline.hpp:261
Filter object.
Definition: Filter.hpp:124