Abstract base class for device context managment More...
#include <Inventor/devices/SoDeviceContext.h>
Public Member Functions | |
SoDeviceContext () | |
virtual void | bind ()=0 |
virtual void | unbind ()=0 |
virtual bool | isCompatible (SoDeviceContext *) const =0 |
virtual bool | isCurrent () const =0 |
void | setSharable (bool sharable) |
bool | isSharable () const |
virtual bool | setSharedWith (SoDeviceContext *sourceCtx) |
virtual bool | isSharedWith (const SoDeviceContext *context) const |
virtual int | getSharedId () const |
SoDeviceContextSharedGroup * | getSharedGroup () const |
bool | setSharedGroup (SoDeviceContextSharedGroup *sharedGroup) |
Friends | |
class | SoGLContext_qtcontext_OIV_875_Stub |
This class provides generic functions to manage or get data about specific device contexts.
Reference counting:
SoDeviceContext::SoDeviceContext | ( | ) |
Default constructor.
virtual void SoDeviceContext::bind | ( | ) | [pure virtual] |
Bind this context to the current thread.
Implemented in SoCpuContext, SoCudaContext, SoGLContext, and SoOpenCLContext.
SoDeviceContextSharedGroup* SoDeviceContext::getSharedGroup | ( | ) | const |
Returns the current shared group.
virtual int SoDeviceContext::getSharedId | ( | ) | const [virtual] |
Returns an id common to all compatible/shared contexts.
virtual bool SoDeviceContext::isCompatible | ( | SoDeviceContext * | ) | const [pure virtual] |
Returns true if two contexts are compatible.
Compatible means that using a buffer from one of these contexts inside the other will not require copying the data.
virtual bool SoDeviceContext::isCurrent | ( | ) | const [pure virtual] |
Returns true if the context is valid and currently active.
Implemented in SoCpuContext, SoCudaContext, SoGLContext, and SoOpenCLContext.
bool SoDeviceContext::isSharable | ( | ) | const |
Returns the sharable status of this context.
By default, a context is sharable.
virtual bool SoDeviceContext::isSharedWith | ( | const SoDeviceContext * | context | ) | const [virtual] |
Returns the current sharing state with passed context.
Reimplemented in SoGLContext.
void SoDeviceContext::setSharable | ( | bool | sharable | ) |
Sets the sharable property.
bool SoDeviceContext::setSharedGroup | ( | SoDeviceContextSharedGroup * | sharedGroup | ) |
Explicitly change the sharedGroup.
virtual bool SoDeviceContext::setSharedWith | ( | SoDeviceContext * | sourceCtx | ) | [virtual] |
Share this context.
virtual void SoDeviceContext::unbind | ( | ) | [pure virtual] |
Unbind this context from the current thread.
Implemented in SoCpuContext, SoCudaContext, SoGLContext, and SoOpenCLContext.
friend class SoGLContext_qtcontext_OIV_875_Stub [friend] |