このページでは

QOpenGLVertexArrayObject::Binder Class

class QOpenGLVertexArrayObject::Binder

QOpenGLVertexArrayObject::Binder クラスは、OpenGLのVertex Array Objectのバインドおよび解放を支援するための利便性クラスです。詳細...

注:このクラスのすべての関数は再入可能です。

パブリック関数

Binder(QOpenGLVertexArrayObject *v)
~Binder()
void rebind()
void release()

詳細な説明

QOpenGLVertexArrayObject::Binder は、QOpenGLVertexArrayObject インスタンスのバインディングおよび解放を支援するために使用できる、シンプルな利便性クラスです。このクラスは、QOpenGLVertexArrayObject に対するQMutexLocker が、QMutex に対するものと同じような役割を果たします。

このクラスはRAIIの原則を実装しており、複雑なコードや例外が発生した場合でも、動作を確実に保証するのに役立ちます。

このクラスのコンストラクタは、引数としてQOpenGLVertexArrayObject (VAO)を受け取り、必要に応じてQOpenGLVertexArrayObject::create()を呼び出してVAOのバインドを試みます。このクラスのデストラクタは、QOpenGLVertexArrayObject::release()を呼び出し、VAOのバインドを解除します。

必要に応じて、release() 関数を使用して VAO を一時的にアンバインドし、rebind() で再度バインドすることができます。

QOpenGLVertexArrayObjectも参照してください 。

メンバ関数のドキュメント

Binder::Binder(QOpenGLVertexArrayObject *v)

QOpenGLVertexArrayObject::Binder オブジェクトを作成し、QOpenGLVertexArrayObject::bind()を呼び出してv をバインドします。必要に応じて、まずQOpenGLVertexArrayObject::create()を呼び出します。

[noexcept] Binder::~Binder()

QOpenGLVertexArrayObject::Binder を破棄し、関連する頂点配列オブジェクトを解放します。

void Binder::rebind()

関連付けられた頂点配列オブジェクトの再バインドに使用できます。

release()も参照してください 。

void Binder::release()

関連付けられた頂点配列オブジェクトを一時的に解放するために使用できます。

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.