[Interest] qt4 opengl and qpainter drawText Crash or not visible

qtnext qtnext at gmail.com
Thu May 2 23:26:27 CEST 2013


Hi,

I need to add text support in my qt opengl/qt3D application. I try to draw
text in a fbo like this:



 QPainter painter(m_render_fbo);

  painter.setRenderHints(QPainter::Antialiasing
|QPainter::TextAntialiasing |QPainter::SmoothPixmapTransform,true);

 document.drawContents(&painter);

  painter.end();


sometimes it works, and sometimes not : black or crash in
drawCachedGlyphs ... depending on what I was doing before (for example
it don't works if I was previoulsy drawing a texture). I have tryed to
setup various opengl state, but I don't which one to setup to ensure
to have a clean opengl state to draw the text using opengl engine ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130502/754586f7/attachment.html>


More information about the Interest mailing list