Hi guys,
Im loading up a model using C++ and OpenGLES and it looses the texture depending on where i load the texture in OpenGLES.
If i load the model before QCAR::CameraDevice::getInstance().start() is called the texture is rendered which leads me to believe that a GL state stops the texture from loading correctly.
Also if i remove QCAR::Renderer::getInstance().drawVideoBackground(); from my render loop it also renders the texture on the model.
So i have got to the point where i know its the rendering of the video texture to the quad or loading the texture.
I have read this https://developer.vuforia.com/resources/dev-guide/opengl-state-changes-video-background-renderer and it doesnt fix the issue.
Jim @Dev2rights
Hi Dev2rights,
I have checked with one of our OpenGL ES gurus and here is the summary.
Vuforia assumes it gets the GL state "Dirty" so it is the responsibility of the developer to restore the desired GL state after drawVideoBackground() and bindVideoBackground. So the advice is to cache the Texture and Enable states using the following Open GL ES API and restore them after the problematic call:
At present there is no implicit saving of the GL states, though as you might imagine to do this on every frame could be expensive.
The other idea I had was that you may be able to use a specific texture unit but this is unlikely to work.
HTH
N