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

DrawPrimitiveUP simple question

Started by ProgrammerDX Sep 21, 2010 at 6:55 AM 2 replies 900+ views
Original Post
ProgrammerDX
ProgrammerDX
DrawPrimitiveUP

DrawPrimitiveUP is slower than DrawPrimitive because DirectX will make a temporary VertexBuffer by itself every frame and every call to DrawPrimitiveUP. Somehow DirectX will also clean up (Release) that VertexBuffer after Present() (I'm guessing).

Is it faster to do this yourself, as in making that vertex buffer yourself every frame and keep an array of VertexBuffers and then clean that up (Release) after you did PresentScene for that frame?
Evil Steve
Evil Steve
More or less, yes. I believe that D3D keeps a vertex buffer around internally for this, so it shouldn't be that slow.
Note that DrawPrimitiveUP doesn't exist past DX9, so you might as well get used to not having it and do it yourself.
ProgrammerDX
ProgrammerDX
How would particle systems work without DrawPrimitive?

Topic Locked

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

Sign in to reply to this topic.