Re: [Plib-users] wxWindows and SSG together?
Brought to you by:
sjbaker
|
From: Ben D. <be...@wa...> - 2000-10-17 01:20:57
|
Hi Norman, it feels good to be here, i hope i can find a way to stay =
with PLIB.
I checked my test program to confirm that the contexts are being treated =
properly, yet the SSG graphics will not appear, and in fact seem to mess =
up the display of OpenGL calls even when the ssgCullAndDraw is called =
second.
Does PPE use wxWindows, FLTK, or something else? I tried to acquire the =
PPE source to look at the module you indicated, but when i downloaded =
and opened the file "prettypoly-cvsroot.tar.gz", all the files had ",v" =
in their names and had jumbled contents, as if the were were some kind =
of CVS-internal format.
-Ben
----- Original Message -----=20
From: Norman Vine=20
To: pli...@li...=20
Sent: Saturday, October 14, 2000 3:31 PM
Subject: RE: [Plib-users] wxWindows and SSG together?
Ben Discoe writes:=20
=20
Has anyone on this list tried using wxWindows and PLIB/SSG together? =
It seems like a good combination (open source GUI, open source 3D).=20
=20
It should work well since wxWindows can set up an OpenGL context, =
and SSG just draws into the current context. However, my attempts so =
far to combine the small wxWindows OpenGL sample program with some SSG =
functions has not been successful - the SSG objects aren't appearing.
=20
Has someone used them successfully, and if so perhaps someone has a =
small sample program with them working together?=20
=20
Hi Ben,
=20
Welcome aboard. :-)
=20
Using the FLTK windowing kit was fairly easy to do
There are some minor yet show stopping gottchas however.
i.e you have to make sure that you have a valid GLContext
prior to any SSG calls.
=20
basically all you should need to do is derive a new class
from wxGLCanvas and attach a ssgContext
=20
You can look at the PPE source
http://sourceforge.net/projects/prettypoly
To see a way to do this
The pertinent code is in src/viewer/ppeViewer.cxx
esp. ppeViewer::init()
=20
Watch out for possible confusion of=20
wxGLCanvas::SetCurrent() and
ssgContext::makeCurrent()
=20
MakeCurrent() !!! MUST !!! come after SetCurrent()
=20
Cheers
=20
Norman
|