Skip to main content
GameDev.net gamedev.net
🔒 Locked

DrawPrimitive() without a vertex buffer

Started by Foxman May 13, 2003 at 5:54 PM 5 replies 350+ views
Original Post
Foxman
Foxman
I just started teaching myself Direct3D, and the books that I have all talk about drawing primitives with a vertex buffer being set up before the call to DrawPrimitive(). I was wondering if its possible to use the DrawPrimitive() function without using a vertex buffer, and if so how would you do that? Also, is a vertex buffer always faster than a regular vertex array, or does it depend on the size of the vert array? Thanks in advance for any replies.
Foxman
Foxman
Please forgive the triple posting. Probably should have left the typos instead of changing and clicking post again.
billybob
billybob
DrawPrimitiveUP, but its not a good idea to use.
RhoneRanger
RhoneRanger
And instead of making a new post for a spelling error, just click "Edit Message"

PS.

Just curious what is wrong with DrawPrimitiveUP?
TechleadEnilno, the Ultima 2 projectwww.dr-code.org/enilno
Donavon Keithley
Donavon Keithley
For a small number of vertices the data is copied into an internal VB that the runtime creates. For larger numbers, the array is passed to the driver which then has to either make a copy or block until the tris are rendered.

If you're just drawing a handful of tris, DPUP isn't a big deal but don't use it for heavy lifting if you care about performance.

Edit: Contrary to the post on the other thread, this internal VB is not created and destroyed each time you call DPUP. It persists. (At least this is how it's been described several times by members of the DX team.)

[edited by - Donavon Keithley on May 13, 2003 8:52:53 PM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.