0

I'm making a GUI editor for a game engine that only allows DDS image files. I've had no luck finding any WinForm way to load DDS files so I looked at the XNA route. I found a DDSLib that uses XNA to load DDS files to Texture2D types. Then I think I can save those in memory as bitmap and use them in my WinForm. However this requires a Graphics Device object. How can I get this Graphics Device object without having any sort of visual thing. Everything I see shows controls which makes sense if you want to show something, but in my case I just need it behind the scenes to do these conversions.

user441521
  • 6,942
  • 23
  • 88
  • 160

1 Answers1

0

It may not be an elegant solution but you could just set the XNA frame within the winform to not be visible?

Edit:

Just found this: How to load .dds files into a picturebox?

Community
  • 1
  • 1
Joe Shanahan
  • 816
  • 5
  • 21
  • I tried that. When I reference the DevIL.NET.dll I don't get LoadBitmap() as an option. I do have DevIL.DevIL class, but no other options when I press dot operator after it. I also noticed a DevIL.NET2.dll in there. Tried that and same thing. So not sure how to use this. I'm using VS Express 2010 with .NET 4.0 so not sure if it's not compatible or what. – user441521 Aug 05 '12 at 14:55