Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

QQuickFramebufferObject is flipped on Y axis in QML

$
0
0
Hmmm take a look at this [qt-project.org]. But use QSGSimpleTextureNode instead of QSGGeometryNode. A simple rendering can look like this. QSGNode *YourClass::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) {     QSGNode *node = oldNode;   if (!node) {     node = new QSGNode();   }   if (this->_fbo == NULL) {       this->_fbo = new QGLFramebufferObject(QSize(this->boundingRect().width(), this->boundingRect().height()));       QSGTexture *m_texture = this->window()->createTextureFromId(this->_fbo->texture(),QSize(this->boundingRect().width(), this->boundingRect().height()), QQuickWindow::TextureHasAlphaChannel);       QSGSimpleTextureNode *textureNode = new QSGSimpleTextureNode();       textureNode->setTexture(m_texture);       textureNode->setTextureCoordinatesTransform(QSGSimpleTextureNode::MirrorVertically);       textureNode->setRect(this->boundingRect());       textureNode->setFiltering(QSGTexture::Linear);       node->appendChildNode(textureNode);   }     return node; } Is an example but should show how to render a backbuffer with scenegraph

Viewing all articles
Browse latest Browse all 4972

Trending Articles