Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
BIAS::GlutInitWrapper Class Reference

To call glutInit() at the right time and only once is not easy in complex applications. More...

#include <Utils/GlutInitWrapper.hh>

+ Inheritance diagram for BIAS::GlutInitWrapper:
+ Collaboration diagram for BIAS::GlutInitWrapper:

Public Member Functions

int Init ()
 
int Init (int argc, char *argv[])
 
bool IsInitalised ()
 

Static Public Member Functions

static GlutInitWrapperGetInstance ()
 

Protected Member Functions

 GlutInitWrapper ()
 

Static Protected Member Functions

static void DeleteInstance_ ()
 
static pthread_mutex_t * Mutex_ ()
 

Protected Attributes

bool IsInitialised_
 

Static Protected Attributes

static GlutInitWrapperInstance_
 

Friends

class BIAS::Singleton< GlutInitWrapper >
 

Detailed Description

To call glutInit() at the right time and only once is not easy in complex applications.

This wrapper helps to avoid calling it twice or more times. At the eraliest possible place right after the gl-context is ready, just call:

GlutInitWrapper::GetInstance()->Init(); No need to protect it agains multiple calls, this is checked internally.

@author ischiller, adopted from glewinitwrapper

Definition at line 44 of file GlutInitWrapper.hh.

Constructor & Destructor Documentation

GlutInitWrapper::GlutInitWrapper ( )
protected

Definition at line 34 of file GlutInitWrapper.cpp.

References IsInitialised_.

Member Function Documentation

static void BIAS::Singleton< GlutInitWrapper >::DeleteInstance_ ( )
staticprotectedinherited
static GlutInitWrapper * BIAS::Singleton< GlutInitWrapper >::GetInstance ( )
staticinherited
int GlutInitWrapper::Init ( )
int GlutInitWrapper::Init ( int  argc,
char *  argv[] 
)

Definition at line 60 of file GlutInitWrapper.cpp.

References IsInitialised_.

bool BIAS::GlutInitWrapper::IsInitalised ( )
inline

Definition at line 50 of file GlutInitWrapper.hh.

static pthread_mutex_t* BIAS::Singleton< GlutInitWrapper >::Mutex_ ( )
staticprotectedinherited

Friends And Related Function Documentation

friend class BIAS::Singleton< GlutInitWrapper >
friend

Definition at line 50 of file GlutInitWrapper.hh.

Member Data Documentation

GlutInitWrapper * BIAS::Singleton< GlutInitWrapper >::Instance_
staticprotectedinherited

static members

Definition at line 98 of file Singleton.hh.

bool BIAS::GlutInitWrapper::IsInitialised_
protected

Definition at line 58 of file GlutInitWrapper.hh.

Referenced by GlutInitWrapper(), and Init().


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