# osgGL2::Extensions Class Reference

Extensions class which encapsulates the querying of extensions and associated function pointers, and provide convenience wrappers to check for the extensions or use the associated functions. More...

Inheritance diagram for osgGL2::Extensions:

[legend]
List of all members.

## Public Member Functions

| Extensions ()
| Extensions (const Extensions &rhs)
void | lowestCommonDenominator (const Extensions &rhs)
void | setupGLExtensions ()
bool | isGlslSupported () const
| are all the extensions required for GLSL supported?
void | setShaderObjectsSupported (bool flag)
bool | isShaderObjectsSupported () const
void | setVertexShaderSupported (bool flag)
bool | isVertexShaderSupported () const
void | setFragmentShaderSupported (bool flag)
bool | isFragmentShaderSupported () const
void | setLanguage100Supported (bool flag)
bool | isLanguage100Supported () const
float | getLanguageVersion () const
GLhandleARB | glCreateShaderObject (GLenum shaderType) const
GLhandleARB | glCreateProgramObject () const
void | glDeleteObject (GLhandleARB obj) const
void | glAttachObject (GLhandleARB containerObj, GLhandleARB obj) const
void | glDetachObject (GLhandleARB containerObj, GLhandleARB attachedObj) const
void | glShaderSource (GLhandleARB shaderObj, GLsizei count, const GLcharARB **strings, const GLint *length) const
void | glCompileShader (GLhandleARB shaderObj) const
void | glBindAttribLocation (GLhandleARB programObj, GLuint index, const GLcharARB *name) const
void | glLinkProgram (GLhandleARB programObj) const
void | glUseProgramObject (GLhandleARB programObj) const
void | glGetInfoLog (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog) const
void | glGetAttachedObjects (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj) const
void | glGetShaderSource (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source) const
void | glUniform1f (GLint location, GLfloat v0) const
void | glUniform2f (GLint location, GLfloat v0, GLfloat v1) const
void | glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2) const
void | glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) const
void | glUniform1i (GLint location, GLint v0) const
void | glUniform2i (GLint location, GLint v0, GLint v1) const
void | glUniform3i (GLint location, GLint v0, GLint v1, GLint v2) const
void | glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3) const
void | glUniform1fv (GLint location, GLsizei count, const GLfloat *value) const
void | glUniform2fv (GLint location, GLsizei count, const GLfloat *value) const
void | glUniform3fv (GLint location, GLsizei count, const GLfloat *value) const
void | glUniform4fv (GLint location, GLsizei count, const GLfloat *value) const
void | glUniform1iv (GLint location, GLsizei count, const GLint *value) const
void | glUniform2iv (GLint location, GLsizei count, const GLint *value) const
void | glUniform3iv (GLint location, GLsizei count, const GLint *value) const
void | glUniform4iv (GLint location, GLsizei count, const GLint *value) const
void | glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) const
void | glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) const
void | glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) const
GLint | glGetUniformLocation (GLhandleARB programObject, const GLcharARB *name) const
GLint | glGetAttribLocation (GLhandleARB programObj, const GLcharARB *name) const
void | glGetActiveUniform (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLint *type, GLcharARB *name) const
void | glGetActiveAttribs (GLhandleARB programObj, GLint *count, const GLint **size, const GLenum **type, const GLcharARB *const **attributes) const
void | glGetUniformfv (GLhandleARB programObj, GLint location, GLfloat *params) const
void | glGetUniformiv (GLhandleARB programObj, GLint location, GLint *params) const
void | glGetObjectParameterfv (GLhandleARB obj, GLenum pname, GLfloat *params) const
void | glGetObjectParameteriv (GLhandleARB obj, GLenum pname, GLint *params) const
GLhandleARB | glGetHandle (GLenum pname) const

## Static Public Member Functions

static Extensions * | Get (unsigned int contextID, bool createIfNotInitalized)
| Function to call to get the extension of a specified context.
static void | Set (unsigned int contextID, Extensions *extensions)
| allows users to override the extensions across graphics contexts.

## Protected Member Functions

| ~Extensions ()

## Protected Attributes

