Jump to content
  • Advertisement
Sign in to follow this  
freka586

[SlimDX] Effect.SetValue(bool) issues?

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

After the upgrade to the September release of SlimDX I can no longer execute code that sets Effect parameters of type bool. All other types work fine. As there were other changes (SetTexture must now be used for Texture types), would this perhaps be a bug rather than user error? Since most of my previous questions along these lines have been my own fault rather than bugs I would still not rule that out :) Can I workaround this for the September release or would I be better off with the June release, where this worked? Thanks, Fredrik

Share this post


Link to post
Share on other sites
Advertisement
Yes, using booleans for SetValue right now is broken, since in .NET booleans are one byte while DirectX expects a Win32 BOOL, which is really just a 4 byte integer. We will have this fixed up soon, but in the mean time you should be able to work around this by using SetValue with an integer and passing a 1 or a 0 instead of true or false.

Once we have the fix done, you will either have to wait for the next release (slated for November) or download and build from the repository directly (which actually isn't as difficult as it sounds). Doing this is good for you because you get first hand access to all bug fixes as soon as they go live.

Alternatively, if you have an express edition or just don't want to go through the hassle of downloading the source and building it, email me or Promit and we'll send you the up-to-date binaries.

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!