• Advertisement
Sign in to follow this  

[SlimDX] What are Constant Buffers?

This topic is 3492 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

Hi! I read a lot about constant buffers and how they can speed up rendering in DirectX 10. I want to implement them into my application and I think I need one Constant Buffer for all effect parameters that change every frame (all Matrices, Light parameters...) and one for the parameters that changes every time I render an object using an effect. Is this the correct way to implement Constant Buffers and do can I use them with SlimDX? Can somebody give me a short explanation of the best practice or even some code snippets? Thanks! Christian

Share this post


Link to post
Share on other sites
Advertisement
""
and one for the parameters that changes every time I render an object using an effect.""

I don't think thats correct.

I don't know much about slim DX since I use "normal" dx10.
you should pack variables that are updated at the same frequency (once per frame, once in the entire life of the application, once every 10 frames,...) in the same cbuffer. it's recommended to have around 5 constant buffers max per shader.

here is something, maybe the'll make things a bit more clear :P

http://www.programmersheaven.com/2/FAQ-DIRECTX10-What-are-Constant-Buffers

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement