Jump to content
  • Advertisement
Sign in to follow this  
DrGUI

[.net] ref 0 as a structure?

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

DirectX uses that in D3DX's TextureLoader class, for the ref ImageInformation parameter, in a few of the overloads for FromFile. Of course, I realize that they do not want to duplicate the code, but I was unable to get 'ref ((Direct3D.ImageInformation) ref 0)' to compile. I got that code from Lutz Roeder's Reflector, a .net decompiler. I do not believe that section of code to be unsafe, but I wouldn't bet my life on it. Shall I just create a new (empty) structure and pass that in? I do not especially want to double my overloads for my texture restoration system. Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement
actualy it looks to me like the lutz decompiler didnt interpret the ILasm so i dont think it would compile at all.

Share this post


Link to post
Share on other sites
Quote:
Original post by RenZimE
actualy it looks to me like the lutz decompiler didnt interpret the ILasm so i dont think it would compile at all.

It seems to work on everything else.
It definately works on my code and when I tried it on Direct3DX it certainly produced logical output.
Of course, it could be a flaw. Can't expect everything to be 1200% perfect.

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!