Sign in to follow this  
gchris6810

Finding constant buffer data requirements

Recommended Posts

Hi,

 

I'm trying to write a system where the engine can find what data requirements any given constant buffer has and then supply that data in the correct order to the shader. Is there a way to find this information using Direct3D 11 that would be practical for game engine use? Thanks.

Edited by gchris6810

Share this post


Link to post
Share on other sites

You'll want to obtain the ID3D11ShaderReflection interface for a shader, which you can do by calling D3D11Reflect. One you have that interface, you can then use it to obtain an ID3D11ShaderReflectionConstantBuffer interface for a given constant buffer. That interface has members that will give you information about the layout of that constant buffer.

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