bool | _isShaderObjectsSupported
bool | _isVertexShaderSupported
bool | _isFragmentShaderSupported
bool | _isLanguage100Supported
float | _languageVersion
void * | _glCreateShaderObject
void * | _glCreateProgramObject
void * | _glDeleteObject
void * | _glAttachObject
void * | _glDetachObject
void * | _glShaderSource
void * | _glCompileShader
void * | _glBindAttribLocation
void * | _glLinkProgram
void * | _glUseProgramObject
void * | _glGetInfoLog
void * | _glGetAttachedObjects
void * | _glGetShaderSource
void * | _glUniform1f
void * | _glUniform2f
void * | _glUniform3f
void * | _glUniform4f
void * | _glUniform1i
void * | _glUniform2i
void * | _glUniform3i
void * | _glUniform4i
void * | _glUniform1fv
void * | _glUniform2fv
void * | _glUniform3fv
void * | _glUniform4fv
void * | _glUniform1iv
void * | _glUniform2iv
void * | _glUniform3iv
void * | _glUniform4iv
void * | _glUniformMatrix2fv
void * | _glUniformMatrix3fv
void * | _glUniformMatrix4fv
void * | _glGetUniformLocation
void * | _glGetAttribLocation
void * | _glGetActiveUniform
void * | _glGetActiveAttribs
void * | _glGetUniformfv
void * | _glGetUniformiv
void * | _glGetObjectParameterfv
void * | _glGetObjectParameteriv
void * | _glGetHandle

## Detailed Description

Extensions class which encapsulates the querying of extensions and associated function pointers, and provide convenience wrappers to check for the extensions or use the associated functions.

## Constructor & Destructor Documentation

Extensions::Extensions | ( |  | ) |

Extensions::Extensions | ( | const Extensions & | rhs | ) |

osgGL2::Extensions::~Extensions | ( |  | ) | `[inline, protected]`

## Member Function Documentation

Extensions * Extensions::Get | ( | unsigned int | contextID,
|  | bool | createIfNotInitalized
| ) | `[static]`

Function to call to get the extension of a specified context.

If the Exentsion object for that context has not yet been created then and the 'createIfNotInitalized' flag been set to false then returns NULL. If 'createIfNotInitalized' is true then the Extensions object is automatically created. However, in this case the extension object only be created with the graphics context associated with ContextID..

float osgGL2::Extensions::getLanguageVersion | ( |  | ) | const`[inline]`

void Extensions::glAttachObject | ( | GLhandleARB | containerObj,
|  | GLhandleARB | obj
| ) | const

void Extensions::glBindAttribLocation | ( | GLhandleARB | programObj,
|  | GLuint | index,
|  | const GLcharARB * | name
| ) | const

void Extensions::glCompileShader | ( | GLhandleARB | shaderObj | ) | const

GLhandleARB Extensions::glCreateProgramObject | ( |  | ) | const

GLhandleARB Extensions::glCreateShaderObject | ( | GLenum | shaderType | ) | const

void Extensions::glDeleteObject | ( | GLhandleARB | obj | ) | const

void Extensions::glDetachObject | ( | GLhandleARB | containerObj,
|  | GLhandleARB | attachedObj
| ) | const

void Extensions::glGetActiveAttribs | ( | GLhandleARB | programObj,
|  | GLint * | count,
|  | const GLint ** | size,
|  | const GLenum ** | type,
|  | const GLcharARB *const ** | attributes
| ) | const

void Extensions::glGetActiveUniform | ( | GLhandleARB | programObj,
|  | GLuint | index,
|  | GLsizei | maxLength,
|  | GLsizei * | length,
|  | GLint * | size,
|  | GLint * | type,
|  | GLcharARB * | name
| ) | const

void Extensions::glGetAttachedObjects | ( | GLhandleARB | containerObj,
|  | GLsizei | maxCount,
|  | GLsizei * | count,
|  | GLhandleARB * | obj
| ) | const

GLint Extensions::glGetAttribLocation | ( | GLhandleARB | programObj,
|  | const GLcharARB * | name
| ) | const

GLhandleARB Extensions::glGetHandle | ( | GLenum | pname | ) | const

void Extensions::glGetInfoLog | ( | GLhandleARB | obj,
|  | GLsizei | maxLength,
|  | GLsizei * | length,
|  | GLcharARB * | infoLog
| ) | const

void Extensions::glGetObjectParameterfv | ( | GLhandleARB | obj,
|  | GLenum | pname,
|  | GLfloat * | params
| ) | const

