[][src]Struct qt_gui::q_opengl_vertex_array_object::Binder

#[repr(C)]
pub struct Binder { /* fields omitted */ }

The QOpenGLVertexArrayObject::Binder class is a convenience class to help with the binding and releasing of OpenGL Vertex Array Objects.

C++ class: QOpenGLVertexArrayObject::Binder.

C++ documentation:

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]

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

C++ documentation:

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().

C++ documentation:

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().

C++ documentation:

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().

C++ documentation:

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.