I have converted my C# game from OpenTK (OpenGL) to SharpDX (DirectX) and have it up and running from Visual Studio 2010. I also have it up and running from Visual Studio 11 in Metro, in the Windows 8 Developer Preview. However, the Metro build is still lacking textures, so my polygons are simply colored right now. The problem is that the methods used to load images are absent in the Metro DLLs. These methods are all missing from the Texture2D class (inherited from the Resource class) in Metro:

SharpDX.Direct3D11.Resource.FromStream
SharpDX.Direct3D11.Resource.FromFile
SharpDX.Direct3D11.Resource.FromMemory


Does anyone know if these will eventually be implemented in Metro? Or is there an alternate approach I could be using? Please keep in mind that I never knew a thing about DirectX or SharpDX before this, so I'm still very wet behind the ears with all this.

Finding any kind of help or information for SharpDX is not easy, which is a shame, because it seems to be a great solution for 3D in Metro using C#.

• You should consider looking at SlimDX. Not that I know if it's better or not, but it's often recommended. Mar 7 '12 at 15:30
• I do find information I need sometimes through SlimDX, but it's not a solution for development right now since it currently doesn't work in Metro. And the fine folks at SlimDX certainly won't be adding the missing methods I need to SharpDX. ;) Mar 7 '12 at 15:36

I just needed two of the methods: LoadBitmap() and CreateTex2DFromBitmap(). I had to change the R8G8B8A8_UNorm_SRgb to R8G8B8A8_UNorm, but ultimately I got it working. And now my game now looks fabulous in Metro with all it's textures in place! :)