void Extensions::glGetObjectParameteriv | ( | GLhandleARB | obj,
|  | GLenum | pname,
|  | GLint * | params
| ) | const

void Extensions::glGetShaderSource | ( | GLhandleARB | obj,
|  | GLsizei | maxLength,
|  | GLsizei * | length,
|  | GLcharARB * | source
| ) | const

void Extensions::glGetUniformfv | ( | GLhandleARB | programObj,
|  | GLint | location,
|  | GLfloat * | params
| ) | const

void Extensions::glGetUniformiv | ( | GLhandleARB | programObj,
|  | GLint | location,
|  | GLint * | params
| ) | const

GLint Extensions::glGetUniformLocation | ( | GLhandleARB | programObject,
|  | const GLcharARB * | name
| ) | const

void Extensions::glLinkProgram | ( | GLhandleARB | programObj | ) | const

void Extensions::glShaderSource | ( | GLhandleARB | shaderObj,
|  | GLsizei | count,
|  | const GLcharARB ** | strings,
|  | const GLint * | length
| ) | const

void Extensions::glUniform1f | ( | GLint | location,
|  | GLfloat | v0
| ) | const

void Extensions::glUniform1fv | ( | GLint | location,
|  | GLsizei | count,
|  | const GLfloat * | value
| ) | const

void Extensions::glUniform1i | ( | GLint | location,
|  | GLint | v0
| ) | const

void Extensions::glUniform1iv | ( | GLint | location,
|  | GLsizei | count,
|  | const GLint * | value
| ) | const

void Extensions::glUniform2f | ( | GLint | location,
|  | GLfloat | v0,
|  | GLfloat | v1
| ) | const

void Extensions::glUniform2fv | ( | GLint | location,
|  | GLsizei | count,
|  | const GLfloat * | value
| ) | const

void Extensions::glUniform2i | ( | GLint | location,
|  | GLint | v0,
|  | GLint | v1
| ) | const

void Extensions::glUniform2iv | ( | GLint | location,
|  | GLsizei | count,
|  | const GLint * | value
| ) | const

void Extensions::glUniform3f | ( | GLint | location,
|  | GLfloat | v0,
|  | GLfloat | v1,
|  | GLfloat | v2
| ) | const

void Extensions::glUniform3fv | ( | GLint | location,
|  | GLsizei | count,
|  | const GLfloat * | value
| ) | const

void Extensions::glUniform3i | ( | GLint | location,
|  | GLint | v0,
|  | GLint | v1,
|  | GLint | v2
| ) | const

void Extensions::glUniform3iv | ( | GLint | location,
|  | GLsizei | count,
|  | const GLint * | value
| ) | const

void Extensions::glUniform4f | ( | GLint | location,
|  | GLfloat | v0,
|  | GLfloat | v1,
|  | GLfloat | v2,
|  | GLfloat | v3
| ) | const

void Extensions::glUniform4fv | ( | GLint | location,
|  | GLsizei | count,
|  | const GLfloat * | value
| ) | const

void Extensions::glUniform4i | ( | GLint | location,
|  | GLint | v0,
|  | GLint | v1,
|  | GLint | v2,
|  | GLint | v3
| ) | const

void Extensions::glUniform4iv | ( | GLint | location,
|  | GLsizei | count,
|  | const GLint * | value
| ) | const

void Extensions::glUniformMatrix2fv | ( | GLint | location,
|  | GLsizei | count,
|  | GLboolean | transpose,
|  | const GLfloat * | value
| ) | const

void Extensions::glUniformMatrix3fv | ( | GLint | location,
|  | GLsizei | count,
|  | GLboolean | transpose,
|  | const GLfloat * | value
| ) | const

void Extensions::glUniformMatrix4fv | ( | GLint | location,
|  | GLsizei | count,
|  | GLboolean | transpose,
|  | const GLfloat * | value
| ) | const

void Extensions::glUseProgramObject | ( | GLhandleARB | programObj | ) | const

bool osgGL2::Extensions::isFragmentShaderSupported | ( |  | ) | const`[inline]`

bool osgGL2::Extensions::isGlslSupported | ( |  | ) | const`[inline]`

| are all the extensions required for GLSL supported?

bool osgGL2::Extensions::isLanguage100Supported | ( |  | ) | const`[inline]`

bool osgGL2::Extensions::isShaderObjectsSupported | ( |  | ) | const`[inline]`

