Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoDeviceContext Class Referenceabstract

VSG extension Abstract base class for device context managment More...

#include <Inventor/devices/SoDeviceContext.h>

+ Inheritance diagram for SoDeviceContext:

Public Member Functions

 SoDeviceContext ()
 Default constructor.
 
virtual void bind ()=0
 Bind this context to the current thread.
 
virtual void unbind ()=0
 Unbind this context from the current thread.
 
virtual bool isCompatible (SoDeviceContext *) const =0
 Returns true if two contexts are compatible.
 
virtual bool isCurrent () const =0
 Returns true if the context is valid and currently active.
 
void setSharable (bool sharable)
 Sets the sharable property.
 
bool isSharable () const
 Returns the sharable status of this context.
 
virtual bool setSharedWith (SoDeviceContext *sourceCtx)
 Share this context.
 
virtual bool isSharedWith (const SoDeviceContext *context) const
 Returns the current sharing state with passed context.
 
virtual int getSharedId () const
 Returns an id common to all compatible/shared contexts.
 
SoDeviceContextSharedGroupgetSharedGroup () const
 Returns the current shared group.
 
bool setSharedGroup (SoDeviceContextSharedGroup *sharedGroup)
 Explicitly change the sharedGroup.
 
virtual bool isValid () const
 Returns true if this context is valid.
 
- Public Member Functions inherited from SoRefCounter
void ref () const
 Adds a reference to an instance.
 
void unref () const
 Removes a reference from an instance.
 
void unrefNoDelete () const
 unrefNoDelete() should be called when it is desired to decrement the reference count, but not delete the instance if this brings the reference count to zero.
 
int getRefCount () const
 Returns current reference count.
 
void lock () const
 lock this instance.
 
void unlock () const
 unlock this instance.
 

Friends

class SoGLContext_qtcontext_OIV_875_Stub
 

Detailed Description

VSG extension Abstract base class for device context managment

This class provides generic functions to manage or get data about specific device contexts.

Reference counting:

  • If a device context is bound when a corresponding device buffer object is created, the buffer object will ref() the context (and unref() it when the buffer object is destroyed).

Definition at line 61 of file SoDeviceContext.h.

Constructor & Destructor Documentation

◆ SoDeviceContext()

SoDeviceContext::SoDeviceContext ( )

Default constructor.

Member Function Documentation

◆ bind()

virtual void SoDeviceContext::bind ( )
pure virtual

Bind this context to the current thread.

Implemented in SoCpuContext, and SoGLContext.

◆ getSharedGroup()

SoDeviceContextSharedGroup * SoDeviceContext::getSharedGroup ( ) const

Returns the current shared group.

◆ getSharedId()

virtual int SoDeviceContext::getSharedId ( ) const
virtual

Returns an id common to all compatible/shared contexts.

◆ isCompatible()

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.

Implemented in SoCpuContext, and SoGLContext.

◆ isCurrent()

virtual bool SoDeviceContext::isCurrent ( ) const
pure virtual

Returns true if the context is valid and currently active.

Implemented in SoCpuContext, and SoGLContext.

◆ isSharable()

bool SoDeviceContext::isSharable ( ) const

Returns the sharable status of this context.

By default, a context is sharable.

◆ isSharedWith()

virtual bool SoDeviceContext::isSharedWith ( const SoDeviceContext context) const
virtual

Returns the current sharing state with passed context.

Reimplemented in SoGLContext.

◆ isValid()

virtual bool SoDeviceContext::isValid ( ) const
virtual

Returns true if this context is valid.

Returns
true if the context is valid.

Reimplemented in SoGLContext.

◆ setSharable()

void SoDeviceContext::setSharable ( bool  sharable)

Sets the sharable property.

◆ setSharedGroup()

bool SoDeviceContext::setSharedGroup ( SoDeviceContextSharedGroup sharedGroup)

Explicitly change the sharedGroup.

◆ setSharedWith()

virtual bool SoDeviceContext::setSharedWith ( SoDeviceContext sourceCtx)
virtual

Share this context.

◆ unbind()

virtual void SoDeviceContext::unbind ( )
pure virtual

Unbind this context from the current thread.

Implemented in SoCpuContext, and SoGLContext.

Friends And Related Symbol Documentation

◆ SoGLContext_qtcontext_OIV_875_Stub

friend class SoGLContext_qtcontext_OIV_875_Stub
friend

Definition at line 148 of file SoDeviceContext.h.


The documentation for this class was generated from the following file: