1
\$\begingroup\$

I'm using MonoGame with Visual Studio 2013 Express. I'd like to switch from a SharpDX backend to OpenGL and OpenAL. How do I achieve that?

\$\endgroup\$
4
\$\begingroup\$

Unfortunately, there is no way to do this with an existing project, without a bit of a workaround. Here are the steps:

  • Select Create a new project from inside of the IDE.

  • Next, you have to select the appropriate project type, in this case either MonoGame Windows Project or MonoGame Windows OpenGL Project. Both options should be available, and the only difference that I have seen inside of the Monogame source is inside of the graphics rendering code, as would be expected.

  • Finally, you have to add all old code from the old project. A very important rule to follow is that you have to manually copy Game1.cs, instead of just adding the project to the new project, since there is already a file called this in the new template project. You can also copy over Program.cs, as well.

This project that you have created at this point is the one that you will now open when you want to work on it. Feel free to delete the old project, assuming all code that you want has been copied over correctly. Ensuring this is important, you could lose a lot of work if your code has not been copied.

Note (thanks to @OMGtechy) that this is only available to developers using Visual Studio, as you seem to be doing. Other IDEs may not have this option. Monodevelop, the IDE I personally use on Linux, does have this option but others may not.

UPDATE: It seems like there actually is a way to do this, but it is much more complicated and seems unnecessary for most applications (it would be easier to make a new project).

  • First, you have to obtain SDL.dll somewhere on your system, and add it to the project. (Important: the DLL itself must be added to the project, not a reference.)

  • After that, you must add references to the project for: Lidgren.Network, OpenTK, and Tao.Sdl.

  • There may be other changes that need to be made, so don't expect this method to work out-of-the-box. There seems to be a #define that needs to be changed (first option under the Build tab when opening the .csproj properties), but when creating a new Windows OpenGL project it doesn't seem to change.

\$\endgroup\$
  • \$\begingroup\$ You should add that this is Visual Studio specific, as people using other IDEs might have issues. \$\endgroup\$ – OMGtechy Dec 22 '14 at 19:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.