When I run this on my Android device, line #84 in VeldridSurfaceView GraphicsDevice = GraphicsDevice.CreateOpenGLES(DeviceOptions, sd); will throw an exception stating;
CreateOpenGLES() failed to get the default Android EGLDisplay: BadParameter
When I run exactly the same code from an Xamarin Android app, everything works as expected, and I can use Veldrid just fine.
Only when I run from a .NET 6.0 app this goes wrong.
I am using VS 2022 Preview in order to use .NET 6.0 on Android.
I can't figure out what I'm missing. Is this a compatability issue, or am I missing something else?
Hi, I'm trying to setup Veldrid within an Android .NET 6.0 app. My OnCreate method looks as follow:
The VeldridSurfaceView is directly copied from https://github.com/mellinoe/veldrid-samples/blob/master/src/SampleBase.Android/VeldridSurfaceView.cs
When I run this on my Android device, line #84 in VeldridSurfaceView
GraphicsDevice = GraphicsDevice.CreateOpenGLES(DeviceOptions, sd);
will throw an exception stating;CreateOpenGLES() failed to get the default Android EGLDisplay: BadParameter
This exception originates from https://github.com/mellinoe/veldrid/blob/master/src/Veldrid/OpenGL/OpenGLGraphicsDevice.cs InitializeANativeWindow(), line #621. For some reason the display can't be found.
When I run exactly the same code from an Xamarin Android app, everything works as expected, and I can use Veldrid just fine. Only when I run from a .NET 6.0 app this goes wrong.
I am using VS 2022 Preview in order to use .NET 6.0 on Android.
I can't figure out what I'm missing. Is this a compatability issue, or am I missing something else?
Thanks.