How to render Vertex Buffer without any IndexBuffer?


I have got Dynamic VertexBuffer to be rendered I can not have a constant Index Buffer. So can I render the Vertex Buffer alone.

Thanks and Regards,

You can use GraphicsDevice.DrawPrimitives or GraphicsDevice.DrawUserPrimitives to draw without an index buffer.

Hi Jjagg,

Thanks for the quick reply! Please let me know is there any performance overhead without Indexing? Hopefully the Rendering output will be polygons not point-clouds right?


Not using an index buffer is identical to just having an index buffer of sequential numbers. Not sure if it matter for performance. If you’re not just drawing loose triangles you’ll have duplicate vertices and using an index buffer might help send less (duplicate) vertices to the GPU. That means you have to send less data to the GPU which can improve performance if that’s your bottleneck. If you have large models and not loose triangles or lines you can probably benefit from using indexbuffers.

Thanks a lot. I will check and update. :slight_smile:

In most cases, meshes are closed polyhedrons, and one vertice typically belong to at least 3/4 triangles.

This means that if you don’t want to optimize your vertex buffer, its size would be 3 to 4 times larger. You may do it for small meshes, but when it gets large, it’s better to get it optimized.

Right now I started working on a MeshBuilder class as you see in this thread from yesterday.
It will make things more simple, I’ll be glad to share when done :slight_smile:


How index buffers help reduce the amount of duplicates: (opengl but the idea is the same for indexed data)

1 Like

Thanks a lot @raizam, I do agree your point that Index Buffer is used for optimization.
But my scenario is different my vertex count is dynamic for each frame, how can I mange to create dynamic index buffer for each frame.

Ultimately I want display the Kinect data as 3D model.

Please advice me if you got any idea on it.

I am looking forward to your MeshBuilder release anyway!!


To display a model using kinect’s data (skeleton and joints I suppose), you will have to convert coordinates from “kinect space” to your app world.
You can have a look here, at the time was coding with kinect I used this website:

from where you can find resouces. Be warned it is XNA related, but it should be good to go. And it concerns Kinect SDKs 1.5, 1.6, 1.7, 1.8.

What I don’t catch is why the vertexes and indexes change between frames ? If the model (Avataring for ex) moves, some triangles will be culled and so forth won’t be drawn as usual if using culling.

1 Like

hey @Praptobala, if your mesh is dynamic and changes at each frame I believe such meshBuilder would be useless in that context.
Not sure when I’ll have a meshbuilder ready, really can’t say right now. so hopefully before 2017… is this a fine delay for you? =)

1 Like

Thanks! @Alkher & @raizam