I'm trying to get a video background in a VR app. To accomplish this I tried to use the ARVR sample app and modified it a bit so that the texture in the VR activity would be the video camera background like in the AR activity. Unfortunately, this doesn't work as aspected. The sample app crashes in the renderVideoBackground method at
GLES20.glVertexAttribPointer(vbVertexHandle, 3, GLES20.GL_FLOAT, false, 0, vbMesh.getPositions().asFloatBuffer()); GLES20.glVertexAttribPointer(vbTexCoordHandle, 2, GLES20.GL_FLOAT, false, 0, vbMesh.getUVs().asFloatBuffer());
because the vbMesh positions and uv's are empty. The same code does work however when the app uses an AR activity. I made sure that the matrices are correct, the GLTextureUnit is set and passed to Renderer.getInstance().updateVideoBackgroundTexture(tex) and that the correct viewId is passed to the renderVideoBackground method.
Anyone encountered this as well or is this what I'm trying to do not possible?