Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
SoBaseContextObject Class Reference

VSG extension Context dependent object management class. More...

#include <Inventor/devices/SoBaseContextObject.h>

Public Member Functions

 SoBaseContextObject (SoDeviceContextSharedGroup *sharedContextGroup)
 Constructor.
 
void ref ()
 Increment reference count.
 
void unref ()
 Decrement reference count.
 
SoDeviceContextSharedGroupgetContextSharedGroup () const
 Returns the OpenGL context in which the OpenGL objects were created.
 
int getRefCount () const
 Returns the reference count of this instance (initially zero).
 
virtual void release ()
 This function is called by the attached context when it has been requested to delete the context through the SoDeviceContext::dispose() method.
 

Friends

class SoDeviceContextSharedGroup
 

Detailed Description

VSG extension Context dependent object management class.

A helper base class used to store context dependent objects.

Definition at line 43 of file SoBaseContextObject.h.

Constructor & Destructor Documentation

◆ SoBaseContextObject()

SoBaseContextObject::SoBaseContextObject ( SoDeviceContextSharedGroup sharedContextGroup)

Constructor.

Parameters
sharedContextGroupcontext shared group from which it depends.

Member Function Documentation

◆ getContextSharedGroup()

SoDeviceContextSharedGroup * SoBaseContextObject::getContextSharedGroup ( ) const
inline

Returns the OpenGL context in which the OpenGL objects were created.

Definition at line 76 of file SoBaseContextObject.h.

◆ getRefCount()

int SoBaseContextObject::getRefCount ( ) const
inline

Returns the reference count of this instance (initially zero).

Definition at line 81 of file SoBaseContextObject.h.

◆ ref()

void SoBaseContextObject::ref ( )

Increment reference count.


Reference count is initially zero.

◆ release()

virtual void SoBaseContextObject::release ( )
inlinevirtual

This function is called by the attached context when it has been requested to delete the context through the SoDeviceContext::dispose() method.

As some object might be still attached, it triggers all attached object release() method to ask them to detach (and then get it refcount to zero).

Definition at line 89 of file SoBaseContextObject.h.

◆ unref()

void SoBaseContextObject::unref ( )

Decrement reference count.


If this call changes the reference count to zero, the object will be destroyed (just like node classes).

Context dependent objects can only be destroyed if the context that owns them is active. The state parameter is used to determine the correct context for this object. You can pass a NULL state to unref(), but deletion of the object will be delayed until an action is applied in the correct context.

Friends And Related Symbol Documentation

◆ SoDeviceContextSharedGroup

friend class SoDeviceContextSharedGroup
friend

Definition at line 124 of file SoBaseContextObject.h.


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