bool osgGL2::Extensions::isVertexShaderSupported | ( |  | ) | const`[inline]`

void Extensions::lowestCommonDenominator | ( | const Extensions & | rhs | ) |

void Extensions::Set | ( | unsigned int | contextID,
|  | Extensions * | extensions
| ) | `[static]`

| allows users to override the extensions across graphics contexts. typically used when you have different extensions supported across graphics pipes but need to ensure that they all use the same low common denominator extensions.

void osgGL2::Extensions::setFragmentShaderSupported | ( | bool | flag | ) | `[inline]`

void osgGL2::Extensions::setLanguage100Supported | ( | bool | flag | ) | `[inline]`

void osgGL2::Extensions::setShaderObjectsSupported | ( | bool | flag | ) | `[inline]`

void Extensions::setupGLExtensions | ( |  | ) |

void osgGL2::Extensions::setVertexShaderSupported | ( | bool | flag | ) | `[inline]`

## Member Data Documentation

void* osgGL2::Extensions::_glAttachObject `[protected]`

void* osgGL2::Extensions::_glBindAttribLocation `[protected]`

void* osgGL2::Extensions::_glCompileShader `[protected]`

void* osgGL2::Extensions::_glCreateProgramObject `[protected]`

void* osgGL2::Extensions::_glCreateShaderObject `[protected]`

void* osgGL2::Extensions::_glDeleteObject `[protected]`

void* osgGL2::Extensions::_glDetachObject `[protected]`

void* osgGL2::Extensions::_glGetActiveAttribs `[protected]`

void* osgGL2::Extensions::_glGetActiveUniform `[protected]`

void* osgGL2::Extensions::_glGetAttachedObjects `[protected]`

void* osgGL2::Extensions::_glGetAttribLocation `[protected]`

void* osgGL2::Extensions::_glGetHandle `[protected]`

void* osgGL2::Extensions::_glGetInfoLog `[protected]`

void* osgGL2::Extensions::_glGetObjectParameterfv `[protected]`

void* osgGL2::Extensions::_glGetObjectParameteriv `[protected]`

void* osgGL2::Extensions::_glGetShaderSource `[protected]`

void* osgGL2::Extensions::_glGetUniformfv `[protected]`

void* osgGL2::Extensions::_glGetUniformiv `[protected]`

void* osgGL2::Extensions::_glGetUniformLocation `[protected]`

void* osgGL2::Extensions::_glLinkProgram `[protected]`

void* osgGL2::Extensions::_glShaderSource `[protected]`

void* osgGL2::Extensions::_glUniform1f `[protected]`

void* osgGL2::Extensions::_glUniform1fv `[protected]`

void* osgGL2::Extensions::_glUniform1i `[protected]`

void* osgGL2::Extensions::_glUniform1iv `[protected]`

void* osgGL2::Extensions::_glUniform2f `[protected]`

void* osgGL2::Extensions::_glUniform2fv `[protected]`

void* osgGL2::Extensions::_glUniform2i `[protected]`

void* osgGL2::Extensions::_glUniform2iv `[protected]`

void* osgGL2::Extensions::_glUniform3f `[protected]`

void* osgGL2::Extensions::_glUniform3fv `[protected]`

void* osgGL2::Extensions::_glUniform3i `[protected]`

void* osgGL2::Extensions::_glUniform3iv `[protected]`

void* osgGL2::Extensions::_glUniform4f `[protected]`

void* osgGL2::Extensions::_glUniform4fv `[protected]`

void* osgGL2::Extensions::_glUniform4i `[protected]`

void* osgGL2::Extensions::_glUniform4iv `[protected]`

void* osgGL2::Extensions::_glUniformMatrix2fv `[protected]`

void* osgGL2::Extensions::_glUniformMatrix3fv `[protected]`

void* osgGL2::Extensions::_glUniformMatrix4fv `[protected]`

void* osgGL2::Extensions::_glUseProgramObject `[protected]`

bool osgGL2::Extensions::_isFragmentShaderSupported `[protected]`

bool osgGL2::Extensions::_isLanguage100Supported `[protected]`

bool osgGL2::Extensions::_isShaderObjectsSupported `[protected]`

bool osgGL2::Extensions::_isVertexShaderSupported `[protected]`

float osgGL2::Extensions::_languageVersion `[protected]`

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

- Extensions
- Extensions.cpp