Re: [PyOpenGL-Users] constructing a VBO containing mixture of floats, ubytes, etc
Brought to you by:
mcfletch
From: Greg E. <gre...@ca...> - 2011-02-04 21:31:53
|
Jonathan Hartley wrote: > It surprised me to hear that a single VBO can't hold different data > types. SuperBible tentatively confirms what Steve says. Page 485 (5th ed.): > > It is also possible to store several different attributes in a > single buffer by interleaving them. To do this, call > glVertexArrayPointer with the stride param set to the distance (in > bytes) between attributes *of the same type.* I think you may be misinterpreting that. By "type" there I don't think it means data type, but rather the "kind" of value, i.e. coordinates, normal, colour, etc. What it's trying to say is that the stride is the distance from one entire record to the next. Not sure about VBOs, but the various predefined formats for interleaved vertex arrays under the old system certainly include some with mixed data types. -- Greg |