QGLFramebufferObjectFormat¶
The
QGLFramebufferObjectFormat
class specifies the format of an OpenGL framebuffer object. More…
New in version 4.6.
Synopsis¶
Functions¶
def
__eq__
(other)def
__ne__
(other)def
attachment
()def
internalTextureFormat
()def
mipmap
()def
samples
()def
setAttachment
(attachment)def
setInternalTextureFormat
(internalTextureFormat)def
setMipmap
(enabled)def
setSamples
(samples)def
setTextureTarget
(target)def
textureTarget
()
Detailed Description¶
A framebuffer object has several characteristics:
PySide2.QtOpenGL.QGLFramebufferObjectFormat.setTextureTarget()
PySide2.QtOpenGL.QGLFramebufferObjectFormat.setInternalTextureFormat()
Note that the desired attachments or number of samples per pixels might not be supported by the hardware driver. Call
format()
after creating aQGLFramebufferObject
to find the exact format that was used to create the frame buffer object.Note
This class has been deprecated in favor of
QOpenGLFramebufferObjectFormat
.See also
- class PySide2.QtOpenGL.QGLFramebufferObjectFormat¶
PySide2.QtOpenGL.QGLFramebufferObjectFormat(other)
- param other:
Creates a
QGLFramebufferObjectFormat
object for specifying the format of an OpenGL framebuffer object.By default the format specifies a non-multisample framebuffer object with no attachments, texture target
GL_TEXTURE_2D
, and internal formatGL_RGBA8
. On OpenGL/ES systems, the default internal format isGL_RGBA
.See also
Constructs a copy of
other
.
- PySide2.QtOpenGL.QGLFramebufferObjectFormat.attachment()¶
- Return type:
Returns the configuration of the depth and stencil buffers attached to a framebuffer object. The default is
NoAttachment
.See also
- PySide2.QtOpenGL.QGLFramebufferObjectFormat.internalTextureFormat()¶
- Return type:
GLenum
Returns the internal format of a framebuffer object’s texture or multisample framebuffer object’s color buffer. The default is
GL_RGBA8
on desktop OpenGL systems, andGL_RGBA
on OpenGL/ES systems.See also
- PySide2.QtOpenGL.QGLFramebufferObjectFormat.mipmap()¶
- Return type:
bool
Returns
true
if mipmapping is enabled.See also
- PySide2.QtOpenGL.QGLFramebufferObjectFormat.__ne__(other)¶
- Parameters:
- Return type:
bool
Returns
false
if all the options of this framebuffer object format are the same asother
; otherwise returnstrue
.
- PySide2.QtOpenGL.QGLFramebufferObjectFormat.__eq__(other)¶
- Parameters:
- Return type:
bool
Returns
true
if all the options of this framebuffer object format are the same asother
; otherwise returnsfalse
.
- PySide2.QtOpenGL.QGLFramebufferObjectFormat.samples()¶
- Return type:
int
Returns the number of samples per pixel if a framebuffer object is a multisample framebuffer object. Otherwise, returns 0. The default value is 0.
See also
- PySide2.QtOpenGL.QGLFramebufferObjectFormat.setAttachment(attachment)¶
- Parameters:
attachment –
Attachment
Sets the attachment configuration of a framebuffer object to
attachment
.See also
- PySide2.QtOpenGL.QGLFramebufferObjectFormat.setInternalTextureFormat(internalTextureFormat)¶
- Parameters:
internalTextureFormat –
GLenum
Sets the internal format of a framebuffer object’s texture or multisample framebuffer object’s color buffer to
internalTextureFormat
.See also
- PySide2.QtOpenGL.QGLFramebufferObjectFormat.setMipmap(enabled)¶
- Parameters:
enabled – bool
Enables mipmapping if
enabled
is true; otherwise disables it.Mipmapping is disabled by default.
If mipmapping is enabled, additional memory will be allocated for the mipmap levels. The mipmap levels can be updated by binding the texture and calling glGenerateMipmap(). Mipmapping cannot be enabled for multisampled framebuffer objects.
- PySide2.QtOpenGL.QGLFramebufferObjectFormat.setSamples(samples)¶
- Parameters:
samples – int
Sets the number of samples per pixel for a multisample framebuffer object to
samples
. The default sample count of 0 represents a regular non-multisample framebuffer object.If the desired amount of samples per pixel is not supported by the hardware then the maximum number of samples per pixel will be used. Note that multisample framebuffer objects cannot be bound as textures. Also, the
GL_EXT_framebuffer_multisample
extension is required to create a framebuffer with more than one sample per pixel.See also
- PySide2.QtOpenGL.QGLFramebufferObjectFormat.setTextureTarget(target)¶
- Parameters:
target –
GLenum
Sets the texture target of the texture attached to a framebuffer object to
target
. Ignored for multisample framebuffer objects.See also
- PySide2.QtOpenGL.QGLFramebufferObjectFormat.textureTarget()¶
- Return type:
GLenum
Returns the texture target of the texture attached to a framebuffer object. Ignored for multisample framebuffer objects. The default is
GL_TEXTURE_2D
.See also
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.