#include <archon/display/context.H>
Collaboration diagram for Archon::Display::Bind:
Public Member Functions | |
Bind (const Ref< Context > &c, const Ref< Drawable > &d, bool block=true) throw (ContextAlreadyBoundException, NestedBindingException, invalid_argument) | |
Performs an implicit call to 'aquire'. | |
~Bind () | |
void | aquire (const Ref< Context > &c, const Ref< Drawable > &d, bool block=true) throw (ContextAlreadyBoundException, NestedBindingException, invalid_argument) |
Attempt to establish a binding between the instantiating thread, the specified rendering context and the specified drawable. | |
void | release () |
Drop this binding. |
The effect of such a binding is that OpenGL calls issued by the instantiating thread are executed within the bound rendering context causing polygons to be rendered on the bound drawable.
This binding is in effect as soon as the Bind variable is instantiated, and generally lasts as long as the Bind variable, which is until the end of the scope of that variable. Sometimes however it is usefull to be able to unbind and rebind withing a single valiable scope, which is possible with the 'release' and 'aquire' methods of this class.
A thread can only be bound to one rendering context and vice versa.
A drawable however can be bound to multiple rendering contexts, allowing multiple threads to render into the same drawable.
Definition at line 129 of file context.H.
|
Performs an implicit call to 'aquire'.
Definition at line 142 of file context.H. References aquire(). |
|
Attempt to establish a binding between the instantiating thread, the specified rendering context and the specified drawable. The context and the drawable must be based on the same visual. If the specified context is currently bound to another thread the instantiation will by default block until the context becomes available. If you specify false for the 'block' argument the instantiation will fail in this case.
Definition at line 181 of file context.H. References release(). Referenced by Bind(). |