[Sidefx-houdini-list] Mantra procedural question

Peter Baldwin peter_and_emily at ntlworld.com
Tue Aug 21 10:45:54 EDT 2007


I can't guarantee it will work - it's a long time since I looked at 
mantra's proc memory allocation...
How are you monitoring the deallocation?

Pete


Fred Valleur wrote:
> Hi Peter,
>
> thanks a lot for the suggestion, I was about to try that when I realised
> Mantra wasn't flushing at all, and thought it would only postpone the
> problem.
> I will definitely give it try, and let you know if that solves the problem.
>
>      Thanks again,
>     Frederic.
>
> On 8/21/07, Peter Baldwin <peter_and_emily at ntlworld.com> wrote:
>   
>> Have you tried creating a sub-procedural within your principal proc's
>> main render method? Something like:
>>
>> class VRAY_myProc : public VRAY_Procedural {
>> ...
>> }
>> class VRAY_mySubProc : public VRAY_Procedural {
>> ...
>> }
>>
>> VRAY_Procedural *allocProcedural(const char * string_in){
>>     if(!strcmp(&string_in[0],"myProc")){
>>         return new VRAY_myProc();
>>     }
>>     if(!strcmp(&string_in[0],"mySubProc")){
>>         return new VRAY_mySubProc();
>>     }
>> }
>>
>> void VRAY_myProc::render(float /*lod*/){
>>     openProceduralObject();
>>     // new sub procedural
>>     VRAY_Procedural *pushNEW=allocProcedural("mySubProc");
>>     VRAY_mySubProc *pushON=(VRAY_mySubProc*)pushNEW;
>>
>>         // fill out geo stuff and bbox in pushON....
>>
>>         addProcedural(pushON);
>>         closeObject();
>> }
>>
>> This might clean up after itself better...
>>
>> Peter
>>
>>
>>     




More information about the Sidefx-houdini-list mailing list