QQuickFramebufferObject Class The QQuickFramebufferObject class is a convenience class for integrating OpenGL rendering using a framebuffer object (FBO) with Qt Quick. More...  
 Header:
 #include <QQuickFramebufferObject> 


 qmake:
 QT += quick


 Since:
 Qt 5.2


 Inherits:
 QQuickItem



 List of all members, including inherited members  Public Types  
 class 
Renderer
  Properties  
mirrorVertically : bool 
textureFollowsItemSize : bool   23 properties inherited from QQuickItem
 1 property inherited from QObject
  Public Functions  
 

QQuickFramebufferObject(QQuickItem *parent = Q_NULLPTR)
 
 virtual Renderer *

createRenderer() const = 0
 
 bool 

mirrorVertically() const
 
 void 

setMirrorVertically(bool enable)
 
 void 

setTextureFollowsItemSize(bool follows)
 
 bool 

textureFollowsItemSize() const
  Reimplemented Public Functions  
 virtual bool 

isTextureProvider() const
 
 virtual void 

releaseResources()
 
 virtual QSGTextureProvider *

textureProvider() const
   95 public functions inherited from QQuickItem
 32 public functions inherited from QObject
 2 public functions inherited from QQmlParserStatus
  Signals  
 void 

mirrorVerticallyChanged(bool)
 
 void 

textureFollowsItemSizeChanged(bool)
   1 signal inherited from QQuickItem
 2 signals inherited from QObject
  Additional Inherited Members  1 public slot inherited from QQuickItem
 1 public slot inherited from QObject
 11 static public members inherited from QObject
 33 protected functions inherited from QQuickItem
 9 protected functions inherited from QObject
  Detailed Description The QQuickFramebufferObject class is a convenience class for integrating OpenGL rendering using a framebuffer object (FBO) with Qt Quick. On most platforms, the rendering will occur on a dedicated thread. For this reason, the QQuickFramebufferObject class enforces a strict separation between the item implementation and the FBO rendering. All item logic, such as properties and UI-related helper functions needed by QML should be located in a QQuickFramebufferObject class subclass. Everything that relates to rendering must be located in the QQuickFramebufferObject8b7c:f320:99b9:690f:4595:cd17:293a:c069Renderer class. To avoid race conditions and read/write issues from two threads it is important that the renderer and the item never read or write shared variables. Communication between the item and the renderer should primarily happen via the QQuickFramebufferObject8b7c:f320:99b9:690f:4595:cd17:293a:c069Renderer8b7c:f320:99b9:690f:4595:cd17:293a:c069synchronize() function. This function will be called on the render thread while the GUI thread is blocked. Using queued connections or events for communication between item and renderer is also possible. Both the Renderer and the FBO are memory managed internally. To render into the FBO, the user should subclass the Renderer class and reimplement its Renderer8b7c:f320:99b9:690f:4595:cd17:293a:c069render() function. The Renderer subclass is returned from createRenderer(). The size of the FBO will by default adapt to the size of the item. If a fixed size is preferred, set textureFollowsItemSize to false and return a texture of your choosing from QQuickFramebufferObject8b7c:f320:99b9:690f:4595:cd17:293a:c069Renderer8b7c:f320:99b9:690f:4595:cd17:293a:c069reateFramebufferObject(). Starting Qt 5.4, the QQuickFramebufferObject class is a texture provider and can be used directly in ShaderEffects and other classes that consume texture providers. See also Scene Graph - Rendering FBOs and Scene Graph and Rendering.  Property Documentation 
mirrorVertically : bool
 This property controls if the size of the FBO's contents should be mirrored vertically when drawing. This allows easy integration of third-party rendering code that does not follow the standard expectations. The default value is false. This property was introduced in Qt 5.6. Access functions:  
 bool 

mirrorVertically() const
 
 void 

setMirrorVertically(bool enable)
  Notifier signal:  
 void 

mirrorVerticallyChanged(bool)
  
textureFollowsItemSize : bool
 This property controls if the size of the FBO's texture should follow the dimensions of the QQuickFramebufferObject item. When this property is false, the FBO will be created once the first time it is displayed. If it is set to true, the FBO will be recreated every time the dimensions of the item change. The default value is true. Access functions:  
 bool 

textureFollowsItemSize() const
 
 void 

setTextureFollowsItemSize(bool follows)
  Notifier signal:  
 void 

textureFollowsItemSizeChanged(bool)
   Member Function Documentation 
QQuickFramebufferObject8b7c:f320:99b9:690f:4595:cd17:293a:c069QQuickFramebufferObject(QQuickItem *parent = Q_NULLPTR) Constructs a new QQuickFramebufferObject with parent parent. 
[pure virtual] Renderer *QQuickFramebufferObject8b7c:f320:99b9:690f:4595:cd17:293a:c069reateRenderer() const Reimplement this function to create a renderer used to render into the FBO. This function will be called on the rendering thread while the GUI thread is blocked. 
[virtual] bool QQuickFramebufferObject8b7c:f320:99b9:690f:4595:cd17:293a:c069isTextureProvider() const Reimplemented from QQuickItem8b7c:f320:99b9:690f:4595:cd17:293a:c069isTextureProvider(). 
[virtual] void QQuickFramebufferObject8b7c:f320:99b9:690f:4595:cd17:293a:c069releaseResources() Reimplemented from QQuickItem8b7c:f320:99b9:690f:4595:cd17:293a:c069releaseResources(). 
[virtual] QSGTextureProvider *QQuickFramebufferObject8b7c:f320:99b9:690f:4595:cd17:293a:c069textureProvider() const Reimplemented from QQuickItem8b7c:f320:99b9:690f:4595:cd17:293a:c069textureProvider().

    
{'path': 'public/docs/qt~5.9/qquickframebufferobject.html', 'source': 'DevDocs.IO'}