From: Steve B. <sjb...@ai...> - 2000-02-20 06:24:34
|
"Curtis L. Olson" wrote: > I was taking a quick look at the new ssgVtxTable's tonight and trying > to get a feel for how they work. As I understand it, these take care > of freeing up the memory used by the arrays fed to it, correct? Yes - that was the main change I wanted to effect. > I just want to double check to make sure I'm understanding this. Yep. > So in my application I can do something like: > > for each structure { > ssgVertexArray *vl = new ssgVertexArray; > ssgNormalArray *nl = new ssgNormalArray; > ... > > // fill in these structures with my data > > ssgVtxTable( GL_WHATEVER, vl, nl, ... ); > } Yes. > So from the calling application I can just allocate all the arrays I > need, hand them to ssgVtxTable, and completely forget about them after > that, right? ssg will free up the memory when the node is removed, > right? Right. The arrays are reference counted - so you can use the same array for multiple VtxTables and they'll be deleted only when they are no longer needed. -- Steve Baker http://web2.airmail.net/sjbaker1 sjb...@ai... (home) http://www.woodsoup.org/~sbaker sj...@ht... (work) |