Skip to main content
gamedev.net
🔒 Locked

Vertex Buffer question

Started by DJKAOS Jan 17, 2003 at 1:23 AM 2 replies 350+ views
Original Post
DJKAOS
DJKAOS
Do I need to create a Vertex buffer for every object/shape I draw? I did a tutorial where you draw a triangle. anyway if I want to draw another triangle/square/whatever in a diffrent location to I need to have another vertex buffer? like this LPDIRECT3DVERTEXBUFFER9 g_pVB = NULL; // Buffer to hold vertices
IFooBar
IFooBar
You can have another vertex buffer for another object, but you can also add the new objects vertices to your existing vertex buffer. for example you can hvae the first 3 vertices in a vetrtex buffer for the triangle then the next 4 vertices be for a square or something...


:::Al:::
[Triple Buffer V2.0] - Resource leak imminent. Memory status: Fragile
[size=2]aliak.net
spillsome
spillsome
Check the Billboard sample in the Directx SDK Samples directory.

They use only one vertex buffer for all the trees they draw on screen...

Topic Locked

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

Sign in to reply to this topic.