Hi Thibault, Robert,

I've recently pulled out the old code I had created for osgviewerWx for
another OSG'er, but with the changes to osgViewer and the recent changes
to the wxGLCanvas in 2.8.x series of wxWidgets, it's a bit outdated ... 

My current goal is to get it compiling this weekend and then onto the
Wiki for others to help fix as I simply don't have the time to debug
this myself.

To answer your questions:

> >  1) I have used wxWidgets "old way" of instantiating OpenGL
contexts; that
> > is, 2.8 introduced an explicit context creation and usage with
> > SetCurrent(context), but this does not work (at startup, somewhere
in the GL
> > requirements verfication, the app says the capacity is not
supported). I had
> > to use the old fashioned implicit context creation. Has anybody
successfully
> > done that with the OSG ?

I haven't built any code against 2.8.0 so can't really comment here ...
other than to say that with 2.6.x I let the wxGLCanvas handle the
context creation. Check out the (now severely outdated) example on the
OSG wiki.

> >  2) I am wondering whether I should use different OpenGL contexts. I
have
> > tried to use one context per wxCanvas (each canvas has its own
SceneView)
> > and one shared context. I load a simple group with the cow and a
"hello
> > world" text". With the first solution, I end up with the famous
"squares
> > instead of text" issue in the second window; the 3D models look fine
in both
> > windows however. Using the same context, the text appears clear in
both
> > windows. What are the implications of using a single context for
many
> > windows ? Should I do that ? Can we use different contexts within
the same
> > process ? Does it make any sense anyway ?

I've successfully used multiple views (4 at a time) each with its own
opengl context and SceneView. Be sure to set the ContextID on each
SceneView as per this FAQ item:

http://www.openscenegraph.org/osgwiki/pmwiki.php/FAQ/FAQ#faq_40


> >  3) My trackball manipulator shows erratic behaviour: the rotations
occur
> > only by 90 degrees, and if I move my mouse by 1 pixels, the model
jumps by
> > 200 pixels or so. I've read in the archives that trackball speed is
> > hardcoded, but my behaviour seems suspicious. Any idea ?

Can't help here, works fine for me. The example on the wiki shows how I
capture events from wx and pipe them into OSG. Again, the example is
against OSG 1.2, so YMMV

> >  4) Can I use, in the same process, different threads to render to
the
> > different GL widgets ? I'd love to have the main thread manage the
wx stuff,
> > and one thread per graphics window.

Never tried, but I don't see why not, as long as you manage the contexts
properly.

> >  5) Should I wait for the new osgViewer class to come out ? Or maybe
I can
> > help with osgviewerWX (since I've seen in the CVS that no such
viewer is
> > currently being worked on)

You are more than welcome to help out with osgviewerWx if you like. I'll
post my code on the weekend.

Cheers,
Gian

> >  I am sorry if those questions have been asked thousands of time,
but even
> > though I've started reading the list years ago, I am *still*
confused with
> > the relations between windows, contexts, SceneViews and threads.
> >
> >  Thanks in advance for any answer/advice.
> >
> >  Thibault
> >
> >
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> > http://openscenegraph.net/mailman/listinfo/osg-users
> > http://www.openscenegraph.org/
> >
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to