Skip to content

PythonQt.QtOpenGL.QGLFramebufferObject · declarations 001

Back to PythonQt.QtOpenGL.QGLFramebufferObject

attachment

attachment() -> Any

X.attachment()

Supplemental documentation: Qt 5 reference:

QGLFramebufferObject::Attachment QGLFramebufferObject::attachment() const

Returns the status of the depth and stencil buffers attached to this framebuffer object.

Upstream PySide2 reference signatures (binding differences may apply):

attachment(self) -> PySide2.QtOpenGL.QGLFramebufferObject.Attachment

Source: https://doc.qt.io/archives/qt-5.15/qglframebufferobject.html#attachment

bind

bind() -> bool

X.bind() -> bool

Supplemental documentation: Qt 5 reference:

bool QGLFramebufferObject::bind()

Switches rendering from the default, windowing system provided framebuffer to this framebuffer object. Returns true upon success, false otherwise.

See also release().

Upstream PySide2 reference signatures (binding differences may apply):

bind(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qglframebufferobject.html#bind

bindDefault

bindDefault() -> bool

X.bindDefault() -> bool

Supplemental documentation: Qt 5 reference:

[static] bool QGLFramebufferObject::bindDefault()

Switches rendering back to the default, windowing system provided framebuffer. Returns true upon success, false otherwise.

See also bind() and release().

Upstream PySide2 reference signatures (binding differences may apply):

bindDefault() -> bool

Source: https://doc.qt.io/archives/qt-5.15/qglframebufferobject.html#bindDefault

blitFramebuffer

blitFramebuffer(target: Any, targetRect: Any, source: Any, sourceRect: Any, buffers: int, filter: int) -> None

X.blitFramebuffer(target, targetRect, source, sourceRect, buffers, filter)

Supplemental documentation: Qt 5 reference:

[static] void QGLFramebufferObject::blitFramebuffer(QGLFramebufferObject *target, const QRect \&targetRect, QGLFramebufferObject *source, const QRect \&sourceRect, GLbitfield buffers \= GL_COLOR_BUFFER_BIT, GLenum filter \= GL_NEAREST)

Blits from the sourceRect rectangle in the source framebuffer object to the targetRect rectangle in the target framebuffer object.

If source or target is nullptr, the default framebuffer will be used instead of a framebuffer object as source or target respectively.

The buffers parameter should be a mask consisting of any combination of GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, and GL_STENCIL_BUFFER_BIT. Any buffer type that is not present both in the source and target buffers is ignored.

The sourceRect and targetRect rectangles may have different sizes; in this case buffers should not contain GL_DEPTH_BUFFER_BIT or GL_STENCIL_BUFFER_BIT. The filter parameter should be set to GL_LINEAR or GL_NEAREST, and specifies whether linear or nearest interpolation should be used when scaling is performed.

If source equals target a copy is performed within the same buffer. Results are undefined if the source and target rectangles overlap and have different sizes. The sizes must also be the same if any of the framebuffer objects are multisample framebuffers.

Note that the scissor test will restrict the blit area if enabled.

This function will have no effect unless hasOpenGLFramebufferBlit() returns true.

This function was introduced in Qt 4.6.

See also hasOpenGLFramebufferBlit().

Upstream PySide2 reference signatures (binding differences may apply):

blitFramebuffer(target: PySide2.QtOpenGL.QGLFramebufferObject, targetRect: PySide2.QtCore.QRect, source: PySide2.QtOpenGL.QGLFramebufferObject, sourceRect: PySide2.QtCore.QRect, buffers: int=..., filter: int=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qglframebufferobject.html#blitFramebuffer

devType

devType() -> int

X.devType() -> int

Upstream PySide2 reference signatures (binding differences may apply):

devType(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qglframebufferobject.html#devType

drawTexture

drawTexture(point: Any, textureId: int, textureTarget: int) -> None

X.drawTexture(point, textureId, textureTarget)

Supplemental documentation: Qt 5 reference:

void QGLFramebufferObject::drawTexture(const QRectF \&target, GLuint textureId, GLenum textureTarget \= GL_TEXTURE_2D)

Draws the given texture, textureId, to the given target rectangle, target, in OpenGL model space. The textureTarget should be a 2D texture target.

The framebuffer object should be bound when calling this function.

Equivalent to the corresponding QGLContext::drawTexture().

This function was introduced in Qt 4.4.

void QGLFramebufferObject::drawTexture(const QPointF \&point, GLuint textureId, GLenum textureTarget \= GL_TEXTURE_2D)

Draws the given texture, textureId, at the given point in OpenGL model space. The textureTarget should be a 2D texture target.

The framebuffer object should be bound when calling this function.

Equivalent to the corresponding QGLContext::drawTexture().

This function was introduced in Qt 4.4.

Upstream PySide2 reference signatures (binding differences may apply):

drawTexture(self, point: PySide2.QtCore.QPointF, textureId: int, textureTarget: int=...) -> None
drawTexture(self, target: PySide2.QtCore.QRectF, textureId: int, textureTarget: int=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qglframebufferobject.html#drawTexture

format

format() -> Any

X.format() -> PythonQt.QtOpenGL.QGLFramebufferObjectFormat

Supplemental documentation: Qt 5 reference:

QGLFramebufferObjectFormat QGLFramebufferObject::format() const

Returns the format of this framebuffer object.

Upstream PySide2 reference signatures (binding differences may apply):

format(self) -> PySide2.QtOpenGL.QGLFramebufferObjectFormat

Source: https://doc.qt.io/archives/qt-5.15/qglframebufferobject.html#format

handle

handle() -> int

X.handle() -> int

Supplemental documentation: Qt 5 reference:

GLuint QGLFramebufferObject::handle() const

Returns the GL framebuffer object handle for this framebuffer object (returned by the glGenFrameBuffersEXT() function). This handle can be used to attach new images or buffers to the framebuffer. The user is responsible for cleaning up and destroying these objects.

Upstream PySide2 reference signatures (binding differences may apply):

handle(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qglframebufferobject.html#handle

hasOpenGLFramebufferBlit

hasOpenGLFramebufferBlit() -> bool

X.hasOpenGLFramebufferBlit() -> bool

Supplemental documentation: Qt 5 reference:

[static] bool QGLFramebufferObject::hasOpenGLFramebufferBlit()

Returns true if the OpenGL GL_EXT_framebuffer_blit extension is present on this system; otherwise returns false.

This function was introduced in Qt 4.6.

See also blitFramebuffer().

Upstream PySide2 reference signatures (binding differences may apply):

hasOpenGLFramebufferBlit() -> bool

Source: https://doc.qt.io/archives/qt-5.15/qglframebufferobject.html#hasOpenGLFramebufferBlit

hasOpenGLFramebufferObjects

hasOpenGLFramebufferObjects() -> bool

X.hasOpenGLFramebufferObjects() -> bool

Supplemental documentation: Qt 5 reference:

[static] bool QGLFramebufferObject::hasOpenGLFramebufferObjects()

Returns true if the OpenGL GL_EXT_framebuffer_object extension is present on this system; otherwise returns false.

Upstream PySide2 reference signatures (binding differences may apply):

hasOpenGLFramebufferObjects() -> bool

Source: https://doc.qt.io/archives/qt-5.15/qglframebufferobject.html#hasOpenGLFramebufferObjects

isBound

isBound() -> bool

X.isBound() -> bool

Supplemental documentation: Qt 5 reference:

bool QGLFramebufferObject::isBound() const

Returns true if the framebuffer object is currently bound to a context, otherwise false is returned.

This function was introduced in Qt 4.5.

Upstream PySide2 reference signatures (binding differences may apply):

isBound(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qglframebufferobject.html#isBound

isValid

isValid() -> bool

X.isValid() -> bool

Supplemental documentation: Qt 5 reference:

bool QGLFramebufferObject::isValid() const

Returns true if the framebuffer object is valid.

The framebuffer can become invalid if the initialization process fails, the user attaches an invalid buffer to the framebuffer object, or a non-power of two width/height is specified as the texture size if the texture target is GL_TEXTURE_2D. The non-power of two limitation does not apply if the OpenGL version is 2.0 or higher, or if the GL_ARB_texture_non_power_of_two extension is present.

The framebuffer can also become invalid if the QGLContext that the framebuffer was created within is destroyed and there are no other shared contexts that can take over ownership of the framebuffer.

Upstream PySide2 reference signatures (binding differences may apply):

isValid(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qglframebufferobject.html#isValid

metric

metric(metric: Any) -> int

X.metric(metric) -> int

Supplemental documentation: Qt 5 reference:

[override virtual protected] int QGLFramebufferObject::metric(QPaintDevice::PaintDeviceMetric metric) const

Reimplements: QPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const.

Upstream PySide2 reference signatures (binding differences may apply):

metric(self, metric: PySide2.QtGui.QPaintDevice.PaintDeviceMetric) -> int

Source: https://doc.qt.io/archives/qt-5.15/qglframebufferobject.html#metric

paintEngine

paintEngine() -> Any

X.paintEngine() -> PythonQt.QtGui.QPaintEngine

Supplemental documentation: Qt 5 reference:

[override virtual] QPaintEngine *QGLFramebufferObject::paintEngine() const

Reimplements: QPaintDevice::paintEngine() const.

Upstream PySide2 reference signatures (binding differences may apply):

paintEngine(self) -> PySide2.QtGui.QPaintEngine

Source: https://doc.qt.io/archives/qt-5.15/qglframebufferobject.html#paintEngine

release

release() -> bool

X.release() -> bool

Supplemental documentation: Qt 5 reference:

bool QGLFramebufferObject::release()

Switches rendering back to the default, windowing system provided framebuffer. Returns true upon success, false otherwise.

See also bind().

Upstream PySide2 reference signatures (binding differences may apply):

release(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qglframebufferobject.html#release

size

size() -> Any

X.size() -> PythonQt.QtCore.QSize

Supplemental documentation: Qt 5 reference:

QSize QGLFramebufferObject::size() const

Returns the size of the texture attached to this framebuffer object.

Upstream PySide2 reference signatures (binding differences may apply):

size(self) -> PySide2.QtCore.QSize

Source: https://doc.qt.io/archives/qt-5.15/qglframebufferobject.html#size

texture

texture() -> int

X.texture() -> int

Supplemental documentation: Qt 5 reference:

GLuint QGLFramebufferObject::texture() const

Returns the texture id for the texture attached as the default rendering target in this framebuffer object. This texture id can be bound as a normal texture in your own GL code.

If a multisample framebuffer object is used then the value returned from this function will be invalid.

Upstream PySide2 reference signatures (binding differences may apply):

texture(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qglframebufferobject.html#texture

toImage

toImage() -> Any

X.toImage() -> PythonQt.QtGui.QImage

Supplemental documentation: Qt 5 reference:

QImage QGLFramebufferObject::toImage() const

Returns the contents of this framebuffer object as a QImage.

The returned image has a format of premultiplied ARGB32 or RGB32. The latter is used only when internalTextureFormat() is set to GL_RGB.

If the rendering in the framebuffer was not done with premultiplied alpha in mind, create a wrapper QImage with a non-premultiplied format. This is necessary before performing operations like QImage::save() because otherwise the image data would get unpremultiplied, even though it was not premultiplied in the first place. To create such a wrapper without performing a copy of the pixel data, do the following:

QImage fboImage(fbo.toImage());
QImage image(fboImage.constBits(), fboImage.width(), fboImage.height(), QImage::Format_ARGB32);

On QNX the back buffer is not preserved when a buffer swap occures. So this function might return old content.

Upstream PySide2 reference signatures (binding differences may apply):

toImage(self) -> PySide2.QtGui.QImage

Source: https://doc.qt.io/archives/qt-5.15/qglframebufferobject.html#toImage