Jump to content
  • Advertisement
Sign in to follow this  
fread

DirectX10 - Rasterizer state

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

according to this tutorial:

http://takinginitiative.wordpress.com/2008/09/02/directx10-tutorial-2-basic-primitive-rendering/

do I have to create a separate rasterizer state for each configuration at my application startup?

Let's say I want to draw faces with different face culling methods (back or front or disabled).

Do I have to create 3 times different rasterizer states?

Thanks in advence!

Share this post


Link to post
Share on other sites
Advertisement

isn't it silly? I mean... a lot of code to write just to change the single cull state

Share this post


Link to post
Share on other sites

What you can do is create a wrapper class for the D3D10_RASTERIZER_DESC which sets everything to its default value. Then you can change only the values you want. So you don't have to type that all the time. In my case I created a wrapper class with D3D11_RASTERIZER_DESC(I'm using DirectX 11) as its private member. But you can also create a struct or class that inherits from D3D10_RASTERIZER_DESC.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!