[osg-users] Emscripten build and dlopen

michael kapelko kornerr at gmail.com
Fri Nov 2 02:54:27 PDT 2018


Hi. I can't comment on dlopen() usage but here's how i load png
texture and apply it to a model:
https://github.com/OGStudio/openscenegraph-cross-platform-examples/tree/master/02.TextureImage
On Fri, 2 Nov 2018 at 10:10, Jay Maloney <jnmaloney at gmail.com> wrote:
>
> 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
>
> > 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 say
>
> > you must load the side module into the filesystem, so that dlopen (or fopen, etc.) can access it.
>
>
> Currently I have in CMakeLists.txt
>
> 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
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


More information about the osg-users mailing list