PDA

View Full Version : QGLFrameBufferObject as a QPainterDevice transparent pen problem



nightroad
20th June 2011, 14:19
Hi there,

I'm using QGLFrameBufferObject as a QPainterDevice like that ;


m_pen(QBrush(QColor(255,0,0,80)),10)


// QGLFramebufferObjectFormat format;
// format.setAttachment(QGLFramebufferObject::Combine dDepthStencil);
// format.setSamples(3);
m_FBO = new QGLFramebufferObject(width(),height()/*, format*/);


QPainter painter(m_FBO);
painter.setRenderHints(QPainter::HighQualityAntial iasing | QPainter::SmoothPixmapTransform | QPainter::TextAntialiasing);
painter.setPen(m_pen);
painter.drawLine(m_start,m_end);

If i use opaque colors everything is going well. and if i don't use opaque colors in m_pen like that m_pen(QBrush(QColor(255,0,0,80)),10) transparent colors drawing so weird as like attached image;

6592

is there any idea what is going wrong ? Thanks ...