
VBO's and InterleavedArrayFormat
Posted Friday, 1 May, 2009 - 10:12 by Soundbomber inI have buffers that contain 2 set of vertices (in interleaved array format) and two sets of indices (4 buffer objects in all).
I am drawing my objects thus:-
oGL.InterleavedArrays(InterleavedArrayFormat.T2fC4fN3fV3f, 0, Nothing) oGL.DrawElements(BeginMode.Triangles, oObject.oSolidIndices.Length, DrawElementsType.UnsignedShort, IntPtr.Zero)
My question is this, how do I draw one object (buffers 0 and 1) and then draw the next object (buffers 2 and 3)?
When using interleaved arrays, do I have to use oGL.BindBuffer to specify which object I am referring to or does the interleaved format handle that?


Comments
Re: VBO's and InterleavedArrayFormat
Just to clarify, I want to draw 2 objects: 1 - A solid object, 2 - A wire frame object
Therefore I have 4 buffer objects: 1 - Solid Vertices (interleaved), 2 - Solid Indices, 3 - Wire frame vertices (interleaved), 4 - Wire frame indices.
I want to draw the solid object and then the wire frame object, but am unsure as how to point to the correct buffer objects.
My code works for a single object (2 buffer objects - 1 - Vertices (interleaved), 2 - Indices), but can't seem to get more than one to work.
Hope this makes sense.
Re: VBO's and InterleavedArrayFormat
You have to bind the relevant buffers before rendering each object, i.e.:
Re: VBO's and InterleavedArrayFormat
Cool. Thank you.