DesktopGL - Linux Errors

I’m deploying a DesktopGL project built in Windows to Linux with MonoKickstart, and I’m running into a couple of problems. I want to start by mentioning that I’m running Ubuntu on a VM, but the same errors occurred on hardware running Ubuntu when I had someone else test.

  • SDL 2.0.4 does not support changing resizable parameter of the window after it’s already been created, please use a newer version of it.

This occurs because I allow window resizing in the Game constructor. MonoGame’s fork of MonoKickstart hasn’t been updated to the latest binaries; how would I go about updating the Linux ones?

If I comment out the window resizing line, I get a different error.

  • Failed to create graphics device!
    Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice () [0x00000] in :0
    atMicrosoft.Xna.Framework.GraphicsDeviceManager.Microsoft.Xna.Framework.IGraphicsDeviceManager.CreateDevice () [0x00000] in :0 at Microsoft.Xna.Framework.Game.DoInitialize () [0x00000] in :0 at Microsoft.Xna.Framework.Game.Run (GameRunBehavior runBehavior) [0x00000] in :0 at Microsoft.Xna.Framework.Game.Run () [0x00000] in :0

To clarify, these both occur when the game runs and gets into my code. I’ve consistently had issues getting Linux builds to run, so I’m unsure what I need to do to fix things. You can see my Game1 class (called Engine.cs in my engine) here:

All help is greatly appreciated in advance!

MonoGame requires SDL 2.0.5 or higher to run. Generate a new set of templates and copy the libraries from there or reference the devel nuget to get it.

Devel nuget feed: http://teamcity.monogame.net/guestAuth/app/nuget/v1/FeedService.svc/

Thanks for the reply! To clarify, I’m running on Windows and want the updated Linux libraries. By generate a new set of templates, do you mean create a new DesktopGL project? Would I do this on Windows or Linux?

I’m leaning towards the nuget approach, but I’ve only ever used it once to install a JSON package and my search left me empty-handed in how to reference the link you posted to get the libraries. It doesn’t recognize it as a package, and nuget add -Source doesn’t work with http sources. It’s not clear to me which nuget command will allow me to reference this feed.

Yes.
Works on both.

You can add the nuget deed in the IDE (Visual Studio or MonoDevelop), Google it, also fixed my link since I copied the wrong one.

1 Like

Thanks so much! I ended up copying the libraries from my DesktopGL project and moved any graphics device-related code from Initialize() to the constructor and it works now.