[Sidefx-houdini-list] HDK: VRAY_Procedural::referenceGeometry()

Szymon Kapeniak szymon.kapeniak at gmail.com
Wed May 4 08:44:38 EDT 2011


hello,

I'm not sure if I follow what help says about this function. My goal
is to add the same *gdp to Mantra several times modifying it at every
step. I'm changing its points' attributes. Does it work this way?
psedo code follows:

GU_Detail * gdp = allocateGeometry();
gdp->load(file);
addGeometry(gdp,shutter);
referenceGeometry(gdp);
changemy_gdp(gdp);
addGeometry(gdp, shutter);
referenceGeometry(gdp);
changeit_again(gdp);
addGeometry(gdp, shutter);
// freeGeometry(gdp);

This is what I consider valid after reading docs, but it doesn't work.
Mantra stops rendering (albeit after adding gpd successfully) and/or
leaks lots of memory (with freeGeometry())

I think this is something simple, which I didn't get in a right way.
Currently I workaround-ed my problem with new_gdp->copy(gdp), but that
smells fishy...

thanks for any help.

-- 
skk.



More information about the Sidefx-houdini-list mailing list