Hi Robert, thank you so much for your quick response.
You're right about the little information. Sorry, I didn't mean to write
a superlong email. Here we go:
We use OSG 2.9.8 under windows and mingw compiler under Qt creator IDE.
I load different IVE files that come from 3DS and move them after we do
some mechanical calculations. Offline, we simulate a mechanical system
and afterwards, with the positions, orientations etc of the solids
animate de scene. This last thing is done obviously with the help of OSG.
The only GL objects that I use, to my understanding, are GL_NORMALIZE
because we scale the ives, so this assures that the normals remain
unitary, GL_LIGHTING ON, GL_LIGHT0,GL_LIGHT1, GL_MULTISAMPLE_ARB on the
loaded ives to soften pixelation on the edges.
Sorry for this but I don't understand what you mean by: "about creating
your context and destroying them "
I guess you mean how do I create the scene?
I do the typical:
osg::ref_ptr<osg::Group>scene=NULL;
scene = createScene( numPlantas, distPlantas, ancho, fondo,
alto,distUltimaPlanta,distMotorTecho,r_roz_drch_inf,AzR,r_polea_drch,AxP,
arrowlist );
and
scene=NULL; just before the return to free the whole scene. I use
extensively osg::ref_ptrto be sure that OSG handdles my pointers when
destroyed.
The structure of the scene is a group with hanging nodes. A root.
Hanging from the root we have the osgShadow::ShadowedScene and the rest
of the stuff is hanging from this last one, the shadowed, even the two
light sources. Actually the lightsource hangs from a postion transform
that hangs from the shadowedscene.
What else. I have
osg::ref_ptr<osgShadow::ShadowMap>sm=newosgShadow::ShadowMap; to which I
assign a light:
sm->setLight(lightSource[0]->getLight());
I don't find any other relevant info in my code related to GL.
Should I upload some code for you guys to see?
Thanks again
Regards
Juan
El 09/03/2011 13:58, Robert Osfield escribió:
Hi Juan,
The issue that bites users creating multiple successive graphics
windows is that GL objects handles that the scene graph holds aren't
cleared properly when a new context is created. You don't say
anything how you've gone about creating your context and destroying
them, and the relationship with what you do with the scne graph, or
even the OSG version that you use. All we know is that you Qt and OSG
in some way, and have a problem.
Given I know so little about your specific setup I can do no more than
general guess like the above. Could you provide a bit more of the
above info.
Robert.
2011/3/9 "Juan S. Valverde García"<[email protected]>:
Hi all,
I'm building a scene with different parts coming from 3DS files
transformed to IVE (self lighting off). I manage and build my scene,
motion etc, from osg code. I coded lighting and shadows using
osg::shadowmap. (used softshadow map too). I use GL_Lighting with two
lights, GL_Light0 and 1.
I call the viewer from another application based on Qt but not embedded
or any complicated way, just open a viewer. Fist time it opens it works
just fine. The problem comes when I close the viewer and run it again.
From the second time and on, third, fourth etc, my scene seems to be
blurred, too much light.
I attach two captures, the second blurred.
Thanks a lot for any help. I'm quite desperate now. I'm not an expert on
visualization and this problem seems to me like a black box.
Regards
Juan
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org