RE: [Plib-devel] Q1: Shared vertex data
Brought to you by:
sjbaker
From: Vallevand, M. K <Mar...@UN...> - 2000-05-08 17:15:41
|
-----Original Message----- From: Dave McClurg [mailto:Dav...@dy...] Sent: Monday, May 08, 2000 12:03 PM To: 'pli...@li...' Subject: RE: [Plib-devel] Q1: Shared vertex data > When I looked at vertex arrays, it was not clear to me how > they could even be used to share vertex data, which is my > aim. > http://www.sgi.com/software/opengl/examples/redbook/source/varray.c <http://www.sgi.com/software/opengl/examples/redbook/source/varray.c> DOH! I get it now... > I don't have the SSG source code to quickly look at, but > I thought that ssgVtxTable used vertex arrays. It seems > like a natural fit. > ssgVtxTable stores the vertex data in an array but passes it to OpenGL via glVertex glBegin ( gltype ) ; for ( i = 0 ; i < num_vertices ; i++ ) glVertex3fv ( vx [ i ] ) ; glEnd () ; This is nice and straight-forward but not exactly optimal for large models. A seperate class, using vertex arrays, would be a useful addition to SSG. This might be worth looking at. Hmm, Hmm. You could use the existing SSG collection classes. A class named ssgVtxArray, or some such thing. Hmm. Let me play with the idea for a while. --Dave Regards. Mark K Vallevand ma...@rs... Outside of a dog, a book is man's best friend. Inside of a dog, its too dark to read. - Groucho |