I have attached a simple example that reproduces the problem. I am not sure if
this is a OSG problem or if we are not using it properly.
The problem occurs when more than 2 pre-render stages are cascading (as
described in previous post of thread), as the inherited
PositionalStateContainer will stop at the 2nd stage and not be pushed on the
following cascading pre-rendering stages, which happens in our scene graph (and
reproduced in the attached example).
Run the example, see the cow with green specular light. Press 'h'. The cow does
not change. Now set MULTIPLE_PRERENDER_STAGES = true in prerenderbin.cpp line
26. Repeat the above procedure. The lighting changes when the help is
displayed...
cheers,
guillaume
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jean-Sébastien
Guay
Sent: September-22-11 9:36 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Lighting problem when using help or stats handler
Hello Guillaume,
> After some more digging I kind of have a feeling for what is happening
> but again I have too little knowledge of the OSG internals to really
> understand what is going on...
FWIW, we use the stats in all our apps, and we've never had any problems
where showing the stats on screen would change lighting in the rest of
the scene. The stats disable lighting on their subgraph anyways (in
general you don't use lighting on a 2D HUD), see
src/osgViewer/StatsHandler.cpp line 1062 in the current OSG trunk:
stateset->setMode(GL_LIGHTING,osg::StateAttribute::OFF);
So it seems weird to me that you're getting these problems. OSG's own
examples also use the stats almost all the time and the lighting of the
scene is not affected.
All this points to something you're doing that's causing this, or a
driver bug. In both cases, it might be useful for you to reduce your app
to a very simple test case, see if the problem is still there, then work
back up to find out what's causing it. When you get to a simple
self-contained example that reproduces your problem, if you're still in
the dark as to why it happens, you can send us that example, and we can
have a look. In general, sending small self-contained examples is much
more useful than sending code snippets, since with the former we can
actually compile it and debug into it, whereas in the latter case we can
only look at the code...
Hope this helps,
J-S
--
______________________________________________________
Jean-Sébastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
PK
uY;?
prerenderbin/PK Â}:?KíÚÖ Ìg prerenderbin/ALL_BUILD.vcprojí]]sÒ@}®3þ
:´U«Ø¢*#(Ty`¦ÂklÜM*õã¿{7h¡$m¿öÅI²wÏÝ{ïîa÷@ãÑëmiç2Lrn¯°Ócv&ZYË}ÂÎ|eù½ýgû¹×¯îÞ9úoX]ÏaÒ¦ä32½»wv«Þ
Ê9a¢Õ?ÎAÓǼTØÝåÞ6UÍÓêI£©çâîoNz9÷]×>¯?©å÷äJ¥|õÙóRþÉÁni¯ò¢Z}vPùÉ»½C_
ù0ìsÜ+x|Ô¶oL¨Íø]|ËoBï³§¹b`[\2>ªg'>5<sðèÒ³
ýÉ<üà{®ïéB$^í¢áxÚh
Åq
#LöK.EV÷vEÓ CÆãZ9>¨ô-ì`C¬Öñ¶Q©A/N1®Çf·O
j0.òʹý _b®æ¡}¬Õ5b»ØB·ñÎÜÕhù«á?Ç+çj/®($¼G>%=âÓÓúÜAÁ9]9è
5Üé`¿P*¼`tz¨ÏLäro
gdÁ, ¼#TGcÛq¿Ê»úiã}OotÊ_|⹯£Á3ì!ÔÄÌä&1ô.jçÃp
s÷6^ÐGh,®OÏ<bW}l\·ì F|j¢ßÚço}@Þ\¢usær;´'ßNÏ äÕsLc#¦à°é
Âê fnÁj¡÷:'Qw f6
,¬9~ó¨àYÃÀîêJ¼EÆQ^ä8ÓÐHo6uÃ3b+þ<ZËcÃDDÇxÒ).aÍÅ+¬ÖgªÌ¬ú98ãÍ×Û6±sÈ0o%îQq{®gÀ²ÁÐZ[¤`Á°âÁLx0ÌfR&
ͮȡbCÅײ!°OȦË5¥àĸ¢ÅLh1NhRf{(r\IÅ7í?ao
G3&k9ò²a
\2®\NjR¾\î¥8ssFoþ×¼yé#y0ÁÕ¸ð0Àæµ
oº4}áQä@ÖØÔZÆ
±Úùó[óÏ
ÞÌ #+ÜU-
íã]·ÜÃf1bWPo
ja¬u|iµÅh°ÅÅÁÂÚ±¡àV,@&ж$M{8{qðH«íÃç¡6ÜÐ
>Zþí:ÇZ¾º¾)oNyga»ù1xÓTq®ÞBÐïÁ½Ù®~Èÿâ±(%ÔBçÈÒö´
ñös¢K¨WçMQä1êÈå^
qµ&Á§#éÊóûù`',>vKÇðÍ¿,&4lñÔµ{Á<dg¿[ÀN¤|Wºg2y¼µè/óyªØ9ñ°Å2ûÆ)#HÉj¿ÿæµß¿}fû}
¹K ë">ÖM¾¢vðyyí6³gèKÃø4Óê]ÆæÆ:¥÷Ë£Ïøla×|GvnOw|×5b¤®nóÄþ-
¾!%NÓp&>
âýæBJæè8GÂL¯ÑÈO¥ÚÈÜIÛ
5l×Â&öøY¯Ì½ÔB|cÁ0°D1kWhê°#$Ñ=EÇ~?ìÑÎ^æÇÜFâÞYqM/¢q®+üæc$Z|!èXÜ(d¬RR(ÈbW4¬dâVø%o)yKÉ[JÞúã7cJÞRòVí§·R5²ÏVÉ[²æ·6zØö¡SFÔ3µ%oeͶ·Âni$îפñ¢ä-¹òVü#o¥p)
K)\Jáúã÷cJáR
W¨R¸R7²ÏV)\²æR¸6zØö¹SFÔ©3µ¥peͶR¸Âni$îפñ¢.¹
×òä*K©\JåR*׿'S*R¹ìBÊòÈ|¶°Jå5ʵÑöÏ2ê N©½(+£l¶ÊvÛL#qטּ&¥rÝNå¿ÖKè]0/^¿(ÒÔá
ðƵ[½ìÒÆ
üWieiÑHW*h·VEz£²Î!6Wtg³níþIñóÆÿ1²Dô1T]L
7ác\¾±ÈаÄu1¾9*®ø?xàù/PK :Y;?Oë½Ç
4 prerenderbin/ALL_BUILD.vcproj.DSNRCCA.poiriergu.useríQOÛ0ÇÄw¨üÖ¦06mJ²vh©k¾ðbkâͱ#Û)ñá¹$Ŷ*ñHr¿óï.EvÏVï.Ai&
G=tAD2f"ñÈXÞêOãÓcr6<<p¯.(M3y©A3©ÿ
2w9x¤^Ót]=åþÖs©¼õ9/#µGk(ñow$Å%
¢Ct6XI:hÛá¦HV_>
«§[ÑÁt
:#eTÄ}¿ÎëB5¾ºaâº
j ¬ªªðKõÂ@©î<By}£Ã7FéÞðª¶H@Õ#:YÓdÒ =hØF3x2¹Ny88ùê4VØÖô1ù¥âÖL©Iþý]XøS,¢¬}
@%XQÅfç.¥²1Át2+ĺ¤
j³Á_ªçEå·~θíÚN¦,ÛQE@ưMQlýZmýÜÞVà8P
£Áu²V
÷SaÀDÈîõ³[]µºzïï6g&űLÄB¶Újµµ¯¶,z>Ϲý]'Ht<PK e|:?7 % ) prerenderbin/CMakeLists.txtTMoÚ0¾#ñ,Æ!½PmvëÁI
ÍâÈvPw²Râ¶ÖHÂ
vCü÷½v@ÚÄ<~÷ÛýN<á¬+U©"SÕ.ná`§?Ìu¡óM.+õk£+9Âx@#ôeòmòÕçØcÔÍa=ÀËeK#_úî
µ 4¥`ïÞYé'4Þí
ÏU3ÎxÛâ;T®ë?*C£ñä»ÊÔÓæåðw¼õæøH¸ÉLÆið¸Yë$òOÀô³"*y
¸ààD-å3É(OI®ê:}QbCI£2¨á²)«ßè ¸ëËQVªeÔ»®k
Ú>oÀèpP«Æ±Z?`¨/5Ôi ñÆXÜ·¤ òÂÄ'ÌQY¿Ü.TUë²@ÂÏô·ºX®6:'ä
â$Ö
8ü]ú2ÝØy4kS9°÷UþqÉÎôÇ~ØÌÏwÍ{Í¿¦YùfVB½7æ4ze¾ÞTeVqZ5z¹R®U!^+fµe«M®Ìjz½Y¥ÐáàÄ·I6óAöÃÒ$òÑç#p"Gp4<0\JC4JjeèV;,0yQ·;8ç ÞKeWÃNÙÿ£45
§Uv
Èl°çÊa!n÷ObZs2Ã- ÎN±9h}Ù8Ë íÃé_R3ÏîåzmAòüÍW˲2m¼^C
»s}_Gâ%»!éùÈÎ]ïnlHruÀ5&
¾°ÃÑþ¦!vIhfþ DxNv£Û£V}iÍfôÏkÍéï¤wGz׿PK µq:?±î|àà Á
prerenderbin/cmake_install.cmakeÁn@ïü#âQå¸×úFaqW
5¢¦DíÅÝÊ^¬e+¥x÷ØÆv
q
3óÍ??ìPYètµb®ÄFC+XÅç:WÇ`GÿÆÇo¸ârÁÕO!û½~ï
"®Aÿâ v=0#ýuM6Á!.eÄÛ·>²(¶</ Bß]÷{ Ͷ` 7PùR¥kpÅÂ
,&Ìy%CÊ&fH&äBxMÀ
0
hÛâ%b[UÏsåjKéß\X=e.$ÌòI½LþxK='¿u¯ö¹ï¿ß[ÃoéðßûáäÇ»J¦7W7§Ru` ªxyJÞºòL¯xZð]æï(²&ÄÄâø6¶-j
3©SÎØ|TqêÂÖ\r©aɵr¹÷/{ÎùÁïM9
t
;°¶¢²JDçR,8.9v¦ ^îq0ã¤
#ÖËè~Ýõ-F]áä»&ëT:yjéAØ~иJÚñê¦ÐçDºÔ#æÆø
wj£íôçà²úÑ®±É4$ýÉÌðL®ä¤BEe¥¦ZAó½;x¬`ålêÿPK ¹X;?éHbø1
á"