[osg-users] Shadowed scene distortion after 3rd window recreation

2013-04-20 Thread michael kapelko
Hi.
I'm implementing video settings change (and thus window recreation) in my
game without game restart. I experience graphics glitches after re-running
Viewer 3rd time: http://youtu.be/xOgTjENn2MM

I recreate the window the following way:
* Stop the viewer, stop threading.
* Create new graphics context and attach it to the camera.
* Run the viewer again.

As seen in the video, ShadowedScene does not survive the 3rd Viewer restart
and there appear some OpenGL errors in the logs.

Can anybody help me, please?
Thanks.

PS: Full source code is attached to the mail, uses CMake and needs
OpenSceneGraph-Data to run (dumptruck model), Page down recreates the
window.


osg_recreate_window.tar.bz2
Description: BZip2 compressed data
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Shadowed scene distortion after 3rd window recreation

2013-04-21 Thread michael kapelko
For those who only read forum, here's the link to the full source code:
https://dl.dropboxusercontent.com/u/12634473/osg/osg_recreate_window.tar.bz2

2013/4/20 michael kapelko 

> Hi.
> I'm implementing video settings change (and thus window recreation) in my
> game without game restart. I experience graphics glitches after re-running
> Viewer 3rd time: http://youtu.be/xOgTjENn2MM
>
> I recreate the window the following way:
> * Stop the viewer, stop threading.
> * Create new graphics context and attach it to the camera.
> * Run the viewer again.
>
> As seen in the video, ShadowedScene does not survive the 3rd Viewer
> restart and there appear some OpenGL errors in the logs.
>
> Can anybody help me, please?
> Thanks.
>
> PS: Full source code is attached to the mail, uses CMake and needs
> OpenSceneGraph-Data to run (dumptruck model), Page down recreates the
> window.
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Shadowed scene distortion after 3rd window recreation

2013-04-22 Thread michael kapelko
I've found out that the glitches are fixed by simply recreating
ShadowTechnique (SoftShadowMap).
If anyone is interested, here's the working example:
https://dl.dropboxusercontent.com/u/12634473/osg/osg_recreate_window_fixed.tar.bz2

2013/4/21 michael kapelko 

> For those who only read forum, here's the link to the full source code:
> https://dl.dropboxusercontent.com/u/12634473/osg/osg_recreate_window.tar.bz2
>
> 2013/4/20 michael kapelko 
>
>> Hi.
>> I'm implementing video settings change (and thus window recreation) in my
>> game without game restart. I experience graphics glitches after re-running
>> Viewer 3rd time: http://youtu.be/xOgTjENn2MM
>>
>> I recreate the window the following way:
>> * Stop the viewer, stop threading.
>> * Create new graphics context and attach it to the camera.
>> * Run the viewer again.
>>
>> As seen in the video, ShadowedScene does not survive the 3rd Viewer
>> restart and there appear some OpenGL errors in the logs.
>>
>> Can anybody help me, please?
>> Thanks.
>>
>> PS: Full source code is attached to the mail, uses CMake and needs
>> OpenSceneGraph-Data to run (dumptruck model), Page down recreates the
>> window.
>>
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org