Jump to content
  • Advertisement
Sign in to follow this  

An Oddity About EffectHandles

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

I was doing some shader work earlier today, and noticed something quite odd in my opinion about how EffectHandle's work. Take a look at this line of code: EffectHandle.FromString("insert favorite parameter name") Now, the odd thing that I noticed, is that no where are the EffectHandles actually associated with any particular instance of an Effect. Which made me wonder, what exactly is going on behind the scenes here? Is the EffectHandle just some sort of fancy string wrapper?¿Or do they get automatically associated with the loaded effect when effect.begin(...) is called? Or are they bound the first time the effect.SetValue(handle, value) function is called? Oddly enough, the august sdk says: An EffectHandle object is used as a unique identifier for a specific effect. Methods that work with effects often require the effect handle object of the Strange that it would mention "unique" and "specific effect".

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!