Jeff Russell
06-01-2007, 01:48 PM
Hey, quick question:
Is there some documentation available anywhere that details what vertex formats are 'fast' and which require a slow conversion?
For example, say I want to pass in something like color for each vertex. If I format the colors as 4 component GL_UNSIGNED_BYTE it runs fine, but if I make it 3 component GL_UNSIGNED_BYTE I see a rather substantial performance hit. Ditto for 3 or 4 component GL_BYTE. Plus there's still signed and unsigned shorts, halfs, floats and doubles (although floats always seem to work well).
Using glVertexAttribPointer seems to open up more possibilities for formatting than glTexCoordPointer, glColorPointer etc - it'd be nice to know what works well!
I would expect different cards/vendors may behave differently in this regard, but I would love to find out whats fast and whats not for any recent hardware.
Is there some documentation available anywhere that details what vertex formats are 'fast' and which require a slow conversion?
For example, say I want to pass in something like color for each vertex. If I format the colors as 4 component GL_UNSIGNED_BYTE it runs fine, but if I make it 3 component GL_UNSIGNED_BYTE I see a rather substantial performance hit. Ditto for 3 or 4 component GL_BYTE. Plus there's still signed and unsigned shorts, halfs, floats and doubles (although floats always seem to work well).
Using glVertexAttribPointer seems to open up more possibilities for formatting than glTexCoordPointer, glColorPointer etc - it'd be nice to know what works well!
I would expect different cards/vendors may behave differently in this regard, but I would love to find out whats fast and whats not for any recent hardware.