UltravioletFramework / ultraviolet

The Ultraviolet Framework is a .NET game development framework written in C#.
https://github.com/UltravioletFramework/ultraviolet/wiki
MIT License
542 stars 46 forks source link

Crash on Android when call new OpenGLUltravioletContext() #118

Closed kinosang closed 4 years ago

kinosang commented 5 years ago

Got The application requested an OpenGL context of version 2.0 or higher, but the driver could not provide such a context.

tlgkccampbell commented 5 years ago

What device are you getting this error on? What version of Android?

kinosang commented 5 years ago

@tlgkccampbell both Emulator (with API 28) and real device (with API 23)

I ran into this error with a simple project, which has one shared project and multiple platform-special project.

It works well on Mac, but crashes on Android. And it does not work on iOS (only a blank screen).

the codes of Game class are from RenderingGeometry sample.

tlgkccampbell commented 5 years ago

When you create your OpenGLUltravioletConfiguration object, please try setting Debug to false and let me know if that fixes the issue for you.

It looks like there's something wrong with how debug contexts are being handled on Android. I'm going to investigate whether updating SDL2 will fix this.

kinosang commented 5 years ago

@tlgkccampbell It works well on Android after commenting Debug settings.

but it still gives me a blank screen on iOS.

Is there any note for using a shared project with Ultraviolet.Game.iOS?

kinosang commented 5 years ago

Crashes on iOS solved by adding <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> into the csproj file of iOS and Mac project.

tlgkccampbell commented 5 years ago

Thank you for the information, I'll look into fixing the iOS and Mac packages.

kinosang commented 5 years ago

It seems that macMorden packages conflict with packages for other Xamarin platforms.

tlgkccampbell commented 4 years ago

This will be fixed on supported platforms in the next release. Unfortunately, the next release is also dropping support for iOS entirely, since I no longer have the hardware necessary to run the current set of development tools.