![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtQuick More...
#include <qquickframebufferobject.h>
Protected Member Functions | |
Renderer () | |
Constructs a new renderer. | |
virtual | ~Renderer () |
The Renderer is automatically deleted when the scene graph resources for the QQuickFramebufferObject item is cleaned up. | |
virtual void | render ()=0 |
This function is called when the FBO should be rendered into. | |
virtual QOpenGLFramebufferObject * | createFramebufferObject (const QSize &size) |
This function is called when a new FBO is needed. | |
virtual void | synchronize (QQuickFramebufferObject *) |
This function is called as a result of QQuickFramebufferObject::update(). | |
QOpenGLFramebufferObject * | framebufferObject () const |
Returns the framebuffer object currently being rendered to. | |
void | update () |
Call this function when the FBO should be rendered again. | |
void | invalidateFramebufferObject () |
Call this function during synchronize() to invalidate the current FBO. | |
Friends | |
class | QSGFramebufferObjectNode |
class | QQuickFramebufferObject |
\inmodule QtQuick
The QQuickFramebufferObject::Renderer class is used to implement the rendering logic of a QQuickFramebufferObject.
Definition at line 25 of file qquickframebufferobject.h.
|
protected |
Constructs a new renderer.
This function is called during the scene graph sync phase when the GUI thread is blocked.
Definition at line 393 of file qquickframebufferobject.cpp.
|
protectedvirtual |
The Renderer is automatically deleted when the scene graph resources for the QQuickFramebufferObject item is cleaned up.
This function is called on the rendering thread.
Definition at line 413 of file qquickframebufferobject.cpp.
|
protectedvirtual |
This function is called when a new FBO is needed.
This happens on the initial frame. If QQuickFramebufferObject::textureFollowsItemSize is set to true, it is called again every time the dimensions of the item changes.
The returned FBO can have any attachment. If the QOpenGLFramebufferObjectFormat indicates that the FBO should be multisampled, the internal implementation of the Renderer will allocate a second FBO and blit the multisampled FBO into the FBO used to display the texture.
Definition at line 496 of file qquickframebufferobject.cpp.
|
protected |
Returns the framebuffer object currently being rendered to.
Definition at line 420 of file qquickframebufferobject.cpp.
|
protected |
Call this function during synchronize() to invalidate the current FBO.
This will result in a new FBO being created with createFramebufferObject().
Definition at line 470 of file qquickframebufferobject.cpp.
Referenced by QSGFramebufferObjectNode::handleScreenChange().
|
protectedpure virtual |
This function is called when the FBO should be rendered into.
The framebuffer is bound at this point and the glViewport
has been set up to match the FBO size.
The FBO will be automatically unbound after the function returns.
Referenced by QSGFramebufferObjectNode::render().
|
protectedvirtual |
This function is called as a result of QQuickFramebufferObject::update().
Use this function to update the renderer with changes that have occurred in the item. item is the item that instantiated this renderer. The function is called once before the FBO is created.
{For instance, if the item has a color property which is controlled by QML, one should call QQuickFramebufferObject::update() and use synchronize() to copy the new color into the renderer so that it can be used to render the next frame.}
This function is the only place when it is safe for the renderer and the item to read and write each others members.
Definition at line 461 of file qquickframebufferobject.cpp.
|
protected |
Call this function when the FBO should be rendered again.
This function can be called from render() to force the FBO to be rendered again before the next frame.
Definition at line 510 of file qquickframebufferobject.cpp.
|
friend |
Definition at line 37 of file qquickframebufferobject.h.
|
friend |
Definition at line 36 of file qquickframebufferobject.h.