QOpenGLFramebufferObjectFormat Class
La clase QOpenGLFramebufferObjectFormat especifica el formato de un objeto framebuffer OpenGL. Más...
| Cabecera: | #include <QOpenGLFramebufferObjectFormat> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS OpenGL)target_link_libraries(mytarget PRIVATE Qt6::OpenGL) |
| qmake: | QT += opengl |
- Lista de todos los miembros, incluyendo los heredados
- QOpenGLFramebufferObjectFormat es parte de Renderizado en 3D.
Funciones Públicas
| QOpenGLFramebufferObjectFormat() | |
| QOpenGLFramebufferObjectFormat(const QOpenGLFramebufferObjectFormat &other) | |
| ~QOpenGLFramebufferObjectFormat() | |
| QOpenGLFramebufferObject::Attachment | attachment() const |
| GLenum | internalTextureFormat() const |
| bool | mipmap() const |
| int | samples() const |
| void | setAttachment(QOpenGLFramebufferObject::Attachment attachment) |
| void | setInternalTextureFormat(GLenum internalTextureFormat) |
| void | setMipmap(bool enabled) |
| void | setSamples(int samples) |
| void | setTextureTarget(GLenum target) |
| GLenum | textureTarget() const |
| bool | operator!=(const QOpenGLFramebufferObjectFormat &other) const |
| QOpenGLFramebufferObjectFormat & | operator=(const QOpenGLFramebufferObjectFormat &other) |
| bool | operator==(const QOpenGLFramebufferObjectFormat &other) const |
Descripción Detallada
Un objeto framebuffer tiene varias características:
- Number of samples per pixels.
- Depth and/or stencil attachments.
- Texture target.
- Internal texture format.
Ten en cuenta que los adjuntos deseados o el número de muestras por píxel pueden no ser soportados por el controlador de hardware. Llame a QOpenGLFramebufferObject::format() después de crear un QOpenGLFramebufferObject para encontrar el formato exacto que se utilizó para crear el objeto frame buffer.
Véase también QOpenGLFramebufferObject.
Documentación de funciones miembro
QOpenGLFramebufferObjectFormat::QOpenGLFramebufferObjectFormat()
Crea un objeto QOpenGLFramebufferObjectFormat para especificar el formato de un objeto framebuffer OpenGL.
Por defecto, el formato especifica un objeto framebuffer no multimuestra sin adjuntos de profundidad/esténcil, objetivo de textura GL_TEXTURE_2D, y formato interno GL_RGBA8. En sistemas OpenGL/ES, el formato interno por defecto es GL_RGBA.
Véase también samples(), attachment(), y internalTextureFormat().
QOpenGLFramebufferObjectFormat::QOpenGLFramebufferObjectFormat(const QOpenGLFramebufferObjectFormat &other)
Construye una copia de other.
[noexcept] QOpenGLFramebufferObjectFormat::~QOpenGLFramebufferObjectFormat()
Destruye el QOpenGLFramebufferObjectFormat.
QOpenGLFramebufferObject::Attachment QOpenGLFramebufferObjectFormat::attachment() const
Devuelve la configuración de los buffers de profundidad y stencil adjuntos a un objeto framebuffer. El valor por defecto es QOpenGLFramebufferObject::NoAttachment.
Véase también setAttachment().
GLenum QOpenGLFramebufferObjectFormat::internalTextureFormat() const
Devuelve el formato interno de la textura de un objeto framebuffer o del buffer de color de un objeto framebuffer multimuestra. El valor por defecto es GL_RGBA8 en sistemas OpenGL de escritorio, y GL_RGBA en sistemas OpenGL/ES.
Véase también setInternalTextureFormat().
bool QOpenGLFramebufferObjectFormat::mipmap() const
Devuelve true si mipmapping está habilitado.
Véase también setMipmap().
int QOpenGLFramebufferObjectFormat::samples() const
Devuelve el número de muestras por píxel si un objeto framebuffer es un objeto framebuffer multimuestra. En caso contrario, devuelve 0. El valor por defecto es 0.
Véase también setSamples().
void QOpenGLFramebufferObjectFormat::setAttachment(QOpenGLFramebufferObject::Attachment attachment)
Establece la configuración de adjuntos de un objeto framebuffer en attachment.
Véase también attachment().
void QOpenGLFramebufferObjectFormat::setInternalTextureFormat(GLenum internalTextureFormat)
Establece el formato interno de la textura de un objeto framebuffer o del buffer de color de un objeto framebuffer multimuestra a internalTextureFormat.
Véase también internalTextureFormat().
void QOpenGLFramebufferObjectFormat::setMipmap(bool enabled)
Activa el mipmapping si enabled es verdadero; en caso contrario, lo desactiva.
El mipmapping está desactivado por defecto.
Si el mipmapping está activado, se asignará memoria adicional para los niveles del mipmap. Los niveles mipmap pueden actualizarse vinculando la textura y llamando a glGenerateMipmap(). El mipmapping no puede activarse para objetos framebuffer multimuestreados.
Véase también mipmap() y QOpenGLFramebufferObject::texture().
void QOpenGLFramebufferObjectFormat::setSamples(int samples)
Establece el número de muestras por píxel para un objeto framebuffer multimuestra en samples. El número de muestras por defecto de 0 representa un objeto framebuffer normal no multimuestra.
Si la cantidad deseada de muestras por píxel no es soportada por el hardware, entonces se utilizará el número máximo de muestras por píxel. Tenga en cuenta que los objetos framebuffer multimuestras no se pueden enlazar como texturas. Además, se necesita la extensión GL_EXT_framebuffer_multisample para crear un framebuffer con más de una muestra por píxel.
Véase también samples().
void QOpenGLFramebufferObjectFormat::setTextureTarget(GLenum target)
Establece la textura objetivo de la textura adjunta a un objeto framebuffer a target. Ignorado para objetos framebuffer multimuestra.
Véase también textureTarget() y samples().
GLenum QOpenGLFramebufferObjectFormat::textureTarget() const
Devuelve la textura objetivo de la textura adjunta a un objeto framebuffer. Ignorado para objetos framebuffer multimuestra. El valor por defecto es GL_TEXTURE_2D.
Véase también setTextureTarget() y samples().
bool QOpenGLFramebufferObjectFormat::operator!=(const QOpenGLFramebufferObjectFormat &other) const
Devuelve false si todas las opciones de este formato de objeto framebuffer son las mismas que other; en caso contrario devuelve true.
QOpenGLFramebufferObjectFormat &QOpenGLFramebufferObjectFormat::operator=(const QOpenGLFramebufferObjectFormat &other)
Asigna other a este objeto.
bool QOpenGLFramebufferObjectFormat::operator==(const QOpenGLFramebufferObjectFormat &other) const
Devuelve true si todas las opciones de este formato de objeto framebuffer son las mismas que other; en caso contrario devuelve false.
© 2026 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.