Jump to content
  • Advertisement
Sign in to follow this  
Aqua Costa

[DirectX 10] Where should I create blend states

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

Where should I create my blend states objects? -In my application code(C++)? -Or in HLSL .fx file? Which option is the best?

Share this post


Link to post
Share on other sites
Advertisement
Best is a relative term. If you would like for the Effects library to manage your state blocks for you, then use Effects. This can be nice since it allows you to see more over your overall shadering algorithm in the same place, instead of a core part of the way your algorithms work being 'hidden' in the engine code. In addition Effects already has code internal that can decide if a state needs to change for the next render pass.

But you can also manage them yourself in the engine code. There really isn't any speed benefit since Effects uses the same runtime API to set state blocks as you would. You can also write the code necessary to determine if the state even needs changing.

If you want to know how Effects works, you can look in the D3D11 SDK, the source code for Effects11 is public now.

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!