On 4. Jan 2008, at 13:50, 常辉 wrote:

> Hi
> I'v tried to support multi-pipe in eqOgre, but it seems that there  
> are at least two reasons for that.
>
> Firstly, Eq suggests not to share resource between pipes, then each  
> pipe must have its own SceneManager, Camera, Window, mesh, Entities  
> respectively, but in Ogre apps, each resouce must have its own  
> unique name for 'finding' method. Then it is needed to name each  
> SceneManager or Camera differently. The unique name of eq::Window  
> can be used as prefix to the names. That is not difficult, but will  
> make the code ugly. Realize it by scripts not codes is better.

It is not technically possible to share resources between pipes. I am  
afraid that there is no other way then implementing the per-pipe names  
for these managers. Please note that the window name is not guaranteed  
to be unique. I suggest using the window's 'this' pointer converted to  
a string for this.

> Another reason comes from the poor threading ability of Ogre's  
> material manager. exp. If the same texture used in two threads, it  
> would lost in the second one, so it is difficult to use the same  
> texture in multi-pipes, which are in different threads, in Eq. I  
> think it will be better to assign different texture to pipes, which  
> can be realized by material scripts too. :)

I remember that Ogre suffers from the Singleton-Antipattern. :-/

If I understand you correctly, you want to name textures uniquely by  
pipe. Maybe this is something to be discussed on the ogre forums -  
other Scenegraphs store the context-dependend data in a state object,  
which then is typically managed per pipe.

Is it possible to use one material manager per pipe?


HTH,

Stefan.


_______________________________________________
eq-dev mailing list
[email protected]
https://in-zueri.ch/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com

Reply via email to