QGLFramebufferObjectFormat Class

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

頭: #include <QGLFramebufferObjectFormat>
qmake: QT += opengl
Since: Qt 4.6

該類已過時。 提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

該類在 Qt 4.6 引入。

公共函數

QGLFramebufferObjectFormat (const QGLFramebufferObjectFormat & other )
QGLFramebufferObjectFormat ()
QGLFramebufferObjectFormat & operator= (const QGLFramebufferObjectFormat & other )
~QGLFramebufferObjectFormat ()
QGLFramebufferObject::Attachment attachment () const
GLenum internalTextureFormat () const
bool mipmap () const
int samples () const
void setAttachment (QGLFramebufferObject::Attachment attachment )
void setInternalTextureFormat (GLenum internalTextureFormat )
void setMipmap (bool enabled )
void setSamples (int samples )
void setTextureTarget (GLenum target )
GLenum textureTarget () const
bool operator!= (const QGLFramebufferObjectFormat & other ) const
bool operator== (const QGLFramebufferObjectFormat & other ) const

詳細描述

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 QGLFramebufferObject::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 .

另請參閱 QGLFramebufferObject .

成員函數文檔編製

QGLFramebufferObjectFormat:: QGLFramebufferObjectFormat (const QGLFramebufferObjectFormat & other )

構造副本為 other .

QGLFramebufferObjectFormat:: QGLFramebufferObjectFormat ()

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

另請參閱 samples (), attachment (),和 internalTextureFormat ().

QGLFramebufferObjectFormat &QGLFramebufferObjectFormat:: operator= (const QGLFramebufferObjectFormat & other )

賦值 other 到此對象。

QGLFramebufferObjectFormat:: ~QGLFramebufferObjectFormat ()

銷毀 QGLFramebufferObjectFormat .

QGLFramebufferObject::Attachment QGLFramebufferObjectFormat:: attachment () const

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

另請參閱 setAttachment ().

GLenum QGLFramebufferObjectFormat:: internalTextureFormat () const

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.

另請參閱 setInternalTextureFormat ().

bool QGLFramebufferObjectFormat:: mipmap () const

返迴 true if mipmapping is enabled.

該函數在 Qt 4.8 引入。

另請參閱 setMipmap ().

int QGLFramebufferObjectFormat:: samples () const

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 ().

void QGLFramebufferObjectFormat:: setAttachment ( QGLFramebufferObject::Attachment attachment )

Sets the attachment configuration of a framebuffer object to attachment .

另請參閱 attachment ().

void QGLFramebufferObjectFormat:: setInternalTextureFormat ( GLenum internalTextureFormat )

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

另請參閱 internalTextureFormat ().

void QGLFramebufferObjectFormat:: setMipmap ( bool enabled )

Enables mipmapping if enabled 為 true;否則禁用它。

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.

該函數在 Qt 4.8 引入。

另請參閱 mipmap () 和 QGLFramebufferObject::texture ().

void QGLFramebufferObjectFormat:: setSamples ( int samples )

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 ().

void QGLFramebufferObjectFormat:: setTextureTarget ( GLenum target )

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

另請參閱 textureTarget () 和 samples ().

GLenum QGLFramebufferObjectFormat:: textureTarget () const

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

另請參閱 setTextureTarget () 和 samples ().

bool QGLFramebufferObjectFormat:: operator!= (const QGLFramebufferObjectFormat & other ) const

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

bool QGLFramebufferObjectFormat:: operator== (const QGLFramebufferObjectFormat & other ) const

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