Is there a faster way to set the vertex buffer data than SetVertexBuffer? It seems to cause massive performance drops and is really slow :/.
Is there a faster way to set the vertex buffer data than SetVertexBuffer ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
SetVertexBuffershould be the fastest way of assigning vertex data as this method is directly accessing the DirectX 9 API.As far as I know (working with DX11) there is no other way of assigning vertex data. Even when you call
DrawUserPrimitivesorDrawUserIndexedPrimitivesa buffer is created and then sent to the device. The difference here is that this buffer will be created for every draw call, as you could have changed the data in the meantime, so it should be even slower.Make sure it is actually the SetVertexBuffer call that is slowing down your application. If it is you are maybe just sending a lot of data to the device, which should take a while. But I cannot tell without code.
Many individual calls to
SetVertexBufferwill in fact slow down the application. And sending two buffers to the device will most likely be slower than a single buffer containing the combined data.Some tips:
But as always, performance in 3D applications is a fuzzy subject. Soon there could be other bottlenecks (shaders, textures, etc.) and you may have to break with the above guidelines.