PDA

View Full Version : 4.5.2 =>4.6.3 OpenGL shaders+qrphicsview issue



medved6
22nd August 2010, 08:23
Hi All

I have relatively large project. Part of it displays some video items on QGraphicsView. Each video item has openGl shader to convert yuv to rgb. Everything works in QT 4.5.2.
I just tried to use 4.6.3. and got some issue. Instead of normal video I see pink rectangles.
Besides, I call
m_videoView.setViewport(new QGLWidget());

But in

void CLVideoWindow::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
(CLVideoWindow inherits QGraphicsItem )
condition
if (painter->paintEngine()->type() != QPaintEngine::OpenGL)

is always true(unexpected).
In 4.5.2 it's always false (expected).

I'm not sure if it makes any sence.


Just in case I attach the code for rendering yuv.
Did anybody have such issues?

Thanks in advance!

medved6
22nd August 2010, 19:33
problem solved

painter->beginNativePainting();
painter->endNativePainting();
were missing.