Jump to content
  • Advertisement
Sign in to follow this  
maya18222

render states

This topic is 3821 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 was just wondering whether these 2 approaches of setting up render states are the same thing, //from .cpp device->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE); device->SetRenderState(D3DRS_ZWRITEENABLE, TRUE); device->SetRenderState(D3DRS_ZFUNC, D3DCMP_LESSEQUAL); etc etc and //from .fx effect state [ [index] ] = expression; http://msdn.microsoft.com/en-gb/library/bb173347(VS.85).aspx are they both doing the same thing?, is one technique better than the other? i prefer the first as it enables me to set up states easier and changing them on the fly, rather than harding coding them in the .fx, or passing them as arguments to the effect.

Share this post


Link to post
Share on other sites
Advertisement
Yes, they are the same. I don't know what you mean by "hardcoding them in the effect". You do realize that hardcoding refers to the actual source code, and that loading the states from file is actually much more flexible?

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!