QOpenGLFramebufferObjectFormat Class
La clase `QOpenGLFramebufferObjectFormat` especifica el formato de un objeto de framebuffer de OpenGL. Más información...
| 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, incluidos los heredados
- QOpenGLFramebufferObjectFormat forma 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 de búfer de fotogramas tiene varias características:
- Number of samples per pixels.
- Depth and/or stencil attachments.
- Texture target.
- Internal texture format.
Ten en cuenta que es posible que el controlador de hardware no admita los complementos deseados o el número de muestras por píxel. Llama a QOpenGLFramebufferObject::format() después de crear un QOpenGLFramebufferObject para averiguar el formato exacto que se utilizó para crear el objeto de búfer de fotogramas.
Véase también ` QOpenGLFramebufferObject`.
Documentación de las funciones miembro
QOpenGLFramebufferObjectFormat::QOpenGLFramebufferObjectFormat()
Crea un objeto `QOpenGLFramebufferObjectFormat` para especificar el formato de un objeto de framebuffer de OpenGL.
Por defecto, el formato especifica un objeto de búfer de fotogramas sin multimuestreo, sin anexos de profundidad/estencil, con destino de textura GL_TEXTURE_2D y formato interno GL_RGBA8. En sistemas OpenGL/ES, el formato interno por defecto es GL_RGBA.
Véanse también samples(), attachment() y internalTextureFormat().
QOpenGLFramebufferObjectFormat::QOpenGLFramebufferObjectFormat(const QOpenGLFramebufferObjectFormat &other)
Crea una copia de other.
[noexcept] QOpenGLFramebufferObjectFormat::~QOpenGLFramebufferObjectFormat()
Destruye el « QOpenGLFramebufferObjectFormat ».
QOpenGLFramebufferObject::Attachment QOpenGLFramebufferObjectFormat::attachment() const
Devuelve la configuración de los búferes de profundidad y de plantilla asociados 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 búfer de color de un objeto framebuffer multisample. 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 el mipmapping está activado.
Véase también setMipmap().
int QOpenGLFramebufferObjectFormat::samples() const
Devuelve el número de muestras por píxel si un objeto de búfer de fotogramas es un objeto de búfer de fotogramas 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 conexión 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 búfer de color de un objeto framebuffer multisample en « internalTextureFormat ».
Véase también internalTextureFormat().
void QOpenGLFramebufferObjectFormat::setMipmap(bool enabled)
Activa el mipmapping si la opción « enabled » está en «true»; en caso contrario, lo desactiva.
El mipmapping está desactivado por defecto.
Si se habilita el mipmapping, se asignará memoria adicional para los niveles de mipmap. Los niveles de mipmap se pueden actualizar vinculando la textura y llamando a glGenerateMipmap(). El mipmapping no se puede habilitar para objetos de framebuffer con muestreo múltiple.
Véanse también mipmap() y QOpenGLFramebufferObject::texture().
void QOpenGLFramebufferObjectFormat::setSamples(int samples)
Establece el número de muestras por píxel para un objeto de búfer de trama con multimuestreo en ` samples`. El recuento predeterminado de muestras, 0, corresponde a un objeto de búfer de trama normal, sin multimuestreo.
Si el hardware no admite el número deseado de muestras por píxel, se utilizará el número máximo de muestras por píxel. Ten en cuenta que los objetos de búfer de fotogramas multimuestra no se pueden vincular como texturas. Además, se requiere la extensión GL_EXT_framebuffer_multisample para crear un búfer de fotogramas con más de una muestra por píxel.
Véase también samples().
void QOpenGLFramebufferObjectFormat::setTextureTarget(GLenum target)
Establece el destino de la textura asociada a un objeto framebuffer en target. Se ignora en el caso de los objetos framebuffer multisample.
Véase también textureTarget() y samples().
GLenum QOpenGLFramebufferObjectFormat::textureTarget() const
Devuelve el destino de la textura asociada a un objeto framebuffer. Se ignora en el caso de los 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 de framebuffer son iguales a las de « 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 de framebuffer son iguales a ` 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.