QGlPainter (qt3D) and qpainter : drawContent (text)
I need to draw rich text in my qt3D/Qt4 application. so I decide to draw in an opengl fbo using qpainter. It works fine sometimes, and don't see anything, or crash depending on preceding opengl state. I have tried to setup opengl state before but I don't which state I need to set to ensure that qpainter can draw a qtextdocument with the function drawContent..
I have done more test ... it seems that there is a broken state if I use QGL::setPreferredPaintEngine ( QPaintEngine::OpenGL2 ); (the default).. If I use QGL::setPreferredPaintEngine ( QPaintEngine::OpenGL ); it works fine but it seems that it's not normal.
I suppose I have a bad opengl state for drawing text when I use opengl2 ?