Jump to content


Batching/Vertex Buffers


1 reply to this topic

#1 ttigue

    New Member

  • Members
  • Pip
  • 7 posts

Posted 17 September 2003 - 06:21 PM

I have a question about batching. I have seen it mentioned and described to an extent in some tutorials. From what I can understand it is using one large vertex buffer so that the graphics card does not have to switch to other vertex buffers, right? Can I use one vertex buffer for two different models. For example, if I had a cube and sphere model put into one vertex buffer. Then I use Index buffers like this-

SetMatrices()
SetMaterials()
DrawIndexedPrimitive(vertex_buffer,cube_start,cube_end....)
SetMatrices()
SetMaterials()
DrawIndexedPrmitive(vertex_buffer,sphere_start,sphere_end....)

Is that right and/or efficient? Or am I totally off base?

#2 anubis

    Senior Member

  • Members
  • PipPipPipPip
  • 2225 posts

Posted 17 September 2003 - 06:41 PM

yep, you got the idea
If Prolog is the answer, what is the question ?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users