[Plib-devel] ssgVtxArray bug(s) ?
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-08-05 04:50:28
|
I was looking in the ssgVtxTable class code and spotted a bug in the 'transform' member function. (It was translating the surface normals as well as rotating them!!) I wondered whether the same bug might be in ssgVtxArray also - which it was - but that's neither here nor there... but in the process of looking around in that code, I noticed that in several places there is code like this: for ( i = 0 ; i < getNumIndices() ; i++ ) { int ii = *( indices->get(i) ); ...do something to vertices->get(ii)... } ...I'm not entirely up to speed on the ssgVtxArray code - but doesn't that mean that there is a potential for some vertices to get operated on more than once? For example, I might have an index array like this: 0 1 2 3 3 2 1 0 ...if I was drawing two back-to-back quads using GL_QUADS or something. In some cases (eg computing a bounding sphere), this is just inefficient, but in the case of the 'transform' function (for example) - it means that some vertices will get transformed twice just because they are referenced twice. I *think* that the code should (in each case) just use the underlying ssgVtxTable code - which will work fine. I'm suprised that this wouldn't have shown up MUCH earlier. Do I have a crossed wire here - or is this really a bug? Is anyone actually using ssgVtxArray? -- Steve Baker HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sourceforge.net http://tuxaqfh.sourceforge.net http://tuxkart.sourceforge.net http://prettypoly.sourceforge.net |