Jump to content
  • Advertisement
Sign in to follow this  
Bangladesh

DX10: InputLayer - best practise

This topic is 4012 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'm making a container for a shader-class that should include everything needfull for loading and settings effect-files in DX10. Apart from effect and technique-members, would it be wise to also add the InputLayer? Or is that better contained in a vertex-class? Or would it be better of as a stand-alone list with pointer from which every other class collects? Shortly, what is best practise here in terms of ease of use and memory-handling?

Share this post


Link to post
Share on other sites
Advertisement
As always it depends.

The input layout binds the vertex buffer format and the vertex shader input layout together. If you have restrictions about the combination of vertex classes with shader classes you may be able to store the input layout in one of them. If you allow free mixing you need to keep it independent. In this case you may use a hash map or something like this to find the right input layout for a combination of shader and vertex.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!