Hi,
I'm developing with Necessitas (QT for Android), Osg/VPB and OpenGLES 2.0
It works fine, but the Qt Gui does not work. If i add a simply QPushButton, the
opengl rendering stop working.
After many hours of debug i found a problem in the QT Framework, in the file
qpaintengineex_opengl2.cpp,
inside the methodQGL2PaintEngineExPrivate::resetGLState().
void QGL2PaintEngineExPrivate::resetGLState()
{
glDisable(GL_BLEND);
glActiveTexture(GL_TEXTURE0);
glDisable(GL_STENCIL_TEST);
glDisable(GL_DEPTH_TEST);
glDisable(GL_SCISSOR_TEST);
glDepthMask(true);
glDepthFunc(GL_LESS);
glClearDepth(1);
glStencilMask(0xff);
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
glStencilFunc(GL_ALWAYS, 0, 0xff);
ctx->d_func()->setVertexAttribArrayEnabled(QT_TEXTURE_COORDS_ATTR, false);
ctx->d_func()->setVertexAttribArrayEnabled(QT_VERTEX_COORDS_ATTR, false);
ctx->d_func()->setVertexAttribArrayEnabled(QT_OPACITY_ATTR, false);
#ifndef QT_OPENGL_ES_2
// gl_Color, corresponding to vertex attribute 3, may have been changed
float color[] = { 1.0f, 1.0f, 1.0f, 1.0f };
glVertexAttrib4fv(3, color);
#endif
}
I must comment the following 3 commands to have OSG working:
// ctx->d_func()->setVertexAttribArrayEnabled(QT_TEXTURE_COORDS_ATTR,
false);
// ctx->d_func()->setVertexAttribArrayEnabled(QT_VERTEX_COORDS_ATTR, false);
// ctx->d_func()->setVertexAttribArrayEnabled(QT_OPACITY_ATTR, false);
I don't know if it is a problem of OSG or Necessitas.
Should i report a bug to the kde/Necessitas forum?
Thank you!
Cheers,
Massimo
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=51417#51417
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org