FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Multiple Instances

 
Post new topic   Reply to topic     Forum Index -> Sinbad
View previous topic :: View next topic  
Author Message
nahil



Joined: 22 May 2005
Posts: 2

PostPosted: Sun May 22, 2005 2:24 am    Post subject: Multiple Instances Reply with quote

I'm asking myself whether Sinbad and OGRE support multiple instances in the same process.
It might sound as nosnese, but some class of applications requuire this. These are those that themselves serve as libraries.

If the answer to the question is yes, I have some objections against singletons and will post it in the 'singleton' thread.

Below I'll outline a few application scenarios:

Sinbad is designed not only for games, but for a wider range of applications, right?
Imagine an ActiveX control or a KDE component that can be used by special-case applications for viewin CAD models. Now, what happens if such a special-cased app wants to be able to load multiple CAD files in multiple windows ('Multiple Document Architecture' in Windows/MFC speek)? Each instance of the class backing a document window would load its own instance of the ActiveX control.

Or someone (me) might want to write a web browser plug-in that displays 3D content on web pages, like Flash does for 2D. X3D (www.web3d.org is the language for this, and there is a whole market around it.)

Such a plug-in could be used to publish CAD models on the web - after LOD reduction - e.g. for discussion with their customers in a business-to-business setup. Or architects could show their ideas to the public. And there is also the concept of ad-games. Or imagine map24.com in 3D. Other markets are online entertainment or geo visualization.

Can multiple instances of that web browser plug-in be integrated in the same web page? Or what should happen if two pages contain such a 3D object, and both browser windows are backed by the same process (mozilla likes to do this)? Each instance of the plug-in would create its own instance of Sinbad.
Back to top
View user's profile Send private message
csauls



Joined: 27 Mar 2004
Posts: 278

PostPosted: Sun May 22, 2005 11:55 am    Post subject: Reply with quote

I believe one would only have to load OGRE/Sinbad once, and use multiple scene hierarchies, one for each "window"/"view"/"render matrix" the application is producing.

But I'll have to look at it. I don't know if there's an OGRE precedent on the issue.
_________________
Chris Nicholson-Sauls
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
nahil



Joined: 22 May 2005
Posts: 2

PostPosted: Mon May 23, 2005 5:15 pm    Post subject: Reply with quote

csauls wrote:
I believe one would only have to load OGRE/Sinbad once, and use multiple scene hierarchies, one for each "window"/"view"/"render matrix" the application is producing.


Yes, sure, but what I'm trying to point out is that if you are creating a render applet that can be used by other applications (immagine a Firefox plug-in for a 3D version of Flash), then the application might want to instantiate multiple instances of your 3D applet/control/plug-in. Then each instance would initialize its own instance of Sinbad....

Maybe we could circumvent this if we would create a second "helper-applet/control/plug-in" that just initializes Sinbad and exports a function that returns an opaque pointer to Sinbad. The actual 3D applet would just accept such a handle in their initialize() function.

This would require the application to instantiate the helper-applet first before it creates the first window/view/render matrix, and deinstantiate after the last window/view/render matrix. Using late evaluation and reference counting we could possibly soften these requirements.

However, such a thing would not be the cleanest most design.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Sinbad All times are GMT - 6 Hours
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


Powered by phpBB © 2001, 2005 phpBB Group