googlevr / gvr-unity-sdk

Google VR SDK for Unity
http://developers.google.com/vr/unity/
Other
2.71k stars 1.09k forks source link

OPENGL NATIVE PLUG-IN ERROR in OpenGLES 2 limitation #536

Closed kazpopo closed 7 years ago

kazpopo commented 7 years ago

I’m facing an issue about 5.6.0f3, Google VR SDK for Unity 1.30 with OpenGLES 2. Is there someone knows if 5.6.0f3 or Google VR SDK for Unity 1.30 requires OpenGLES 3?

  1. Launch Unity 5.6.0f3.
  2. Create a new Unity project.
  3. Import GoogleVRForUnity 1.30.
  4. Switch Android platform.
  5. Turn on Virtual Reality Supported and chose Cardboard SDK.
  6. Build and run.

It (only empty untitled scene) works. But when I turned off Auto Graphic API and chose only OpenGLES2 from Player Settings Inspector, then the app outs following log at every single frame via ADB.

04-17 17:07:24.547 16581 16596 E Unity : OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_ENUM: enum argument out of range 04-17 17:07:24.547 16581 16596 E Unity : (Filename: ./Runtime/GfxDevice/opengles/GfxDeviceGLES.cpp Line: 371)

The app seems working correctly. I also tried with GVRDemo scene in GoogleVR/Demos/Scenes/. ADB outs same log.

miraleung commented 7 years ago

GVR users OpenGLES 3, so please enable that in Player Settings.

spaul13 commented 6 years ago

@miraleung, @kazpopo, I am also getting the same error. You are telling that I should make the Autographics API off and only make OpenGLES3 available there on the list under player setting?

But it's not working for me. Can you please provide any other suggestions if you have any on this?

previously I have OpenGLES3, OpenGLES2, Vulkan and AutoGraphics API on there. I guess it will automatically choose the right one.

kazpopo commented 6 years ago

Hi spaul13, I did

  1. Turned off Auto Graphics API.
  2. Select only OpenGLES3, or OpenGLES3 and OpenGLES2. The order is important. That’s it.

I use Unity 5.6.4p4 and GoogleVR SDK 1.50 now. They are stable.

spaul13 commented 6 years ago

Thanks a lot. I am also using Unity 5.6.4p4 and Google VR SDK 1.70. I did the same you suggested but I am still getting the error although everything seems to be working fine. Please do tell me if you have any suggestion.

Here is my logcat message:

_02-05 11:37:56.196 12619-12635/? I/System.out: the video width is 4096 02-05 11:37:56.196 12619-12635/? I/EasyMovieTexture: video width is 4096 02-05 11:37:56.196 12619-12635/? I/System.out: the video width is 4096 02-05 11:37:56.196 12619-12635/? D/EasyMovieTexture: GetSeekPosition 02-05 11:37:56.197 12619-12635/? D/EasyMovieTexture: CurrentSeekPosition = 24798 overflow? false 02-05 11:37:56.209 12619-12705/? D/EasyMovieTexture: UpdateVideoTexture() 02-05 11:37:56.209 12619-12705/? D/EMT: before updating image and active texture is =34016surface texture id = 66unity texture ID =69 02-05 11:37:56.210 12619-12705/? E/Unity: OPENGL NATIVE PLUG-IN ERROR: GL_INVALIDENUM: enum argument out of range (Filename: ./Runtime/GfxDevice/opengles/GfxDeviceGLES.cpp Line: 388)