Home · All Classes · Overviews

QGLFramebufferObjectFormat Class Reference
[QtOpenGL module]

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

 #include <QGLFramebufferObjectFormat>

This class was introduced in Qt 4.6.


Public Functions

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

Detailed Description

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

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.

See also QGLFramebufferObject.


Member Function Documentation

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.

See also samples(), attachment(), target(), and internalTextureFormat().

QGLFramebufferObjectFormat::QGLFramebufferObjectFormat ( const QGLFramebufferObjectFormat & other )

Constructs a copy of other.

QGLFramebufferObjectFormat::~QGLFramebufferObjectFormat ()

Destroys the QGLFramebufferObjectFormat.

QGLFramebufferObject::Attachment QGLFramebufferObjectFormat::attachment () const

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

See also setAttachment().

GLenum QGLFramebufferObjectFormat::internalTextureFormat () const

Returns the internal format of a framebuffer object's texture or multisample framebuffer object's color buffer.

See also setInternalTextureFormat().

int QGLFramebufferObjectFormat::samples () const

Returns the number of samples per pixel if a framebuffer object is a multisample framebuffer object. Otherwise, returns 0.

See also setSamples().

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

Sets the attachment configuration of a framebuffer object to attachment.

See also 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.

See also internalTextureFormat().

void QGLFramebufferObjectFormat::setSamples ( int samples )

Sets the number of samples per pixel for a multisample framebuffer object to samples. A 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 can not 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 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.

See also textureTarget() and samples().

GLenum QGLFramebufferObjectFormat::textureTarget () const

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

See also setTextureTarget() and samples().

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

Assigns other to this object.


Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt 4.6.0-tp1