ataylor Posted March 13, 2015 Share Posted March 13, 2015 Situation 1 -- define RENDER_SIMPLE only in system script system script (unigine.cpp): #define RENDER_SIMPLE engine config (unigine.cfg): <item name="extern_define" type="string"></item> Console after world load: Loading "core/materials/default/unigine_post.mat" 27 materials 55 shaders 4 ms Default materials are loaded. I would expect simple materials loaded. ---- Situation 2 -- define RENDER_SIMPLE only in engine config system script has no #define present engine config: <item name="extern_define" type="string">RENDER_SIMPLE</item> Console after world load: Loading "core/materials/simple/unigine_post.mat" 9 materials 9 shaders 0 ms Simple materials are loaded as expected. ---- Situation 3 -- define RENDER_SIMPLE in both system script and engine config system script: #define RENDER_SIMPLE engine config: <item name="extern_define" type="string">RENDER_SIMPLE</item> Console after world load: Parser::setDefine(): "RENDER_SIMPLE" is already defined {...} Loading "core/materials/simple/unigine_post.mat" 9 materials 9 shaders 0 ms Simple materials loaded as expected. Parser complains about RENDER_SIMPLE being defined twice, which it is of course. This shows that both instances of the define are detected by the engine but only the one in the engine config is actually taking effect. Link to comment
unclebob Posted March 15, 2015 Share Posted March 15, 2015 Hello, Adam! Just to be sure, have you placed that #define RENDER_SIMPLE line before any #include <header fie> lines? Link to comment
ataylor Posted March 16, 2015 Author Share Posted March 16, 2015 Well now I feel silly. Sorry, no, i had the #define below the #includes. This is not a bug. Link to comment
Recommended Posts