Hello Björn,
Björn Zehner wrote:
> Hello all,
> what are the prerequisits for using a passive window in terms of
> initialization and so on. I ran into the problem that calling init() on
> a Passive Window crashes if I call it to early (e.g. before I call the
> setupGLUT() function from the tutorials. The same happens with using Qt.
> It seems that I first have to create an instance of QGLWidget and call
> show() on it before I can initialize the PassiveWindow.
> So for example the following code would run:
>
> int main(int argc, char** argv){
> ChangeList::setReadWriteDefault();
> osgInit(argc, argv);
> int winid = setupGLUT(&argc, argv); (function is as in all the tutorials)
> PassiveWindowPtr pwin = PassiveWindow::create();
> beginEditCP(pwin);
> setting some stuff;
> endEditCP(pwin);
> pwin->init();
> .....
> }
>
> moving the winid = setupGLUT(..) line behind the pwin stuff crashes.
> What is missing for the PassiveWindow? Has somebody an idea?
the PassiveWindow leaves creation/activation of the OpenGL context to
the user and (as a rule of thumb) assumes that a context exists and is
active when you call its member functions.
Hope it helps,
Carsten
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users