0

I'm trying to get a MonoGame project working on my Pi.

I've done the following:

sudo apt-get install mono-runtime sudo apt-get install monodevelop sudo apt-get install libmonogame-cil-dev monodevelop-monogame

Then I launched MonoDevelop and created a new Solution/Project: MonoGame Linux Application

Without making any code or configuration changes, the game builds ok, but when I try to run it I get a System.NullReferenceException at OpenTK.Graphics.GraphicsMode.get_Default()

By default, the Build Configuration is set to Default|x86 which seems a little weird since I'm targeting the Pi, which is obviously not x86. The only options I see are Debug|x86, Release|x86 or Any CPU (all of which I've tried.)

Am I using the wrong project type (Linux)?
Or am I missing a library (OpenTK maybe?)
Or is there something special I need to do in the Build Configuration?

Any help would be appreciated.

1 Answer 1

1

you will need to make some tweaks to OpenTK to get it working on the Pi. I did have a blog post on the subject but after a site hack I lost it but web archive has it

http://web.archive.org/web/20121203091113/http://infinitespace-studios.co.uk/2012/11/14/monogame-on-the-raspberry-pi/

bascially, you need to hack your own version of GLES (because by default it doesn't support hardware acceleration in X11)

then you need to hack OpenTK... (my fork github.com/dellis1972/opentk) then you need to hack monogame....

My code changes are in https://github.com/dellis1972/MonoGame/tree/pi but it is way way out of date.

1
  • Thanks for the reply. This may be more work than I'm ready for, but I'm going to give it a try. Feb 11, 2015 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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