QOpenGLVertexArrayObject::Binder Class
class QOpenGLVertexArrayObject::BinderLa classe ` QOpenGLVertexArrayObject::Binder ` è una classe di utilità che facilita il binding e il rilascio degli oggetti Vertex Array di OpenGL. Maggiori informazioni...
- Elenco di tutti i membri, compresi quelli ereditati
- Binder fa parte del rendering 3D.
Nota: tutte le funzioni di questa classe sono rientranti.
Funzioni pubbliche
Descrizione dettagliata
QOpenGLVertexArrayObject::Binder È una semplice classe di utilità che può essere utilizzata per facilitare il binding e il rilascio delle istanze di ` QOpenGLVertexArrayObject `. Questa classe sta a ` QOpenGLVertexArrayObject ` come ` QMutexLocker ` sta a ` QMutex`.
Questa classe implementa il principio RAII, che contribuisce a garantire un comportamento corretto in presenza di codice complesso o di eccezioni.
Il costruttore di questa classe accetta un oggetto ` QOpenGLVertexArrayObject ` (VAO) come argomento e tenta di associare il VAO, chiamando ` QOpenGLVertexArrayObject::create()` se necessario. Il distruttore di questa classe chiama ` QOpenGLVertexArrayObject::release()`, che disassocia il VAO.
Se necessario, il VAO può essere temporaneamente slegato con la funzione release() e legato nuovamente con rebind().
Vedi anche QOpenGLVertexArrayObject.
Documentazione sulle funzioni membro
Binder::Binder(QOpenGLVertexArrayObject *v)
Crea un oggetto ` QOpenGLVertexArrayObject::Binder ` e associa ` v ` chiamando ` QOpenGLVertexArrayObject::bind()`. Se necessario, chiama prima ` QOpenGLVertexArrayObject::create()`.
[noexcept] Binder::~Binder()
Elimina l'oggetto “ QOpenGLVertexArrayObject::Binder ” e libera l'oggetto “vertex array” ad esso associato.
void Binder::rebind()
Può essere utilizzato per ricollegare l'oggetto array di vertici associato.
Vedi anche release().
void Binder::release()
Può essere utilizzato per liberare temporaneamente l'oggetto array di vertici associato.
Vedi anche rebind().
© 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.