Jump to content

  • Log In with Google      Sign In   
  • Create Account


Finding constant buffer data requirements


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 gchris6810   Members   -  Reputation: 207

Like
0Likes
Like

Posted 26 January 2014 - 03:18 AM

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, 26 January 2014 - 03:19 AM.


Sponsor:

#2 MJP   Moderators   -  Reputation: 10130

Like
1Likes
Like

Posted 26 January 2014 - 03:30 AM

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.



#3 gchris6810   Members   -  Reputation: 207

Like
0Likes
Like

Posted 26 January 2014 - 07:57 AM

Okay thanks a lot that was the answer I was looking for.



#4 Jason Z   Crossbones+   -  Reputation: 4599

Like
1Likes
Like

Posted 26 January 2014 - 08:58 AM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS