Hi, I'm using QPainter to draw some text and other primitives into a QOpenGLFrameBufferObject which is used as a texture in my OpenGL scene.
I use QPainter::drawText, drawPath and fillRect. The drawText() call seems to work as expected, but the two other produce more or less random garbage. I suspect that the OpenGL state is messed up before I enter the QPainter, but I'm not sure which states I need to keep track of. I know about the QPainter::beginNativePainting/endNativePainting, but these are typically used when you want to draw OpenGL commands inside a QPainter. This is more the other way around, i.e I want to draw QPainter stuff inside a GL renderer. Anyway, I've tried different combinations of begin/endNativePainting but with no effect. What is the recommended way of doing this? Should I make a separate GL context for my FBO rendering, or is it possible to keep the state consisten between the two renderers. - Thomas
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
