Tuesday, July 23, 2013

My travels in graphics programming

DirectX

Early this year I started reading a book about DirectX but quit shortly after.  I wanted to use VS2012, but couldn't get my environment configured properly.  All the issues stem from the fact that VS2012 now comes with DirectX built-in, but this version only works for Metro applications.  If you want to develop for the desktop, you have to install the "June 2010 SDK" for DirectX which is a pain for me as a beginner.  One solution to this problem is to go back to Windows 7 and use Visual Studio 2010, which is something I don't want to do.

OpenGL

About two months ago I strongly considered forgetting DirectX and instead learning OpenGL.  I have to admit that not being able to set up my machine properly has been one of the biggest reasons for the switch.  At the moment, I'm waiting for the latest version of the "OpenGL SuperBible" to be released at the beginning of next month.  This book was highly recommended by a friend who is a graphics programmer, so I have high hopes for it.

Monogame/XNA

In the last couple of weeks I gave DirectX another shot and again and I'm not seeing the progress I expected.  To calm my frustration with DX, I went and researched other alternatives and discovered Monogame which is an open-source port of XNA.  Now, XNA is dead and will no longer be supported by Microsoft, but I found Monogame very promising.  For the type of games I want to code as a beginner I believe is more than capable and satisfies all my requirements.

Yesterday I said what the hell and decided to give it a shot.  Right off the bat, I'm finding it a pain to use VS2012 in my environment again.  To get Monogame to run on Win7 with VS2012 I had to go through a labyrinth of steps:
  1. Install Visual Studio 2010
  2. Install XNA Game Studio
  3. Install Monogame
  4. Create OpenGL Monogame project and have it fail to run.
  5. Fix SDL.dll issue with the way the Monogame VS template works.
  6. Install OpenAl because Monogame didn't install this driver for some reason.
  7. Finally run basic project.
The whole process took me a couple of hours, which isn't too bad.  But I find steps 1 and 2 to be non-ideal.  Why do I need to install VS2010 to code something in VS2012?  The reason is one key part of XNA has not been ported to Monogame, the content creation pipeline.  One way to avoid having VS2010 and XNA installed is by using Windows 8 Phone SDK.  The only problem with that approach is that you can only do that on Windows 8.


No comments: