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

