trev3d / QuestDisplayAccessDemo

Inefficient sample code for getting screen contents in Unity on Meta Quest to workaround lack of 'camera access'
MIT License
136 stars 18 forks source link

Not receiving passthrough texture #2

Closed kevinagnes closed 1 month ago

kevinagnes commented 1 month ago

Currently on version v68. After confirming the permission the cubes remain with the initial texture.

I am getting:

14:05:36.731 17283 17311 I ContentValues : Updating texture image
14:05:36.731 17283 17311 E aprojectiondem: [SurfaceTexture-34-17283-0] checkAndUpdateEglState: invalid current EGLDisplay
14:05:36.732 17283 17311 E Unity         : AndroidJavaException: java.lang.IllegalStateException: Unable to update texture contents (see logcat for details)
14:05:36.732 17283 17311 E Unity         : java.lang.IllegalStateException: Unable to update texture contents (see logcat for details)
14:05:36.732 17283 17311 E Unity         : at android.graphics.SurfaceTexture.nativeUpdateTexImage(Native Method)
14:05:36.732 17283 17311 E Unity         : at android.graphics.SurfaceTexture.updateTexImage(SurfaceTexture.java:275)
14:05:36.732 17283 17311 E Unity         : at android.graphics.SurfaceTexture.updateTexImage(SurfaceTexture.java:266)
14:05:36.732 17283 17311 E Unity         : at com.trev3d.UnityPlayerActivityWithMediaProjector.requestSurfaceTextureUpdate(UnityPlayerActivityWithMediaProjector.java:145)
14:05:36.732 17283 17311 E Unity         : at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
14:05:36.732 17283 17311 E Unity         : at com.unity3d.player.UnityPlayer.-$$Nest$mnativeRender(Unknown Source:0)
14:05:36.732 17283 17311 E Unity         : at com.unity3d.player.UnityPlayer$F$a.handleMessage(Unknown Source:122)
14:05:36.732 17283 17311 E Unity         : at android.os.Handler.dispatchMessage(Handler.java:102)
14:05:36.732 17283 17311 E Unity         : at android.os.Looper.loopOnce(Looper.java:214)
14:05:36.732 17283 17311 E Unity         : at android.os.Looper.loop(Looper.java:304)
14:05:36.732 17283 17311 E Unity         : at com.unity3d.player.UnityPlayer$F.run(Unknown Source:24)
14:05:36.732 17283 17311 E Unity         : at UnityEngine.AndroidJNISafe.CheckExcepti
14:05:36.744 17283 17311 I Unity         : Polling for new surface texture update
trev3d commented 1 month ago

Are you using the gltexture branch? It isn't functional yet

kevinagnes commented 1 month ago

Yes! Thanks for pointing that out! I will try with the main!

kevinagnes commented 1 month ago

On the main branch it worked fine! Thanks for the finding!