内容表

上一话题

QGLFramebufferObject

下一话题

QGLPixelBuffer

QGLFramebufferObjectFormat

QGLFramebufferObjectFormat class specifies the format of an OpenGL framebuffer object. 更多

Inheritance diagram of PySide2.QtOpenGL.QGLFramebufferObjectFormat

4.6 版新增。

概要

函数

详细描述

A framebuffer object has several characteristics:

Note that the desired attachments or number of samples per pixels might not be supported by the hardware driver. Call format() after creating a QGLFramebufferObject to find the exact format that was used to create the frame buffer object.

注意

This class has been deprecated in favor of QOpenGLFramebufferObjectFormat .

class QGLFramebufferObjectFormat

QGLFramebufferObjectFormat(other)

param other

QGLFramebufferObjectFormat

创建 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 format GL_RGBA8 . On OpenGL/ES systems, the default internal format is GL_RGBA .

构造副本为 other .

PySide2.QtOpenGL.QGLFramebufferObjectFormat. attachment ( )
返回类型

Attachment

Returns the configuration of the depth and stencil buffers attached to a framebuffer object. The default is NoAttachment .

另请参阅

setAttachment()

PySide2.QtOpenGL.QGLFramebufferObjectFormat. internalTextureFormat ( )
返回类型

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, and GL_RGBA on OpenGL/ES systems.

PySide2.QtOpenGL.QGLFramebufferObjectFormat. mipmap ( )
返回类型

bool

返回 true if mipmapping is enabled.

另请参阅

setMipmap()

PySide2.QtOpenGL.QGLFramebufferObjectFormat. __ne__ ( other )
参数

other QGLFramebufferObjectFormat

返回类型

bool

返回 false if all the options of this framebuffer object format are the same as other ;否则返回 true .

PySide2.QtOpenGL.QGLFramebufferObjectFormat. __eq__ ( other )
参数

other QGLFramebufferObjectFormat

返回类型

bool

返回 true if all the options of this framebuffer object format are the same as other ;否则返回 false .

PySide2.QtOpenGL.QGLFramebufferObjectFormat. samples ( )
返回类型

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.

另请参阅

setSamples()

PySide2.QtOpenGL.QGLFramebufferObjectFormat. setAttachment ( attachment )
参数

attachment Attachment

Sets the attachment configuration of a framebuffer object to attachment .

另请参阅

attachment()

PySide2.QtOpenGL.QGLFramebufferObjectFormat. setInternalTextureFormat ( internalTextureFormat )
参数

internalTextureFormat GLenum

Sets the internal format of a framebuffer object’s texture or multisample framebuffer object’s color buffer to internalTextureFormat .

PySide2.QtOpenGL.QGLFramebufferObjectFormat. setMipmap ( enabled )
参数

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 )
参数

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.

另请参阅

samples()

PySide2.QtOpenGL.QGLFramebufferObjectFormat. setTextureTarget ( target )
参数

target GLenum

Sets the texture target of the texture attached to a framebuffer object to target . Ignored for multisample framebuffer objects.

PySide2.QtOpenGL.QGLFramebufferObjectFormat. textureTarget ( )
返回类型

GLenum

Returns the texture target of the texture attached to a framebuffer object. Ignored for multisample framebuffer objects. The default is GL_TEXTURE_2D .