Tim Preuster asks if Managed DirectX is discriminating against VB developers by concentrating on C# instead of VB in the examples. In addition, he cites a strange error when you attempt to call DrawText in VB...it turns out that VB cannot properly resolve the difference in two methods between a ByVal and ByRef parameter when all other parameters are the same, so it can't compile what would otherwise be valid VB/MDX code (Yes, it's a known bug that will be fixed in the next release...but at the bottom of this entry is a link to download a temporary fix).
The final answer to the "discrimination" would have to come from Tom Miller, who is almost entirely responsible for Managed DirectX (yes, it's being developed by just one person mostly). But, having talked to Tom, I can say it boils down to time. There's only so much that one person can do in a development cycle. In my opinion, that's just fine. Further, I think he made the wise choice of selecting C# as that language.
Now, before all you VB diehards start burning me in effigy, let's be a little logical about this. There's a few reasons why Tom's decision was a good thing:
- You can't possibly master DirectX without knowing C++, and C# is syntactically similar to C++, so picking up on C# shouldn't be difficult.
- Rather than having a few examples in two languages, Tom opted for several examples in one language. More examples is a good thing.
- Folks, converting from C# to VB really isn't that hard.
But having said all that, it's true that Tom is working on expanding the number of VB examples in the future. In the meantime, there's nothing stopping you hard-core VB people from posting your own conversions of the Managed DirectX samples. If you do this, please send me the link and I'll blog about it! We really DO care about people being able to write cool stuff in VB/MDX, so tell me what you've done and I'll be glad to brag about it!
Oh, and apparently I forgot to add the code to fix DrawText in my book code (oops!). Just download this code, compile it, then add it as a reference in your VB project.
P.S. Half-Life 2 ROCKS, World of Warcraft rocks but it's addictive (damn you, Brian Benincasa!), and they released Half-Life2 Multiplayer today. There goes my social life (as if I actually have one 