|
From: James W. W. <ja...@fr...> - 2005-07-13 17:20:03
|
"Joseph J. Strout" <jo...@st...> wrote: >I'm trying to get some TriMesh data out of a display group, work >with it for a while in immediate mode, and then release it, and be >able to get it again. I get the data with Q3TriMesh_GetData, whose >docs say that it will allocate memory, which I must free by calling >Q3TriMesh_EmptyData. But once I've done that, calling >Q3TriMesh_GetData again on the original TQ3GeometryObject gives me a >TriMesh with no attributes; both texture and diffuse color have been >lost. > >Unfortunately, I'm not set up at the moment to test this under QD3D, >so I'm unsure whether this is a bug in Quesa, or an error on my >part. It's acting as though Q3TriMesh_GetData is not actually >cloning the attributes, yet Q3TriMesh_EmptyData is nonetheless >releasing them. You're talking about the triMeshAttributeSet field, not face or vertex attributes, right? I looked at the source code, and it seems to be doing the right thing: Getting a new reference to the attribute set on Q3TriMesh_GetData, and releasing that reference on Q3TriMesh_EmptyData. -- James W. Walker, ScriptPerfection Enterprises, Inc. <http://www.write-brain.com/> |