Jay Maloney
2018-09-25 06:30:43 UTC
I am using the Emscripten build of osg and am running into a problem when I try to use functions like
Code:
osgDB::readNodeFile
and
Code:
osgDB::readImageFile
.
Usually I get an exception with the message
Code:
TARGET_LINK_LIBRARIES(
main
osgViewer
osgDB
# osgDB plugins start.
osgdb_osg
osgdb_glsl
osgdb_tga
osgdb_serializers_osg
osgdb_serializers_osgtext
# osgDB plugins end.
osgGA
osgText
osgUtil
osg
osgShadow
OpenThreads
)
So, does anyone know what is supposed to be done here? I am able to load .osgt and .osgb nodes but can't load other file nodes or image files like png or tga.
Do you have to actually do the loading of the side module, if so which file? The osglib*.a plugins?
Is there a way to load files without dlopen?[/code]
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74970#74970
Code:
osgDB::readNodeFile
and
Code:
osgDB::readImageFile
.
Usually I get an exception with the message
To use dlopen, you need to use Emscripten's linking support, see (cannot post links) github ... /kripken/emscripten/wiki/Linking
The instructions on the page sayyou must load the side module into the filesystem, so that dlopen (or fopen, etc.) can access it.
Currently I have in CMakeLists.txtCode:
TARGET_LINK_LIBRARIES(
main
osgViewer
osgDB
# osgDB plugins start.
osgdb_osg
osgdb_glsl
osgdb_tga
osgdb_serializers_osg
osgdb_serializers_osgtext
# osgDB plugins end.
osgGA
osgText
osgUtil
osg
osgShadow
OpenThreads
)
So, does anyone know what is supposed to be done here? I am able to load .osgt and .osgb nodes but can't load other file nodes or image files like png or tga.
Do you have to actually do the loading of the side module, if so which file? The osglib*.a plugins?
Is there a way to load files without dlopen?[/code]
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74970#74970