Fix for QTBUG-23862 - Blank screen in Viewport
This patch fixes an issue that causes Qt3D's Viewport to be blank when its renderMode property is set to BufferedRender. (QSGPainterNode's RenderTarget is set to FramebufferObject) Task-number: QTBUG-23862 Change-Id: Ic7a333f79ecf1aa153ef42e213644a17243a3580 Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com> Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
This commit is contained in:
parent
ba102bece5
commit
b06f7aa36c
|
@ -154,13 +154,12 @@ void QSGPainterNode::paint()
|
|||
{
|
||||
QRect dirtyRect = m_dirtyRect.isNull() ? QRect(0, 0, m_size.width(), m_size.height()) : m_dirtyRect;
|
||||
|
||||
if (m_image.isNull())
|
||||
return;
|
||||
|
||||
QPainter painter;
|
||||
if (m_actualRenderTarget == QQuickPaintedItem::Image)
|
||||
if (m_actualRenderTarget == QQuickPaintedItem::Image) {
|
||||
if (m_image.isNull())
|
||||
return;
|
||||
painter.begin(&m_image);
|
||||
else {
|
||||
} else {
|
||||
if (!m_gl_device) {
|
||||
m_gl_device = new QOpenGLPaintDevice(m_fboSize);
|
||||
m_gl_device->setPaintFlipped(true);
|
||||
|
|
Loading…
Reference in New Issue