Sign in to follow this  
Kest

SetStreamSource, OffsetInBytes

Recommended Posts

The docs say to look for the D3DDEVCAPS2_STREAMOFFSET flag to see if this is supported, but it doesn't really go into any detail about it's usefulness (that I could find). So what exactly is it good for? Is it an optimization to set streams at an offset when the data before that offset will not be used? Or is this particular offset just used for other rendering capabilities, such as rendering with multiple streams? If it is an optimization, does the setting make any data sent to other rendering functions relative to it? Or does one just set the offset, not really caring if it's supported or not? I appreciate any information [smile]

Share this post


Link to post
Share on other sites
Setting an offset to a stream makes DX ignore the first N bytes of the vertex buffer, as though the buffer only starts after N bytes.
When using only a single stream, this is the equivalent of using the StartAt parameters of the various draw function, except it allows for a byte offset, and not an offset in elements.

When using multiple streams this becomes much more useful, since it allows you to offset one stream relative to another. I can't quite think of any exact uses at the moment, but this could surely come in handy.

Hope this helps.

Share this post


Link to post
Share on other sites
Quote:
Original post by sirob
Setting an offset to a stream makes DX ignore the first N bytes of the vertex buffer, as though the buffer only starts after N bytes.
When using only a single stream, this is the equivalent of using the StartAt parameters of the various draw function, except it allows for a byte offset, and not an offset in elements.

So as long as I'm setting the offsets in the individual draw calls, the functionality is the same? That sounds good to me.

Quote:
Hope this helps.

It does. The only reason your rating doesn't hint at that fact is because I had you maxed out [smile]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this