RE: [Plib-users] wxWindows and SSG together?
Brought to you by:
sjbaker
From: Norman V. <nh...@ca...> - 2000-10-14 22:27:50
|
Ben Discoe writes: Has anyone on this list tried using wxWindows and PLIB/SSG together? It seems like a good combination (open source GUI, open source 3D). 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. Has someone used them successfully, and if so perhaps someone has a small sample program with them working together? Hi Ben, Welcome aboard. :-) 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. basically all you should need to do is derive a new class from wxGLCanvas and attach a ssgContext 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() Watch out for possible confusion of wxGLCanvas::SetCurrent() and ssgContext::makeCurrent() MakeCurrent() !!! MUST !!! come after SetCurrent() Cheers Norman |