Hello Michael,

On 02/15/2011 10:45 AM, Michael Raab wrote:
> I'll try to update the required timer uniforms before rendering and let
> the cluster distribution getting care of the distribution. Is there a
> way to recognize if a SHLChunk is getting created or if a new uniform
> gets attached to a SHLChunk or can I somehow fetch a FieldContainers of
> type SHLChunk?

not in 1.x, there the best you can probably do is query the 
FieldContainerFactory:

static UInt32 prevNumFC = 0;
UInt32 numFC = 
FieldContainerFactory::the()->getFieldContainerStore()->size();

for(UInt32 i = prevNumFC; i < numFC; ++i)
{
        
if(FieldContainerFactory::the()->getContainer(i)->getType().isDerivedFrom(SHLChunk::getClassType()))
{
      // new SHLChunk
}
}

prevNumFC = numFC;

> Am 11.02.2011 17:41, schrieb Carsten Neumann:
>> On 02/10/2011 01:50 PM, Michael Raab wrote:
>>> the problem is that I need to know each SHLChunk in my scene tree.
>>> Imagine meshes are loaded and unloaded during runtime, I need to make
>>> sure that all appropriate SHLChunk instances get the appropriate update
>>> callback assigned.
>> hmm, your meshes are stored as .osb then or do you run some form of
>> post-processing after loading?
>> Either way, the SHLChunks have to be created at some point and other
>> parameters must be added to them, can't you fit this in there?

hmm, I guess there is a reason this is not feasible in your application, 
but isn't there some point where you add other parameters to the 
SHLChunks? Can you just put them in a list then so that you have easy 
access to them later when you need to update the values? To clear out 
unused chunks you could check the ref count, if it's <= 1 only the list 
of chunks holds a ref to it and you can drop it.

        Cheers,
                Carsten

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to