Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
SoCpuContext Class Reference

VSG extension CPU device context managment class More...

#include <Inventor/devices/SoCpuContext.h>

+ Inheritance diagram for SoCpuContext:

Public Member Functions

 SoCpuContext (SoCpuDevice *device=NULL)
 Default constructor.
 
virtual void bind ()
 Bind this context to the current thread.
 
virtual void unbind ()
 Unbind this context from the current thread.
 
virtual bool isCompatible (SoDeviceContext *) const
 Query if the specified context and this one are compatible.
 
virtual bool isCurrent () const
 Query if the context is valid and currently active.
 
- Public Member Functions inherited from SoDeviceContext
 SoDeviceContext ()
 Default constructor.
 
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.
 

Static Public Member Functions

static SoCpuContextgetCurrent ()
 Returns the currently bound context (if any) for the current thread.
 

Detailed Description

VSG extension CPU device context managment class

This class provides functions to manage CPU device contexts.

Definition at line 38 of file SoCpuContext.h.

Constructor & Destructor Documentation

◆ SoCpuContext()

SoCpuContext::SoCpuContext ( SoCpuDevice device = NULL)

Default constructor.

Parameters
deviceThe SoCpuDevice on which to create the context.

Member Function Documentation

◆ bind()

virtual void SoCpuContext::bind ( )
virtual

Bind this context to the current thread.

Implements SoDeviceContext.

◆ getCurrent()

static SoCpuContext * SoCpuContext::getCurrent ( )
static

Returns the currently bound context (if any) for the current thread.

Returns
The current CPU context.

◆ isCompatible()

virtual bool SoCpuContext::isCompatible ( SoDeviceContext ) const
virtual

Query if the specified context and this one are compatible.


Compatible means that using a buffer from one of these contexts inside the other will not require copying the data.

Returns
Returns true if the two contexts are compatible, false otherwise.

Implements SoDeviceContext.

◆ isCurrent()

virtual bool SoCpuContext::isCurrent ( ) const
inlinevirtual

Query if the context is valid and currently active.

Implements SoDeviceContext.

Definition at line 73 of file SoCpuContext.h.

◆ unbind()

virtual void SoCpuContext::unbind ( )
virtual

Unbind this context from the current thread.

Implements SoDeviceContext.


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