Hi Toni,

Antonio Bleile wrote:
> Hi,
> 
> I've some problems when my context get's renewed due
> to pixelformat changes e.g. the user selected stereo
> etc. I'm using qt 4.2.3 and I use it's setFormat method.
> Qt recreates a new context behind the scenes and informs 
> the QGLWidget about the change by calling initializeGL.
> So I'm ok OpenGL-context-wise. I'm not quite sure what
> I'm supposed to do OpenSG-wise for getting the transition
> right. After some experiments I figured out that it's
> a good thing to recreate the PassiveWindow associated
> to the context. See the code posted below. I get
> some problems trying to cleanup the old passive
> window though (crash, segfault, sorry no decent stack trace 
> at hand). But it get's more weird. When I comment
> the lines that do the cleanup, the program seems 
> to work correctly on the first switch mono->stereo.
> After switching back and forth for a while, my lighting
> get's screwed, the light source seems to be black.
> All this might be caused by an error inside
> my program, but as this one was the last modification
> I made to the code I suspect it's OpenSG's fault. Just
> want to ask if the code below has some obvious errors..

If you create/use a new context OpenSG needs to recreate the internal 
display lists, texture objects and shaders etc.

AFAIR just calling Window::reinitializeAllGLObjects(); should be enough 
for that.

Hope it helps

        Dirk


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to