Sign in to follow this  

Optimisations...

This topic is 4731 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. I am trying to speed up my program slightly and I have a question... Which is faster, locking a vertex buffer, writing four vertices to it, and then unlocking it... or changing the stream source? Thanks in advance for any help. Mark Coleman

Share this post


Link to post
Share on other sites
That depends on the vertex buffer.

If you have one big vertex buffer that's streaming, and you lock a previously un-written area with NOOVERWRITE (and DISCARD at the end), the lock-write-unlock MIGHT have a chance of being faster. Locking any other kind of buffer is likely to stall the GPU in a way that simply setting the stream source won't.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Changing your stream would probably be a little faster. But I don't think it's there you are losing your time in the application.

Try to use a timing tool to find where the really big losses occur. I think you will find that there are 2-3 really big time consuming functions.

Share this post


Link to post
Share on other sites

This topic is 4731 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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