Sign in to follow this  
freka586

[SlimDX] Effect.SetValue(bool) issues?

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this