Thread: RE: [Plib-devel] ssgVtxArray fixes.
Brought to you by:
sjbaker
From: Vallevand, M. K <Mar...@UN...> - 2000-08-07 15:08:03
|
I'll try it ASAP. I wrote the ssgVtxArray, and use it a lot. I'm glad that you found and fixed the problems. I haven't looked at the code for some time. As for index arrays of 'int', that is just ignorance. If the OpenGL calls will take arrays of 'short', I see no problem with that change. Regards. Mark K Vallevand ma...@rs... Never try and teach a pig to sing: it's a waste of time, and it annoys the pig. > > Anyway - could someone who uses ssgVtxArray please try it out > and let me know > if I broke something. > > -- > Steve Baker |
From: Dave M. <Dav...@dy...> - 2000-08-07 17:32:43
|
Steve wrote: > I've fixed a small mountain of errors in ssgVtxArray... <snip> > So, that's all committed. thanks! > Is there some reason why the index array is an array of > 'int'? > Since the underlying > SSG classes don't allow more than 32k > vertices/normals/colours/texcoords per leaf > node - it seems unlikely that this would be needed - and > there are certainly speed > improvements to be had from using a 'short' index array. > not AFAICT. Mark? we should make it a 'short' like you say. > Anyway - could someone who uses ssgVtxArray please try it out > and let me know if I broke something. > i tested all my models out with the new source and they still work happy plibber, --Dave |
From: Vallevand, M. K <Mar...@UN...> - 2000-08-07 17:52:10
|
I'm going to get the latest CVS tonight, and try it out. Then, it should be a simple thing to either: - change the index array to short, breaking most code using ssgVtxArray, - or, add a new index array of shorts and updating ssgVtxArray to handle both types, and existing code using ssgVtxArray will continue to work. If I'm happy, I'll even try to check it into CVS. Then I'll try to clean up a couple of utility classes I'm using in my new game, so they can be shared with others. But, that is another message. Regards. Mark K Vallevand ma...@rs... Never try and teach a pig to sing: it's a waste of time, and it annoys the pig. -----Original Message----- From: Dave McClurg [mailto:Dav...@dy...] Sent: Monday, August 07, 2000 12:33 PM To: 'pli...@li...' Subject: RE: [Plib-devel] ssgVtxArray fixes. Steve wrote: > I've fixed a small mountain of errors in ssgVtxArray... <snip> > So, that's all committed. thanks! > Is there some reason why the index array is an array of > 'int'? > Since the underlying > SSG classes don't allow more than 32k > vertices/normals/colours/texcoords per leaf > node - it seems unlikely that this would be needed - and > there are certainly speed > improvements to be had from using a 'short' index array. > not AFAICT. Mark? we should make it a 'short' like you say. > Anyway - could someone who uses ssgVtxArray please try it out > and let me know if I broke something. > i tested all my models out with the new source and they still work happy plibber, --Dave |
From: Wolfram K. <w_...@rz...> - 2000-08-08 18:10:54
|
"Vallevand, Mark K" <Mar...@UN...> wrote: >I'm going to get the latest CVS tonight, and try it out. Good! Could you please try to compile plib and the examples "straight out of the box"? It seems to work for Dave, but I still think the MSVC-project-files are slightly broken. I am prepared to fix it, but only if we are sure its broken :-). >Regards. >Mark K Vallevand ma...@rs... Bye bye, Wolfram. |
From: Chris P. <bi...@se...> - 2000-08-08 04:04:13
|
>Is there some reason why the index array is an array of 'int'? Since the underlying >SSG classes don't allow more than 32k vertices/normals/colours/texcoords per leaf >node - it seems unlikely that this would be needed - and there are certainly speed >improvements to be had from using a 'short' index array. > I was under the impression that dealing with ints is usually faster that shorts on 32 bit processors. Are you talking about speed improvments from code optimization or something else like data cacheing? Regards Chris. |
From: Steve B. <sjb...@ai...> - 2000-08-08 05:20:55
|
Chris Phillips wrote: > > >Is there some reason why the index array is an array of 'int'? Since the > underlying > >SSG classes don't allow more than 32k vertices/normals/colours/texcoords > per leaf > >node - it seems unlikely that this would be needed - and there are > certainly speed > >improvements to be had from using a 'short' index array. > > > I was under the impression that dealing with ints is usually faster that > shorts on > 32 bit processors. Are you talking about speed improvments from code > optimization or something > else like data cacheing? Well, doing *math* on ints is probably faster than shorts - but this is largely a matter of RAM bandwidth and cache sizes and such. I'm no expert either - but I was under the impression that for simple indexing and such, shorts can be faster. -- 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 |
From: Eero P. <epa...@ko...> - 2000-08-08 07:36:31
|
Steve Baker wrote: > > > Well, doing *math* on ints is probably faster than shorts - but this is largely > a matter of RAM bandwidth and cache sizes and such. I'm no expert either - but > I was under the impression that for simple indexing and such, shorts can be > faster. > At least Pentium Pro (and I suspect this might be true for Pentium II / III also) can suffer badly if memory accesses to 32 bit and 16 bit quantities are interleaved. Something to do with read accesses not been able to check the outgoing write queue and thus requiring a queue flush, or something like that... Still the smaller memory footprint might be worth the trouble, but I have seen this problem as spikes in the VTune display. (I have also seen spikes caused by cache misses, and they can be worse) Eero |
From: Vallevand, M. K <Mar...@UN...> - 2000-08-08 15:17:36
|
I didn't have time to make any changes last night, however, my inclination is to support both shorts and ints, unless someone presents a strong argument for only shorts. The latest CVS with the ssgVtxArray changes works just fine. I was able to get that far... Regards. Mark K Vallevand ma...@rs... Never try and teach a pig to sing: it's a waste of time, and it annoys the pig. > Yep - when you called 'glDrawElements' you said: > > glDrawElements ( gltype, num_vertices, GL_UNSIGNED_INT, ii ) ; > ^^^^^^^^^^^^^^^ > Change this to > GL_UNSIGNED_SHORT > > ..you can also pass GL_UNSIGNED_BYTE - but I think that's *too* small. > > This would be a non-reverse-compatible change though - how many people > are using ssgVtxArray and would be upset by such a change? > > -- > Steve Baker |
From: Vallevand, M. K <Mar...@UN...> - 2000-08-08 18:33:20
|
Yes, the MSVC project files seem to be slightly broken. I've fixed them up for myself, and will try to check them in real-soon-now. But, I want to double check that they are really what they should be. The latest CVS works fine, except for the minor project file tweeks. If you want to fix them up, go ahead. Regards. Mark K Vallevand ma...@rs... Never try and teach a pig to sing: it's a waste of time, and it annoys the pig. > -----Original Message----- > From: Wolfram Kuss [mailto:w_...@rz...] > Sent: Tuesday, August 08, 2000 1:11 PM > To: pli...@li... > Subject: Re: [Plib-devel] ssgVtxArray fixes. > > > "Vallevand, Mark K" <Mar...@UN...> wrote: > > >I'm going to get the latest CVS tonight, and try it out. > > Good! > Could you please try to compile plib and the examples "straight out of > the box"? It seems to work for Dave, but I still think the > MSVC-project-files are slightly broken. I am prepared to fix it, but > only if we are sure its broken :-). > > >Regards. > >Mark K Vallevand ma...@rs... > > Bye bye, > Wolfram. > > _______________________________________________ > plib-devel mailing list > pli...@li... > http://lists.sourceforge.net/mailman/listinfo/plib-devel > |
From: Wolfram K. <w_...@rz...> - 2000-08-11 13:56:51
|
"Vallevand, Mark K" <Mar...@UN...> wrote: >Yes, the MSVC project files seem to be slightly broken. Ok, fixed. Everything compiles for me now, the library itself and the examples, in release and debug builds. Bye bye, Wolfram. |
From: Vallevand, M. K <Mar...@UN...> - 2000-08-11 14:47:08
|
Excellent! I'll pull them down and see if they work for me, too. BTW, CVS/SSH commit works for me now! I needed to checkout the entire PLIB with my userid instead of anonymous the first time. Thanks to everyone! Regards. Mark K Vallevand ma...@rs... Never try and teach a pig to sing: it's a waste of time, and it annoys the pig. > -----Original Message----- > From: Wolfram Kuss [mailto:w_...@rz...] > Sent: Friday, August 11, 2000 8:57 AM > To: pli...@li... > Subject: Re: [Plib-devel] ssgVtxArray fixes. > > > "Vallevand, Mark K" <Mar...@UN...> wrote: > > >Yes, the MSVC project files seem to be slightly broken. > > Ok, fixed. Everything compiles for me now, the library itself and the > examples, in release and debug builds. > > Bye bye, > Wolfram. > > _______________________________________________ > plib-devel mailing list > pli...@li... > http://lists.sourceforge.net/mailman/listinfo/plib-devel > |
From: Steve B. <sjb...@ai...> - 2000-08-08 03:55:21
|
"Vallevand, Mark K" wrote: > > I'll try it ASAP. I wrote the ssgVtxArray, and use it a lot. I'm glad > that you found and fixed the problems. I haven't looked at the code for > some time. > > As for index arrays of 'int', that is just ignorance. If the OpenGL > calls will take arrays of 'short', I see no problem with that change. Yep - when you called 'glDrawElements' you said: glDrawElements ( gltype, num_vertices, GL_UNSIGNED_INT, ii ) ; ^^^^^^^^^^^^^^^ Change this to GL_UNSIGNED_SHORT ..you can also pass GL_UNSIGNED_BYTE - but I think that's *too* small. This would be a non-reverse-compatible change though - how many people are using ssgVtxArray and would be upset by such a change? -- 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 |
From: Dave M. <dp...@ef...> - 2000-08-08 05:51:11
|
Steve Baker wrote: > Yep - when you called 'glDrawElements' you said: > > glDrawElements ( gltype, num_vertices, GL_UNSIGNED_INT, ii ) ; > ^^^^^^^^^^^^^^^ > Change this to > GL_UNSIGNED_SHORT > > ..you can also pass GL_UNSIGNED_BYTE - but I think that's *too* small. > > This would be a non-reverse-compatible change though - how many people > are using ssgVtxArray and would be upset by such a change? I'm using it but would welcome any change that makes it more efficient. I wasn't aware of the 32K limit of points in a leaf you mentioned. Where does that limit occur in the source? Should we check that limit when models get loaded? --Dave |