Skip to main content
gamedev.net
🔒 Locked

SetStreamSource multiple streams using same VB?

Started by Prince0fPersia Oct 18, 2005 at 12:43 AM 0 replies 900+ views
Original Post
Prince0fPersia
Prince0fPersia
Is it bad to use same Vertex Buffer to set multiple stream sources using SetStreamSource? i mean like

LPD3DVERTEXBUFFER9 pVB;

pDevice->SetStreamSource(0, pVB, 0, sizeof(VERTEX1));
pDevice->SetStreamSource(1, pVB, 100, sizeof(VERTEX2));
pDevice->SetStreamSource(2, pVB, 300, sizeof(VERTEX3));
pDevice->SetStreamSource(3, pVB, 700, sizeof(VERTEX4));


Scythen
Scythen
You will probably see different results on different cards and different drivers.

If I had to guess, the drivers and hardware are probably set up to be most efficient when using different vertex buffers for each stream. I can imagine some locking/synchronization overhead when reading from one vertex buffer but that’s a guess.

Probably have to run some tests of your own to figure that one out.

Topic Locked

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

Sign in to reply to this topic.