<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html><head><title>QGLFramebufferObjectFormat Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm } a:link { color: #004faf; text-decoration: none } a:visited { color: #672967; text-decoration: none } td.postheader { font-family: sans-serif } tr.address { font-family: sans-serif } body { background: #ffffff; color: black; } </style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QGLFramebufferObjectFormat Class Reference<br /><sup><sup>[<a href="qtopengl.html">QtOpenGL</a> module]</sup></sup></h1><p>The QGLFramebufferObjectFormat class specifies the format of an OpenGL framebuffer object. <a href="#details">More...</a></p> <h3>Methods</h3><ul><li><div class="fn" /><b><a href="qglframebufferobjectformat.html#QGLFramebufferObjectFormat">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qglframebufferobjectformat.html#QGLFramebufferObjectFormat-2">__init__</a></b> (<i>self</i>, QGLFramebufferObjectFormat <i>other</i>)</li><li><div class="fn" />QGLFramebufferObject.Attachment <b><a href="qglframebufferobjectformat.html#attachment">attachment</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qglframebufferobjectformat.html#internalTextureFormat">internalTextureFormat</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qglframebufferobjectformat.html#mipmap">mipmap</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qglframebufferobjectformat.html#samples">samples</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qglframebufferobjectformat.html#setAttachment">setAttachment</a></b> (<i>self</i>, QGLFramebufferObject.Attachment <i>attachment</i>)</li><li><div class="fn" /><b><a href="qglframebufferobjectformat.html#setInternalTextureFormat">setInternalTextureFormat</a></b> (<i>self</i>, int <i>internalTextureFormat</i>)</li><li><div class="fn" /><b><a href="qglframebufferobjectformat.html#setMipmap">setMipmap</a></b> (<i>self</i>, bool <i>enabled</i>)</li><li><div class="fn" /><b><a href="qglframebufferobjectformat.html#setSamples">setSamples</a></b> (<i>self</i>, int <i>samples</i>)</li><li><div class="fn" /><b><a href="qglframebufferobjectformat.html#setTextureTarget">setTextureTarget</a></b> (<i>self</i>, int <i>target</i>)</li><li><div class="fn" />int <b><a href="qglframebufferobjectformat.html#textureTarget">textureTarget</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qglframebufferobjectformat.html#__eq__">__eq__</a></b> (<i>self</i>, QGLFramebufferObjectFormat <i>other</i>)</li><li><div class="fn" />bool <b><a href="qglframebufferobjectformat.html#__ne__">__ne__</a></b> (<i>self</i>, QGLFramebufferObjectFormat <i>other</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QGLFramebufferObjectFormat class specifies the format of an OpenGL framebuffer object.</p> <p>A framebuffer object has several characteristics:</p> <ul> <li><a href="qglframebufferobjectformat.html#setSamples">Number of samples per pixels.</a></li> <li><a href="qglframebufferobjectformat.html#setAttachment">Depth and/or stencil attachments.</a></li> <li><a href="qglframebufferobjectformat.html#setTextureTarget">Texture target.</a></li> <li><a href="qglframebufferobjectformat.html#setInternalTextureFormat">Internal texture format.</a></li> </ul> <p>Note that the desired attachments or number of samples per pixels might not be supported by the hardware driver. Call <a href="qglframebufferobject.html#format">QGLFramebufferObject.format</a>() after creating a <a href="qglframebufferobject.html">QGLFramebufferObject</a> to find the exact format that was used to create the frame buffer object.</p> <hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QGLFramebufferObjectFormat" />QGLFramebufferObjectFormat.__init__ (<i>self</i>)</h3><p>Creates a <a href="qglframebufferobjectformat.html">QGLFramebufferObjectFormat</a> object for specifying the format of an OpenGL framebuffer object.</p> <p>By default the format specifies a non-multisample framebuffer object with no attachments, texture target <tt>GL_TEXTURE_2D</tt>, and internal format <tt>GL_RGBA8</tt>. On OpenGL/ES systems, the default internal format is <tt>GL_RGBA</tt>.</p> <p><b>See also</b> <a href="qglframebufferobjectformat.html#samples">samples</a>(), <a href="qglframebufferobjectformat.html#attachment">attachment</a>(), and <a href="qglframebufferobjectformat.html#internalTextureFormat">internalTextureFormat</a>().</p> <h3 class="fn"><a name="QGLFramebufferObjectFormat-2" />QGLFramebufferObjectFormat.__init__ (<i>self</i>, <a href="qglframebufferobjectformat.html">QGLFramebufferObjectFormat</a> <i>other</i>)</h3><p>Constructs a copy of <i>other</i>.</p> <h3 class="fn"><a name="attachment" /><a href="qglframebufferobject.html#Attachment-enum">QGLFramebufferObject.Attachment</a> QGLFramebufferObjectFormat.attachment (<i>self</i>)</h3><p>Returns the configuration of the depth and stencil buffers attached to a framebuffer object. The default is <a href="qglframebufferobject.html#Attachment-enum">QGLFramebufferObject.NoAttachment</a>.</p> <p><b>See also</b> <a href="qglframebufferobjectformat.html#setAttachment">setAttachment</a>().</p> <h3 class="fn"><a name="internalTextureFormat" />int QGLFramebufferObjectFormat.internalTextureFormat (<i>self</i>)</h3><p>Returns the internal format of a framebuffer object's texture or multisample framebuffer object's color buffer. The default is <tt>GL_RGBA8</tt> on desktop OpenGL systems, and <tt>GL_RGBA</tt> on OpenGL/ES systems.</p> <p><b>See also</b> <a href="qglframebufferobjectformat.html#setInternalTextureFormat">setInternalTextureFormat</a>().</p> <h3 class="fn"><a name="mipmap" />bool QGLFramebufferObjectFormat.mipmap (<i>self</i>)</h3><p>Returns true if mipmapping is enabled.</p> <p>This function was introduced in Qt 4.8.</p> <p><b>See also</b> <a href="qglframebufferobjectformat.html#setMipmap">setMipmap</a>().</p> <h3 class="fn"><a name="samples" />int QGLFramebufferObjectFormat.samples (<i>self</i>)</h3><p>Returns the number of samples per pixel if a framebuffer object is a multisample framebuffer object. Otherwise, returns 0. The default value is 0.</p> <p><b>See also</b> <a href="qglframebufferobjectformat.html#setSamples">setSamples</a>().</p> <h3 class="fn"><a name="setAttachment" />QGLFramebufferObjectFormat.setAttachment (<i>self</i>, <a href="qglframebufferobject.html#Attachment-enum">QGLFramebufferObject.Attachment</a> <i>attachment</i>)</h3><p>Sets the attachment configuration of a framebuffer object to <i>attachment</i>.</p> <p><b>See also</b> <a href="qglframebufferobjectformat.html#attachment">attachment</a>().</p> <h3 class="fn"><a name="setInternalTextureFormat" />QGLFramebufferObjectFormat.setInternalTextureFormat (<i>self</i>, int <i>internalTextureFormat</i>)</h3><p>Sets the internal format of a framebuffer object's texture or multisample framebuffer object's color buffer to <i>internalTextureFormat</i>.</p> <p><b>See also</b> <a href="qglframebufferobjectformat.html#internalTextureFormat">internalTextureFormat</a>().</p> <h3 class="fn"><a name="setMipmap" />QGLFramebufferObjectFormat.setMipmap (<i>self</i>, bool <i>enabled</i>)</h3><p>Enables mipmapping if <i>enabled</i> is true; otherwise disables it.</p> <p>Mipmapping is disabled by default.</p> <p>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.</p> <p>This function was introduced in Qt 4.8.</p> <p><b>See also</b> <a href="qglframebufferobjectformat.html#mipmap">mipmap</a>() and <a href="qglframebufferobject.html#texture">QGLFramebufferObject.texture</a>().</p> <h3 class="fn"><a name="setSamples" />QGLFramebufferObjectFormat.setSamples (<i>self</i>, int <i>samples</i>)</h3><p>Sets the number of samples per pixel for a multisample framebuffer object to <i>samples</i>. The default sample count of 0 represents a regular non-multisample framebuffer object.</p> <p>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 <tt>GL_EXT_framebuffer_multisample</tt> extension is required to create a framebuffer with more than one sample per pixel.</p> <p><b>See also</b> <a href="qglframebufferobjectformat.html#samples">samples</a>().</p> <h3 class="fn"><a name="setTextureTarget" />QGLFramebufferObjectFormat.setTextureTarget (<i>self</i>, int <i>target</i>)</h3><p>Sets the texture target of the texture attached to a framebuffer object to <i>target</i>. Ignored for multisample framebuffer objects.</p> <p><b>See also</b> <a href="qglframebufferobjectformat.html#textureTarget">textureTarget</a>() and <a href="qglframebufferobjectformat.html#samples">samples</a>().</p> <h3 class="fn"><a name="textureTarget" />int QGLFramebufferObjectFormat.textureTarget (<i>self</i>)</h3><p>Returns the texture target of the texture attached to a framebuffer object. Ignored for multisample framebuffer objects. The default is <tt>GL_TEXTURE_2D</tt>.</p> <p><b>See also</b> <a href="qglframebufferobjectformat.html#setTextureTarget">setTextureTarget</a>() and <a href="qglframebufferobjectformat.html#samples">samples</a>().</p> <h3 class="fn"><a name="__eq__" />bool QGLFramebufferObjectFormat.__eq__ (<i>self</i>, <a href="qglframebufferobjectformat.html">QGLFramebufferObjectFormat</a> <i>other</i>)</h3><h3 class="fn"><a name="__ne__" />bool QGLFramebufferObjectFormat.__ne__ (<i>self</i>, <a href="qglframebufferobjectformat.html">QGLFramebufferObjectFormat</a> <i>other</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.10.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt 4.8.5</td></tr></table></div></address></body></html>