VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
makVrv::DtOsgToGlContextTracker Class Reference

This class tracks gl contexts as they are created/destroyed per window creation/destruction. It is also what clients should hook to via signal_contextAboutToBeDestroyed for context destruction cleanup.

Inheritance diagram for makVrv::DtOsgToGlContextTracker:
Inheritance graph
[legend]

Public Member Functions

virtual ~DtOsgToGlContextTracker ()
 
 DtOsgToGlContextTracker ()=delete
 
DtOsgToGlContextTrackeroperator= (const DtOsgToGlContextTracker &rhs)=delete
 
 DtOsgToGlContextTracker (const DtOsgToGlContextTracker &rhs)=delete
 
virtual void run ()
 
virtual const void * currentGlContext (void) const
 
virtual void contextAboutToBeDestroyed (const void *glContext)
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Static Public Member Functions

static DtOsgToGlContextTrackerinstance (DtDe &de)
 

Public Attributes

boost::signalslib::signal
< void(const void *)> 
signal_newContextAdded
 
boost::signalslib::signal
< void(const void *)> 
signal_contextAboutToBeDestroyed
 

Protected Member Functions

 DtOsgToGlContextTracker (DtDe &de)
 

Protected Attributes

DtDemyDe
 
const void * myCurrentGlContext = nullptr
 
std::unordered_set< const void * > myGlContexts
 
DtIndirectLogmyIndirectLog
 

Constructor & Destructor Documentation

virtual makVrv::DtOsgToGlContextTracker::~DtOsgToGlContextTracker ( )
virtual

destructor

makVrv::DtOsgToGlContextTracker::DtOsgToGlContextTracker ( )
delete

not allowed

makVrv::DtOsgToGlContextTracker::DtOsgToGlContextTracker ( const DtOsgToGlContextTracker rhs)
delete

not allowed

makVrv::DtOsgToGlContextTracker::DtOsgToGlContextTracker ( DtDe de)
protected

cannot create directly

Member Function Documentation

static DtOsgToGlContextTracker& makVrv::DtOsgToGlContextTracker::instance ( DtDe de)
static

Access the singleton instance.

DtOsgToGlContextTracker& makVrv::DtOsgToGlContextTracker::operator= ( const DtOsgToGlContextTracker rhs)
delete

not allowed

virtual void makVrv::DtOsgToGlContextTracker::run ( )
virtual

called per frame, per context via DtMainThreadJobsManager () which is in turn called per frame, per context via osg

virtual const void* makVrv::DtOsgToGlContextTracker::currentGlContext ( void  ) const
virtual

Current opengl context. Clients can use this in any function nested at any level under DtOsgRenderer::render() This function is useful, in lieu of proliferating wglGetCurrentContext/glXGetCurrentContext everywhere This function is useful, in lieu of proliferating DtGlUtils::glContext (which internally calls wglGetCurrentContext/glXGetCurrentContext) everywhere.

virtual void makVrv::DtOsgToGlContextTracker::contextAboutToBeDestroyed ( const void *  glContext)
virtual

The windowing api will call this. via the DtOsgAdapterQtWidget destructor. ***Do not use directly!!***.

Member Data Documentation

boost::signalslib::signal<void(const void*)> makVrv::DtOsgToGlContextTracker::signal_newContextAdded

This is the signal that vrv clients should connect to, to get the event that a new context was detected.

boost::signalslib::signal<void(const void*)> makVrv::DtOsgToGlContextTracker::signal_contextAboutToBeDestroyed

This is the signal that vrv clients should connect to, to get the event that the context is about to be destroyed.

DtDe& makVrv::DtOsgToGlContextTracker::myDe
protected
const void* makVrv::DtOsgToGlContextTracker::myCurrentGlContext = nullptr
protected
std::unordered_set<const void*> makVrv::DtOsgToGlContextTracker::myGlContexts
protected
DtIndirectLog& makVrv::DtOsgToGlContextTracker::myIndirectLog
protected

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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)