[−][src]Struct qt_gui::q_opengl_vertex_array_object::Binder
The QOpenGLVertexArrayObject::Binder class is a convenience class to help with the binding and releasing of OpenGL Vertex Array Objects.
C++ class: QOpenGLVertexArrayObject::Binder
.
The QOpenGLVertexArrayObject::Binder class is a convenience class to help with the binding and releasing of OpenGL Vertex Array Objects.
QOpenGLVertexArrayObject::Binder is a simple convenience class that can be used to assist with the binding and releasing of QOpenGLVertexArrayObject instances. This class is to QOpenGLVertexArrayObject as QMutexLocker is to QMutex.
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, calling QOpenGLVertexArrayObject::create() if necessary. The destructor of this class calls QOpenGLVertexArrayObject::release() which unbinds the VAO.
If needed the VAO can be temporarily unbound with the release() function and bound once more with rebind().
Methods
impl Binder
[src]
pub unsafe fn new(
v: impl CastInto<MutPtr<QOpenGLVertexArrayObject>>
) -> CppBox<Binder>
[src]
v: impl CastInto<MutPtr<QOpenGLVertexArrayObject>>
) -> CppBox<Binder>
Creates a QOpenGLVertexArrayObject::Binder object and binds v by calling QOpenGLVertexArrayObject::bind(). If necessary it first calls QOpenGLVertexArrayObject::create().
Calls C++ function: [constructor] void QOpenGLVertexArrayObject::Binder::Binder(QOpenGLVertexArrayObject* v)
.
Creates a QOpenGLVertexArrayObject::Binder object and binds v by calling QOpenGLVertexArrayObject::bind(). If necessary it first calls QOpenGLVertexArrayObject::create().
pub unsafe fn rebind(&mut self)
[src]
Can be used to rebind the associated vertex array object.
Calls C++ function: void QOpenGLVertexArrayObject::Binder::rebind()
.
Can be used to rebind the associated vertex array object.
See also release().
pub unsafe fn release(&mut self)
[src]
Can be used to temporarily release the associated vertex array object.
Calls C++ function: void QOpenGLVertexArrayObject::Binder::release()
.
Can be used to temporarily release the associated vertex array object.
See also rebind().
Trait Implementations
impl CppDeletable for Binder
[src]
unsafe fn delete(&mut self)
[src]
Destroys the QOpenGLVertexArrayObject::Binder and releases the associated vertex array object.
Calls C++ function: [destructor] void QOpenGLVertexArrayObject::Binder::~Binder()
.
Destroys the QOpenGLVertexArrayObject::Binder and releases the associated vertex array object.
Auto Trait Implementations
impl RefUnwindSafe for Binder
impl Send for Binder
impl Sync for Binder
impl Unpin for Binder
impl UnwindSafe for Binder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
unsafe fn static_upcast_mut(ptr: MutPtr<T>) -> MutPtr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,