Hi Eric,

E. Wing schrieb:
So, I'm still trying to get things built. I was cleaning up issues in
the Xcode projects and Stephan beat me to it :) And I had to start
over again.
I am sorry about that. After committing the project I've seen some minor "unschönheiten", I forgot to configure some things correctly, but be honest with me, the xcode-project is a really big beast.
First, for the Multi-threaded OpenGL engine, you should only activate
it when you have multiple processors. (I noticed it has been commented
out because of performance issues.) If you are on a single processor
machine, you will likely see performance degradation. You should do a
CPU count check at runtime and decide if you want to activate it.
(This code is already in the osgsimpleviewerCocoa,) In well written
OpenGL code with multiple processors available, the multithreaded
engine usually shows huge performance benefits. (I know Doom 3 and
World of Warcraft showed huge gains.) My sense is that OSG falls into
the well written OpenGL code camp so turning it on is probably the
thing to do.

Have you seen the discussion of Robert and me about this topic on osg-submissions? The Multithreaded OpenGL execution helps only if you are cpu-bound. If your app is not cpu-bound the overhead of the multithreaded-execution of opengl-calls costs more performance as you wil gain with it. (showing the cow in osgviewer with multithreaded opengl-execution degrades the performance to 45fps on a MacPro (fregardless of the chosens threading model of osgViewer), most of the time the processor is waiting on mutexes etc.) The apple-tech-note notes this also.

So this option is very specific to your particular settings and the conclusion was to add another flag to osg::GraphicsContext::Traits to enable or disable this option on request. (disabled by default -- and it should be disabled when you have only one processor)
So it looks like that the sharing of the contexts do not work correctly,
perhaps because both of them are bind to a window.  I'll try to find out
more on this topic in the documentation / at developer.apple.com


Second, there shouldn't be any problem with shared contexts with views
bound to separate windows (or whatever). The osgsimpleviewerCocoa does
the extreme and has multiple windows and also multiple views within a
single window.
Yes I know. It works in Producer without a flaw when I implemented the windowed mode (producer shares a fullscreen-context with a windowed context)

Perhaps the problem lies in osg itself, time to gdb :)


cheers, Stephan

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to