<div dir="ltr">Hi Andrew,<div>the options should not influence the library loading, it's the datafiles that can be cached. </div><div>I'm just guessing here, but are you trying to load a file named "filename.glsl"? that would match the problem you see.</div><div>the glsl plugin is strange in that it does not support *.glsl files.</div><div>rename your datafile .vert , .frag or .geom as appropriate for the type of shader it contains.</div><div>Laurens.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 28, 2019 at 11:10 PM Andrew Poltavets <<a href="mailto:apoltavets@yahoo.com">apoltavets@yahoo.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
First of all I pretty new to engine thus I may sound silly.<br>
<br>
In my case OSG tends to load glsl dynamic library despite I wrote<br>
USE_OSGPLUGIN(glsl) and linked with libosgdb_glsld.a.<br>
<br>
As I had stuck with this I decided to get to the debug. So please let me show what I have found so far and what feels suspiciosly for me:<br>
In function <br>
Code:<br>
ReaderWriter::ReadResult Registry::readImplementation(const ReadFunctor& readFunctor,Options::CacheHintOptions cacheHint)<br>
<br>
<br>
<br>
value of <br>
Code:<br>
useObjectCache= options ? (options->getObjectCacheHint()&cacheHint)!=0: false;<br>
<br>
<br>
becomes equal true for FreeType plugin but false for GLSL plugin due to missed options in very first debug frame for GLSL plugin:<br>
<br>
<br>
Code:<br>
inline osg::ref_ptr<osg::Shader> readRefShaderFileWithFallback(osg::Shader::Type type, const std::string& filename, const char* fallback)<br>
{<br>
return osgDB::readRefShaderFileWithFallback(type, filename, Registry::instance()->getOptions(), fallback);<br>
}<br>
<br>
<br>
<br>
If I got it right having useObjectCache as false ends up with search of dynamic library.<br>
<br>
That could be incorrect observations... So if I wrong here - could somebody please help me getting GLSL thing to work properly?<br>
<br>
<br>
Configuration:<br>
Recent `master`: bd50af117bed340b14b5bf13da6a8efe893f4ce7<br>
MacOS 10.14.6<br>
<br>
-DAPPLE:BOOL="1"<br>
-DCMAKE_BUILD_TYPE:STRING="Debug"<br>
-DDYNAMIC_OPENTHREADS:BOOL="0"<br>
-DBUILD_OSG_EXAMPLES:BOOL="1"<br>
-DDYNAMIC_OPENSCENEGRAPH:BOOL="0"<br>
-DBUILD_OSG_APPLICATIONS:BOOL="0"<br>
-DOSG_GL3_AVAILABLE:BOOL="1"<br>
<br>
Thank you!<br>
<br>
Cheers,<br>
Andrew<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=76618#76618" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=76618#76618</a><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div>