[osg-users] GLSL plugin static linking issue (recent master branch)
Andrew Poltavets
apoltavets at yahoo.com
Wed Aug 28 14:11:04 PDT 2019
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
More information about the osg-users
mailing list