Sign in to follow this  
Followers 0
gchris6810

Finding constant buffer data requirements

3 posts in this topic

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
0

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.

1

Share this post


Link to post
Share on other sites

I also have sample code that you can check for how to interrogate all of the various structs and descriptions in the Hieroglyph 3 framework.

1

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  
Followers 0