|
The Vish Visualization Shell 0.3
Vish
|
This is a convenience class to check if an OpenGL context is currently active and available. More...
#include <ocean/GLvish/MetaGLViewerCreator.hpp>
Classes | |
| struct | ContextAvailable |
Public Member Functions | |
| virtual const void * | CurrentGLContextID () const =0 |
| Get a an OpenGL context ID, which is useful to check if at this point of the code calling OpenGL functions is allowed. | |
| Public Member Functions inherited from MemCore::ReferenceBase< GLContextChecker > | |
| auto | getObjectCountID () const noexcept |
| Get a unique ID for this object in the given domain. | |
| bool | isIdentical (const WeakPtr< GLContextChecker, GLContextChecker > &PossibleSelf) const noexcept |
| Check if this object is identical to the one used by the given pointer. | |
| void | mkAutoDestructive () |
| Marks this object as being automatically destructed, e.g. | |
| refcount_t | refcount () const noexcept |
| The strong reference count. | |
| ReferenceBase (GLContextChecker *that) noexcept | |
| Constructor, initializes reference counter to zero. | |
| const auto & | self () const |
| Return weak pointer to the object self. | |
| refcount_t | wrefcount () const noexcept |
| The weak reference count. | |
Static Public Member Functions | |
| static int | invalidContext () |
Additional Inherited Members | |
| Public Types inherited from MemCore::ReferenceBase< GLContextChecker > | |
| using | reference_domain_t |
| The type of the base class. | |
| using | SelfPtr_t |
| Type for a pointer to this object itself. | |
| Protected Member Functions inherited from MemCore::ReferenceBase< GLContextChecker > | |
| virtual void | extremeUnction () |
| A virtual function that will be called just before the object is destroyed. | |
| ReferenceBase & | operator= (const ReferenceBase &R) |
| Protected assignment operator (should not be called). | |
| void | suicide () |
| Delete this. | |
| virtual | ~ReferenceBase () |
| Virtual destructor. | |
This is a convenience class to check if an OpenGL context is currently active and available.
|
pure virtual |
Get a an OpenGL context ID, which is useful to check if at this point of the code calling OpenGL functions is allowed.
This is especcially useful for destructors of objects that clean up OpenGL objects. No explicit OpenGL context object is available then, but this function allows to check for validity. Such object may only be destroyed if there is a current OpenGL context, otherwise it will lead to runtime errors.
References invalidContext().
|
static |
References invalidContext().
Referenced by CurrentGLContextID(), invalidContext(), Wizt::GLTextureID::selectActiveTextureUnit(), Wizt::BufferArray::~BufferArray(), Wizt::GLTextureBase::~GLTextureBase(), Wizt::GLTextureID::~GLTextureID(), and Wizt::VBO::~VBO().