OpenGL Native Plug-In Error with Unity on Android
Asked Answered
R

0

0

I am on a Unity 5.6.5f1 project targeting Android 6.0. The project is VR enabled with Daydream without the gvr sdk since I do not need any interaction.

I noticed that most of the time, when I launch the application, I get the stereo view but everything is black, I do not even see the splash screen and in logcat I get the following error:

'E/Unity: OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_FRAMEBUFFER_OPERATION: Framebuffer is not complete or incompatible with command'

However, 30% of the time, when I launch the application it works fine and I do not get this error.

So basically I open and close the app until it is working..

Any idea where it could come from? I am using multi pass rendering.

Razz answered 19/3, 2018 at 13:42 Comment(8)
Are you calling VRSettings.LoadDeviceByNam anywhere in your scripts?Cirsoid
I did but then I removed it and now my app is only running in Daydream mode. I am going to check of I did not let this call somewhere.Razz
It's one of the cause of this. If you have already removed it then make sure that OpenGL(not Vulkan) is set as the default graphics in the build settings.Cirsoid
I checked "Auto Graphics API", which version of OpenGl should I pick if I uncheck this? (I can't check my code right now, i will do that tonight)Razz
Uncheck the "Auto Graphics API" and make sure that OpenGLES2 is at the top. I also suggest you update Unity if the problem still persistCirsoid
@Cirsoid Thank you, it looks like it solved my issue on my Android 6.0 device, moreover, it removed an other OPENGL error (GL_INVALID_ENUM) I always had. However I am also targetting an Android 7.0 device. This device didn't have the black screen issue but I still tried with OpenGLES2 but it broked the textures (everything is stretched), any idea why?Razz
I talked too fast, I restarted the app 10 times in a row without issue, but then 10 minutes later, black screen again with GL_INVALID_FRAMEBUFFER_OPERATION again.Razz
No other ideas. Try updating Unity. It could be a bug that has been fixedCirsoid

© 2022 - 2024 — McMap. All rights reserved.