OTB  6.7.0
Orfeo Toolbox
Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | List of all members
otb::GlVersionChecker Class Reference

#include <otbGlVersionChecker.h>

Static Public Member Functions

static bool CheckGLCapabilities (const char *&glVersion, const char *&glslVersion)
 
static const char * GLSLVersion ()
 
static const char * GLVersion ()
 
static int VerCmp (const char *version, const char *required)
 

Static Public Attributes

static const char * REQUIRED_GL_VERSION
 
static const char * REQUIRED_GLSL_VERSION
 

Private Member Functions

 GlVersionChecker ()
 
 GlVersionChecker (const GlVersionChecker &)
 
void operator= (const GlVersionChecker &)
 
 ~GlVersionChecker ()
 

Static Private Member Functions

static bool SplitVersion (const char *version, int &major, int &minor, int &release)
 

Detailed Description

Definition at line 29 of file otbGlVersionChecker.h.

Constructor & Destructor Documentation

otb::GlVersionChecker::GlVersionChecker ( )
private
otb::GlVersionChecker::~GlVersionChecker ( )
private
otb::GlVersionChecker::GlVersionChecker ( const GlVersionChecker )
private

Member Function Documentation

static bool otb::GlVersionChecker::CheckGLCapabilities ( const char *&  glVersion,
const char *&  glslVersion 
)
static

Check that OpenGL required capabilities have been reached.

Parameters
glVersionThe returned OpenGL version or NULL if its query has failed.
glslVersionThe returned OpenGL Shading-Language version or NULL if its query has failed.
Returns
true if OpengGL capabilities of running platform meets the needs of the library.
static const char* otb::GlVersionChecker::GLSLVersion ( )
static
Returns
The OpenGL Shading-Language version used at runtime. The call to this method requires a valid OpenGL rendering context. An std::runtime_error() is thrown when glGetError() is different than GL_NO_ERROR. This method uses GL_SHADING_LANGUAGE_VERSION which is available only if the OpenGL version is greater than 2.0. (
See Also
http://www.opengl.org/sdk/docs/man2/xhtml/glGetString.xml).
static const char* otb::GlVersionChecker::GLVersion ( )
static
Returns
The OpenGL version used at runtime. The call to this method requires a valid OpenGL rendering context. An std::runtime_error() is thrown when glGetError() is different than GL_NO_ERROR.
void otb::GlVersionChecker::operator= ( const GlVersionChecker )
private
static bool otb::GlVersionChecker::SplitVersion ( const char *  version,
int &  major,
int &  minor,
int &  release 
)
staticprivate

Split version string into Major.minor.release triplet.

Parameters
versionString to split into triplet. If NULL or empty, triplet is 0.0.0.
majorMajor number of resulting version triplet.
minorMinor number of resulting version triplet.
releaseRelease number of resulting version triplet.
Returns
true if operation has succeeded, false otherwise.
static int otb::GlVersionChecker::VerCmp ( const char *  version,
const char *  required 
)
static

Compares to version-strings on the model of strcmp().

Parameters
Lefthand-side version string (runtime). If NULL, version-string is considered 0.0.0. (
See Also
GlVersionChecker::SplitVersion()).
Parameters
Righthande-side version string (required). If NULL, version-string is considered 0.0.0. (
See Also
GlVersionChecker::SplitVersion()).
Returns
-1 if version<required; 0 if version==required; +1 if version>=required.

Member Data Documentation

const char* otb::GlVersionChecker::REQUIRED_GL_VERSION
static

Constant containing required OpenGL version for client-application feedback messages.

Definition at line 37 of file otbGlVersionChecker.h.

const char* otb::GlVersionChecker::REQUIRED_GLSL_VERSION
static

Constant containing required shading-language version for client-application feedback messages.

Definition at line 43 of file otbGlVersionChecker.h.


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