I don't understand the meaning of the QCAR::requiresAlpha() method. In which case will it be true or false ?
I need to use it to define the gl background color ?
I'm now creating an application based on BackgroundTextureAccess, but stuck in the problem that QCAR::requiresAlpha returns false.
I want to render glview over surfaceview, and glview needs to be transparent.
How can I fix QCAR::requiresAlpha value?
Hi, if the QCAR::requiresAlpha returns true, then it would indicate that your QCAR OpenGL view must be considered as "translucent" (e.g. if you want to render the QCAR view on top of something else);
this is why in the samples (e.g. ImageTargets.cpp), we clear the alpha component of the OpenGL clear color with alpha = 0 (=> transparent view) or alpha = 1 (=> opaque view) depending on the value returned by QCAR::requiresAlpha()
glClearColor(0.0f, 0.0f, 0.0f, QCAR::requiresAlpha() ? 0.0f, 1.0f);
However, from a practical point of view, you could ignore this flag and set the alpha component just to 1.0f
(unless you plan to render something behind the video background of qcar, which is unlikely, as usually you render everything ON TOP of the qcar view).
Are you sure you want to delete this message?
Are you sure you want to delete this conversation?