Basic Image AlgorithmS Library
2.8.0
|
To call glewInit() at the right time and only once is not easy in complex applications. More...
#include <Utils/GlewInitWrapper.hh>
Public Member Functions | |
int | Init () |
bool | IsInitalised () |
Static Public Member Functions | |
static GlewInitWrapper * | GetInstance () |
Protected Member Functions | |
GlewInitWrapper () | |
Static Protected Member Functions | |
static void | DeleteInstance_ () |
static pthread_mutex_t * | Mutex_ () |
Protected Attributes | |
bool | IsInitialised_ |
Static Protected Attributes | |
static GlewInitWrapper * | Instance_ |
Friends | |
class | BIAS::Singleton< GlewInitWrapper > |
To call glewInit() 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:
GlewInitWrapper::GetInstance()->Init(); No need to protect it agains multiple calls, this is checked internally.
@author MIP
Definition at line 44 of file GlewInitWrapper.hh.
|
protected |
Definition at line 33 of file GlewInitWrapper.cpp.
References IsInitialised_.
|
staticprotectedinherited |
|
staticinherited |
int GlewInitWrapper::Init | ( | ) |
Definition at line 42 of file GlewInitWrapper.cpp.
References IsInitialised_.
Referenced by BIAS::ContextGLUT::CreateWindow_(), BIAS::GLProjectionParametersBase::EndDraw_(), BIAS::ContextGLUT::EnterGameMode_(), BIAS::GLProjectionParametersBase::InitBeforeDraw_(), BIAS::glfRenderingContext::InitGlew(), and BIAS::ContextWX::OnPaint().
|
inline |
Definition at line 49 of file GlewInitWrapper.hh.
|
staticprotectedinherited |
|
friend |
Definition at line 49 of file GlewInitWrapper.hh.
|
staticprotectedinherited |
static members
Definition at line 98 of file Singleton.hh.
|
protected |
Definition at line 57 of file GlewInitWrapper.hh.
Referenced by GlewInitWrapper(), and Init().