OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Emscripten build and dlopen


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
jnmaloney
Newbie


Joined: 25 Sep 2018
Posts: 2

PostPosted: Tue Sep 25, 2018 6:30 am    Post subject:
Emscripten build and dlopen
Reply with quote

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
Quote:
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
Quote:
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]
Back to top
View user's profile Send private message
jnmaloney
Newbie


Joined: 25 Sep 2018
Posts: 2

PostPosted: Fri Nov 02, 2018 6:54 am    Post subject:
Emscripten build and dlopen
Reply with quote

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

Quote:
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

Quote:
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







------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
kornerr
Appreciator


Joined: 01 Oct 2013
Posts: 283

PostPosted: Fri Nov 02, 2018 9:55 am    Post subject:
Emscripten build and dlopen
Reply with quote

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 <> wrote:
Quote:

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

Quote:
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

Quote:
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








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts How I build OpenSceneGraph manually f... kornerr General 0 Tue Aug 14, 2018 11:51 am View latest post
No new posts Android can't build osgdb_png lyn General [forum] 6 Fri Jun 29, 2018 2:35 am View latest post
No new posts Build error under Windows? Need feedb... robertosfield General 3 Wed Jun 27, 2018 11:11 am View latest post
No new posts Can't build OSG 2.8.2 on CentOS 7.5 pau Build system [build] 7 Tue Jun 12, 2018 8:50 am View latest post
No new posts osgQt Build error bclay General 2 Wed Jan 17, 2018 9:53 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP