Skip to main content
gamedev.net
🔒 Locked

SetStreamSource?

Started by TaintedFire Apr 16, 2001 at 5:29 PM 0 replies 750+ views
Original Post
TaintedFire
TaintedFire
Does calling SetStreamSource incur a (serious) overhead? Enough to compare with locking a VB and filling it with data? The reason I ask this is that I could use the Vertex Shaders to render from two different streams, one containing (constant) XY and UV coordinates, the other containing colour information, in one D3DCOLORVALUE. Then I could SetStreamSource with a different location and DrawPrimitive from 0, as to use the color value. I know this is a kind of stupid way to do it, but I''m creating a font engine. The XYZ and UV would be constant, and I would use matricies to transform the XYZ onto the screen. However the colour (I hope) would be different. I could fill the whole VB with the colour (to avoid SetStreamSource), or fill the texture with my desired colour, or setting the diffuse colour for *each and every* vertex (involving locking and unlocking the VB) but that would not be *that* efficient. I would then render it with DrawPrimitive, using the alpha channel in my texture. I know this may sound like a really stupid way to do it, but any help or suggestions, would be appreciated, -TF
Sir Melvalot
Sir Melvalot
SetStreamSource() is a just a state change. It should be more efficient than repeatedly locking the vertex buffer. There is something on streams at the Radeon SDK that may help :

http://www.ati.com/na/pages/resource_centre/dev_rel/sdk/RadeonSDK/Html/Info/DirectX8.html

Topic Locked

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

Sign in to reply to this topic.