Basic Image AlgorithmS Library
2.8.0
|
To call glutInit() at the right time and only once is not easy in complex applications. More...
#include <Utils/GlutInitWrapper.hh>
Public Member Functions | |
int | Init () |
int | Init (int argc, char *argv[]) |
bool | IsInitalised () |
Static Public Member Functions | |
static GlutInitWrapper * | GetInstance () |
Protected Member Functions | |
GlutInitWrapper () | |
Static Protected Member Functions | |
static void | DeleteInstance_ () |
static pthread_mutex_t * | Mutex_ () |
Protected Attributes | |
bool | IsInitialised_ |
Static Protected Attributes | |
static GlutInitWrapper * | Instance_ |
Friends | |
class | BIAS::Singleton< GlutInitWrapper > |
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.
|
protected |
Definition at line 34 of file GlutInitWrapper.cpp.
References IsInitialised_.
|
staticprotectedinherited |
|
staticinherited |
int GlutInitWrapper::Init | ( | ) |
Definition at line 42 of file GlutInitWrapper.cpp.
References IsInitialised_.
Referenced by BIAS::SceneGlutPrimitives::Draw(), BIAS::glfRenderingContext_WGL::Init(), BIAS::ContextGLUT::InitContext_(), and BIAS::OpenGLCanvasBase::InitWithContext().
int GlutInitWrapper::Init | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 60 of file GlutInitWrapper.cpp.
References IsInitialised_.
|
inline |
Definition at line 50 of file GlutInitWrapper.hh.
|
staticprotectedinherited |
|
friend |
Definition at line 50 of file GlutInitWrapper.hh.
|
staticprotectedinherited |
static members
Definition at line 98 of file Singleton.hh.
|
protected |
Definition at line 58 of file GlutInitWrapper.hh.
Referenced by GlutInitWrapper(), and Init().