Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.15
-
None
Description
Minimal example project attached. With the old backend, it shows a green rectangle, with rhi it is blank.
Relevant part of the example:
QSGNode *TestItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) { auto *node = static_cast<QSGSimpleTextureNode *>(oldNode); if (!node) { node = new QSGSimpleTextureNode(); QImage image(QSize(100, 100), QImage::Format_ARGB32); image.fill(Qt::GlobalColor::green); QSGTexture *texture = window()->createTextureFromImage(image); if (texture) texture->bind(); node->setTexture(texture); node->setRect(QRect(0,0,100,100)); node->setSourceRect(QRect(0,0,100,100)); } return node; }
Ran with:
env QSG_RHI=1 QSG_RHI_BACKEND=gl ./sgtex
Attachments
For Gerrit Dashboard: QTBUG-80364 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
283039,2 | Warn about using QSGTexture::bind outside direct OpenGL path | 5.14 | qt/qtdeclarative | Status: MERGED | +2 | 0 |