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.

        Carsten

-------------------------------------------------------------------------
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

Reply via email to