Scrive Carsten Neumann <[EMAIL PROTECTED]>: > Hello Francesco, > > [EMAIL PROTECTED] wrote: > > i have many chunk materials sharing a single SHLChunk, each one with > different > > uniform parameters stored in SHLParameterChunks. > > > > At some point, i need to swap the current shader programs in the SHLChunk > with > > others, with different code and the same parameters. > > > > What i do is something like > > > > beginEditCP( theSHLChunk, SHLChunk::VertexProgramFieldMask | > > SHLChunk::FragmentProgramFieldMask ); > > theSHLChunk->setFragmentProgram( newFragmentProgramCode ); > > theSHLChunk->setVertexProgram( newVertexProgramCode ); > > endEditCP( theSHLChunk, SHLChunk::VertexProgramFieldMask | > > SHLChunk::FragmentProgramFieldMask ); > > > > > > now, i'm expecting that evrything works correctly, > > yes, I would expect so too... > > > but the result i get behaves > > as if all uniform parameters was set to zero values... > > > > in fact, if i rebuild all materials i can see the correct result, so i > guess i'm > > missing something crucial to get the parameters updated to their values as > they > > was before code-swapping. where i'm wrong? > > Hm, looking at the SHLChunk code it seems all the update calls are made > when the programs change, so I am a bit confused myself. > > Andreas, could you please take a look at this (if not please let me > know), since AFAIK the SHLChunk was mostly developed by you ? Thank you.
Always concerning this problem..... We apply the same shader material to two different geoemtries and they're rendered differently. This also depends on the viewpoint, if we move around the camera, the material assignment changes, the two objects interchange their material randomly (althought tey're supposed to have the same material). To me this looks like messed up material sorting or something (as long as OpenSG minimizez state changes during rendering..). We observed that if we render "manually" each geometry with their attached material, the rendering is ok. As it is very hard to give you a self contained example reproducing the problem, we'd like to know if it's possible to get a dump from OpenSG where it states what's going on during rendering. Is there anything I can switch on for more verbose logging? Here's another observation: The property that changes randomly seems to be only the diffuse lighting... The textures, specular lighting are ok).. Any hints very much appreciated, Toni ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
