Log in or register to post comments

Background Video OpenGLES code

December 19, 2014 - 5:50pm #1

I am integrating Viforia on a 3D engine and I am having problems with the video in the background and the rendering of the scenes. Although the engine is open source, AFAIK, Vuforia's video rendering code is not and it seems there are some OpenGL state collisions. I can get or either the video in the background correctly drawn or the 3D model, but not both.

Is there any possibility to get to know how the video in the background is being rendered? Specifically, what OpenGLES calls are being used?

        QCAR::Renderer::getInstance().drawVideoBackground();

Any help very much appreciated.

Background Video OpenGLES code

December 22, 2014 - 12:22am #2

This articles enumerates the OpenGL state changes when rendering the video background:

https://developer.vuforia.com/resources/dev-guide/opengl-state-changes-video-background-renderer

 

In addition, since this is all based on OpenGL ES 2.0, you will need to make sure to:

- bind your own GLSL shader (via glUseShader ( your_shader_id );  ) after drawing the video background and in any case before rendering your own geometry

- set your shader uniform variables as needed

- enable your vertex arrays handles ( i.e. using glEnableVertexArrayHandle (  your_varray_handle );  ...)

- point the vertex array pointers to your own vertex or atributes arrays

- bind any texture you need (glBindTexture ( your_texture_id );   ... )

and if you are using FBOs, also make sure to bind your FBO before drawing your geometry (and after drawing the video background).

 

Hope this helps.

 

Log in or register to post comments