Binder类是有助于绑定和释放 OpenGL 顶点数组对象的方便类。 更多 …
Binderis a simple convenience class that can be used to assist with the binding and releasing ofQOpenGLVertexArrayObjectinstances. This class is toQOpenGLVertexArrayObjectasQMutexLockeris toQMutex.This class implements the RAII principle which helps to ensure behavior in complex code or in the presence of exceptions.
The constructor of this class accepts a
QOpenGLVertexArrayObject(VAO) as an argument and attempts to bind the VAO, callingcreate()if necessary. The destructor of this class callsrelease()which unbinds the VAO.If needed the VAO can be temporarily unbound with the
release()function and bound once more withrebind().
PySide2.QtGui.QOpenGLVertexArrayObject.
Binder
(
v
)
¶
- param v
创建
Binder
object and binds
v
通过调用
bind()
. If necessary it first calls
create()
.
PySide2.QtGui.QOpenGLVertexArrayObject.Binder.
rebind
(
)
¶
Can be used to rebind the associated vertex array object.
另请参阅