Re: [osg-users] [osg_users] problem with lights.

2011-03-09 Thread Juan S. Valverde García

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_ptrosg::Groupscene=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_ptrosgShadow::ShadowMapsm=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íaj.valve...@virtualmech.com:

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
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] problem with osgshadow compilation in osgshadow example

2010-11-04 Thread Juan S. Valverde García

Hi Robert,
Thanks for your quick response. I really appreciatte that.

So it happen that I fixed the problem just adding the following include:

#includeOpenThreads/Mutex

How does this sound to you? Does it make sense?
Regards
Juan

El 04/11/2010 10:15, Robert Osfield escribió:

Hi Juan,

Using mingw with the OSG is not often done so you'll best testing
something that few others do so if you spot problems then you'll need
to pitch in to help resolve.

As a general note, this error with linking against OpenThreads points
to a an issue with how the OSG/OpenThreads was built and what the
example is linking against.  Normally the OSG is able to keep this all
consistent, but if you build the OpenThreads with one configuration,
change the configuration and build your application against that new
configuration but link against the OpenThreads with the old
configuration you might see problems.  The include/OpenThreads/Config
file is autogenerated and should be consistent.

Robert.

2010/11/3 Juan S. Valverde Garcíaj.valve...@virtualmech.com:

Hi,

Thank you very much in advance for any help!

So I'm trying to cast some shadows on my OSG virtual world. I started
looking for the osgshadow example and manual to have a clue about this.
When I try to compile the example, using mingww gcc 4.4.0, i get the
followeing error:

debug/osgshadow.o: In function `ViewData':

C:\devtools\projects\OSG\pruebas
ascensor\shadow/../../../../library/OpenSceneGraph-2.9.8/include/osgShadow/ViewDependentShadowTechnique:176:
undefined reference to `_imp___ZN11OpenThreads5MutexC1ENS0_9MutexTypeE'

C:\devtools\projects\OSG\pruebas
ascensor\shadow/../../../../library/OpenSceneGraph-2.9.8/include/osgShadow/ViewDependentShadowTechnique:176:
undefined reference to `_imp___ZN11OpenThreads5MutexD1Ev'

debug/osgshadow.o: In function `~ViewData':

C:\devtools\projects\OSG\pruebas
ascensor\shadow/../../../../library/OpenSceneGraph-2.9.8/include/osgShadow/ViewDependentShadowTechnique:152:
undefined reference to `_imp___ZN11OpenThreads5MutexD1Ev'

C:\devtools\projects\OSG\pruebas
ascensor\shadow/../../../../library/OpenSceneGraph-2.9.8/include/osgShadow/ViewDependentShadowTechnique:152:
undefined reference to `_imp___ZN11OpenThreads5MutexD1Ev'

collect2: ld returned 1 exit status


Of course, first thing I tried was understanding the problem. No way. Second
googled it. No trace of it in the www. So I came to the forum. Any clue
about it?
Again, any help would be much appreciated. My world is sad without a shadow!

Best regards
Juan


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
Juan S. Valverde García
Director Ejecución de Proyectos

virtualmech
Parque Científico y Tecnológico Cartuja'93
c/ Leonardo da Vinci 18
Planta 4ª, Módulo A.2
41092 Sevilla
web: www.virtualmech.com
email: j.valve...@virtualmech.com

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] problem with osgshadow compilation in osgshadow example

2010-11-03 Thread Juan S. Valverde García

Hi,

Thank you very much in advance for any help!

So I'm trying to cast some shadows on my OSG virtual world. I started 
looking for the osgshadow example and manual to have a clue about this.
When I try to compile the example, using mingww gcc 4.4.0, i get the 
followeing error:


debug/osgshadow.o: In function `ViewData':

C:\devtools\projects\OSG\pruebas 
ascensor\shadow/../../../../library/OpenSceneGraph-2.9.8/include/osgShadow/ViewDependentShadowTechnique:176: 
undefined reference to `_imp___ZN11OpenThreads5MutexC1ENS0_9MutexTypeE'


C:\devtools\projects\OSG\pruebas 
ascensor\shadow/../../../../library/OpenSceneGraph-2.9.8/include/osgShadow/ViewDependentShadowTechnique:176: 
undefined reference to `_imp___ZN11OpenThreads5MutexD1Ev'


debug/osgshadow.o: In function `~ViewData':

C:\devtools\projects\OSG\pruebas 
ascensor\shadow/../../../../library/OpenSceneGraph-2.9.8/include/osgShadow/ViewDependentShadowTechnique:152: 
undefined reference to `_imp___ZN11OpenThreads5MutexD1Ev'


C:\devtools\projects\OSG\pruebas 
ascensor\shadow/../../../../library/OpenSceneGraph-2.9.8/include/osgShadow/ViewDependentShadowTechnique:152: 
undefined reference to `_imp___ZN11OpenThreads5MutexD1Ev'


collect2: ld returned 1 exit status




Of course, first thing I tried was understanding the problem. No way. 
Second googled it. No trace of it in the www. So I came to the forum. 
Any clue about it?

Again, any help would be much appreciated. My world is sad without a shadow!

Best regards
Juan

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org