Auf dieser Seite

QOpenGLFramebufferObjectFormat Class

Die Klasse `QOpenGLFramebufferObjectFormat` legt das Format eines OpenGL-Framebuffer-Objekts fest. Mehr...

Header: #include <QOpenGLFramebufferObjectFormat>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpenGL)
target_link_libraries(mytarget PRIVATE Qt6::OpenGL)
qmake: QT += opengl

Öffentliche Funktionen

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

Ausführliche Beschreibung

Ein Framebuffer-Objekt weist mehrere Eigenschaften auf:

Beachten Sie, dass die gewünschten Anhänge oder die Anzahl der Samples pro Pixel möglicherweise vom Hardwaretreiber nicht unterstützt werden. Rufen Sie nach dem Erstellen eines ` QOpenGLFramebufferObject ` die Funktion ` QOpenGLFramebufferObject::format()` auf, um das genaue Format zu ermitteln, das zum Erstellen des Framebuffer-Objekts verwendet wurde.

Siehe auch „ QOpenGLFramebufferObject “.

Dokumentation zu den Member-Funktionen

QOpenGLFramebufferObjectFormat::QOpenGLFramebufferObjectFormat()

Erstellt ein `QOpenGLFramebufferObjectFormat`-Objekt zur Festlegung des Formats eines OpenGL-Framebuffer-Objekts.

Standardmäßig legt das Format ein Framebuffer-Objekt ohne Multisampling und ohne Depth-/Stencil-Anhänge fest, mit dem Texturziel „ GL_TEXTURE_2D “ und dem internen Format „ GL_RGBA8 “. Auf OpenGL/ES-Systemen ist das standardmäßige interne Format „ GL_RGBA “.

Siehe auch samples(), attachment() und internalTextureFormat().

QOpenGLFramebufferObjectFormat::QOpenGLFramebufferObjectFormat(const QOpenGLFramebufferObjectFormat &other)

Erstellt eine Kopie von „ other “.

[noexcept] QOpenGLFramebufferObjectFormat::~QOpenGLFramebufferObjectFormat()

Zerstört die „ QOpenGLFramebufferObjectFormat “.

QOpenGLFramebufferObject::Attachment QOpenGLFramebufferObjectFormat::attachment() const

Gibt die Konfiguration der an ein Framebuffer-Objekt angehängten Tiefen- und Stencil-Puffer zurück. Der Standardwert ist „ QOpenGLFramebufferObject::NoAttachment “.

Siehe auch setAttachment().

GLenum QOpenGLFramebufferObjectFormat::internalTextureFormat() const

Gibt das interne Format der Textur eines Framebuffer-Objekts oder des Farbpuffers eines Multisample-Framebuffer-Objekts zurück. Der Standardwert ist „ GL_RGBA8 “ auf Desktop-OpenGL-Systemen und „ GL_RGBA “ auf OpenGL/ES-Systemen.

Siehe auch setInternalTextureFormat().

bool QOpenGLFramebufferObjectFormat::mipmap() const

Gibt „ true “ zurück, wenn Mipmapping aktiviert ist.

Siehe auch ` setMipmap()`.

int QOpenGLFramebufferObjectFormat::samples() const

Gibt die Anzahl der Samples pro Pixel zurück, wenn es sich bei einem Framebuffer-Objekt um ein Multisample-Framebuffer-Objekt handelt. Andernfalls wird 0 zurückgegeben. Der Standardwert ist 0.

Siehe auch ` setSamples()`.

void QOpenGLFramebufferObjectFormat::setAttachment(QOpenGLFramebufferObject::Attachment attachment)

Legt die Anbindungskonfiguration eines Framebuffer-Objekts auf „ attachment “ fest.

Siehe auch ` attachment()`.

void QOpenGLFramebufferObjectFormat::setInternalTextureFormat(GLenum internalTextureFormat)

Legt das interne Format der Textur eines Framebuffer-Objekts oder des Farbpuffers eines Multisample-Framebuffer-Objekts auf „ internalTextureFormat “ fest.

Siehe auch ` internalTextureFormat()`.

void QOpenGLFramebufferObjectFormat::setMipmap(bool enabled)

Aktiviert Mipmapping, wenn „ enabled “ auf „true“ gesetzt ist; andernfalls wird es deaktiviert.

Mipmapping ist standardmäßig deaktiviert.

Wenn Mipmapping aktiviert ist, wird zusätzlicher Speicher für die Mipmap-Ebenen zugewiesen. Die Mipmap-Ebenen können durch Binden der Textur und Aufruf von `glGenerateMipmap()` aktualisiert werden. Mipmapping kann für Framebuffer-Objekte mit Multisampling nicht aktiviert werden.

Siehe auch „ mipmap()“ und „ QOpenGLFramebufferObject::texture()“.

void QOpenGLFramebufferObjectFormat::setSamples(int samples)

Legt die Anzahl der Samples pro Pixel für ein Multisample-Framebuffer-Objekt auf „ samples “ fest. Die Standardanzahl von 0 entspricht einem regulären Framebuffer-Objekt ohne Multisample.

Wenn die gewünschte Anzahl von Samples pro Pixel von der Hardware nicht unterstützt wird, wird die maximale Anzahl von Samples pro Pixel verwendet. Beachten Sie, dass Multisample-Framebuffer-Objekte nicht als Texturen gebunden werden können. Außerdem ist die Erweiterung „ GL_EXT_framebuffer_multisample “ erforderlich, um einen Framebuffer mit mehr als einem Sample pro Pixel zu erstellen.

Siehe auch ` samples()`.

void QOpenGLFramebufferObjectFormat::setTextureTarget(GLenum target)

Setzt das Texturziel der an ein Framebuffer-Objekt angehängten Textur auf „ target “. Wird bei Multisample-Framebuffer-Objekten ignoriert.

Siehe auch textureTarget() und samples().

GLenum QOpenGLFramebufferObjectFormat::textureTarget() const

Gibt das Texturziel der an ein Framebuffer-Objekt angehängten Textur zurück. Wird bei Multisample-Framebuffer-Objekten ignoriert. Der Standardwert ist GL_TEXTURE_2D.

Siehe auch „ setTextureTarget()“ und „ samples()“.

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

Gibt „ false “ zurück, wenn alle Optionen dieses Framebuffer-Objektformats mit denen von „ other “ übereinstimmen; andernfalls wird „ true “ zurückgegeben.

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

Weist diesem Objekt „ other “ zu.

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

Gibt „ true “ zurück, wenn alle Optionen dieses Framebuffer-Objektformats mit denen von „ other “ übereinstimmen; andernfalls wird „ false “ zurückgegeben.

© 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.