Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

GLExtensions Class Reference

Jot interface for loading OpenGL extensions. More...

#include <gl_extensions.H>

List of all members.

Public Member Functions

 ~GLExtensions ()

Static Public Member Functions

static void set_debug (bool d)
static bool get_debug ()
static void init ()
static bool gl_arb_multitexture_supported ()
static bool gl_nv_register_combiners_supported ()
static bool gl_nv_vertex_program_supported ()
static bool gl_ext_compiled_vertex_array_supported ()
static bool gl_arb_vertex_program_supported ()
static bool gl_arb_fragment_program_supported ()
static bool gl_ati_fragment_shader_supported ()
static bool gl_nv_fragment_program_option_supported ()
static bool gl_arb_shader_objects_supported ()
static bool gl_arb_vertex_shader_supported ()
static bool gl_arb_fragment_shader_supported ()
static bool gl_arb_vertex_program_loaded (Cstr_ptr &, bool &, const unsigned char *)
static bool gl_arb_fragment_program_loaded (Cstr_ptr &, bool &, const unsigned char *)

Private Member Functions

 GLExtensions ()

Static Private Member Functions

static void internal_init ()
static void init_extensions ()
static bool init_gl_arb_multitexture ()
static bool init_gl_nv_register_combiners ()
static bool init_gl_nv_vertex_program ()
static bool init_gl_ext_compiled_vertex_array ()
static bool init_gl_arb_vertex_program ()
static bool init_gl_arb_fragment_program ()
static bool init_gl_ati_fragment_shader ()
static bool init_gl_nv_fragment_program_option ()
static bool init_gl_arb_shader_objects ()
static bool init_gl_arb_vertex_shader ()
static bool init_gl_arb_fragment_shader ()
static bool is_extension_supported (const char *extension)

Static Private Attributes

static bool _gl_arb_multitexture_supported = false
static bool _gl_nv_register_combiners_supported = false
static bool _gl_nv_vertex_program_supported = false
static bool _gl_ext_compiled_vertex_array_supported = false
static bool _gl_arb_vertex_program_supported = false
static bool _gl_arb_fragment_program_supported = false
static bool _gl_ati_fragment_shader_supported = false
static bool _gl_nv_fragment_program_option_supported = false
static bool _gl_arb_shader_objects_supported = false
static bool _gl_arb_vertex_shader_supported = false
static bool _gl_arb_fragment_shader_supported = false
static bool _init = false
static bool _debug = Config::get_var_bool("DEBUG_GL_EXTENSIONS",false,true)


Detailed Description

Jot interface for loading OpenGL extensions.

Statically constructed at run-time and initializes a set of extensions to GL. The public queries will return the availability of the extensions, but the calls to extensions must still be placed in ifdef's. e.g.

if (gl_arb_multitexture_suported()) { ifdef GL_ARB_multitexture do_stuff(); endif }

Note:
The general is_extension_supported() is not exposed, since win32 requires that extension functions be declared as pointers, and fetched from the opengl icd. The baked in extension queries in this class indicate if an extension is supported AND that the functions are ready to call.

Definition at line 39 of file gl_extensions.H.


Constructor & Destructor Documentation

GLExtensions::GLExtensions  )  [private]
 

Definition at line 53 of file gl_extensions.C.

GLExtensions::~GLExtensions  ) 
 

Definition at line 62 of file gl_extensions.C.


Member Function Documentation

static bool GLExtensions::get_debug  )  [inline, static]
 

Definition at line 88 of file gl_extensions.H.

References _debug.

Referenced by PaperEffect::begin_paper_effect(), and PaperEffect::end_paper_effect().

bool GLExtensions::gl_arb_fragment_program_loaded Cstr_ptr &  ,
bool ,
const unsigned char * 
[static]
 

Definition at line 645 of file gl_extensions.C.

References ERR_LEV_ERROR, ERR_LEV_INFO, ERR_LEV_SPAM, ERR_LEV_WARN, err_mesg(), gl_arb_fragment_program_supported(), GL_FRAGMENT_PROGRAM_ARB, GL_INVALID_OPERATION, GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_ATTRIBS_ARB, GL_MAX_PROGRAM_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB, GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB, GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB, GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB, GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_PARAMETERS_ARB, GL_MAX_PROGRAM_TEMPORARIES_ARB, GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB, GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB, GL_PROGRAM_ALU_INSTRUCTIONS_ARB, GL_PROGRAM_ATTRIBS_ARB, GL_PROGRAM_ERROR_POSITION_ARB, GL_PROGRAM_ERROR_STRING_ARB, GL_PROGRAM_INSTRUCTIONS_ARB, GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB, GL_PROGRAM_NATIVE_ATTRIBS_ARB, GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB, GL_PROGRAM_NATIVE_PARAMETERS_ARB, GL_PROGRAM_NATIVE_TEMPORARIES_ARB, GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB, GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB, GL_PROGRAM_PARAMETERS_ARB, GL_PROGRAM_TEMPORARIES_ARB, GL_PROGRAM_TEX_INDIRECTIONS_ARB, GL_PROGRAM_TEX_INSTRUCTIONS_ARB, GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB, glGetError(), glGetIntegerv(), glGetProgramivARB, and glGetString().

Referenced by PaperEffect::init_arb(), and load_ARB_program().

static bool GLExtensions::gl_arb_fragment_program_supported  )  [inline, static]
 

Definition at line 102 of file gl_extensions.H.

References _gl_arb_fragment_program_supported, and init().

Referenced by CurvatureARBvpARBfpMultiTextureMode::CurvatureARBvpARBfpMultiTextureMode(), gl_arb_fragment_program_loaded(), PaperEffect::init_arb(), LineDrawingVprogFprogNoSSDMode::LineDrawingVprogFprogNoSSDMode(), ntt_init_vertex_program_arb(), LineDrawingRenderingModeSelectionPolicy::SelectRenderingMode(), and CurvatureRenderingModeSelectionPolicy::SelectRenderingMode().

static bool GLExtensions::gl_arb_fragment_shader_supported  )  [inline, static]
 

Definition at line 112 of file gl_extensions.H.

References _gl_arb_fragment_shader_supported, and init().

Referenced by LineDrawingGLSLMode::LineDrawingGLSLMode(), and LineDrawingRenderingModeSelectionPolicy::SelectRenderingMode().

static bool GLExtensions::gl_arb_multitexture_supported  )  [inline, static]
 

Definition at line 92 of file gl_extensions.H.

References _gl_arb_multitexture_supported, and init().

Referenced by CurvatureARBvpARBfpMultiTextureMode::CurvatureARBvpARBfpMultiTextureMode(), PaperEffect::init_tex(), LineDrawingVprogFprogNoSSDMode::LineDrawingVprogFprogNoSSDMode(), ntt_setup_vertex_program_nv(), ntt_setup_vertex_program_nv_1D(), LineDrawingRenderingModeSelectionPolicy::SelectRenderingMode(), and CurvatureRenderingModeSelectionPolicy::SelectRenderingMode().

static bool GLExtensions::gl_arb_shader_objects_supported  )  [inline, static]
 

Definition at line 108 of file gl_extensions.H.

References _gl_arb_shader_objects_supported, and init().

Referenced by LineDrawingGLSLMode::LineDrawingGLSLMode(), and LineDrawingRenderingModeSelectionPolicy::SelectRenderingMode().

bool GLExtensions::gl_arb_vertex_program_loaded Cstr_ptr &  ,
bool ,
const unsigned char * 
[static]
 

Definition at line 483 of file gl_extensions.C.

References ERR_LEV_ERROR, ERR_LEV_INFO, ERR_LEV_SPAM, ERR_LEV_WARN, err_mesg(), gl_arb_vertex_program_supported(), GL_INVALID_OPERATION, GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB, GL_MAX_PROGRAM_ATTRIBS_ARB, GL_MAX_PROGRAM_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB, GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB, GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB, GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB, GL_MAX_PROGRAM_PARAMETERS_ARB, GL_MAX_PROGRAM_TEMPORARIES_ARB, GL_PROGRAM_ADDRESS_REGISTERS_ARB, GL_PROGRAM_ATTRIBS_ARB, GL_PROGRAM_ERROR_POSITION_ARB, GL_PROGRAM_ERROR_STRING_ARB, GL_PROGRAM_INSTRUCTIONS_ARB, GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB, GL_PROGRAM_NATIVE_ATTRIBS_ARB, GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB, GL_PROGRAM_NATIVE_PARAMETERS_ARB, GL_PROGRAM_NATIVE_TEMPORARIES_ARB, GL_PROGRAM_PARAMETERS_ARB, GL_PROGRAM_TEMPORARIES_ARB, GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB, GL_VERTEX_PROGRAM_ARB, glGetError(), glGetIntegerv(), glGetProgramivARB, and glGetString().

Referenced by load_ARB_program(), ntt_init_vertex_program_arb(), and ntt_init_vertex_program_arb_1D().

static bool GLExtensions::gl_arb_vertex_program_supported  )  [inline, static]
 

Definition at line 100 of file gl_extensions.H.

References _gl_arb_vertex_program_supported, and init().

Referenced by CurvatureARBvpARBfpMultiTextureMode::CurvatureARBvpARBfpMultiTextureMode(), gl_arb_vertex_program_loaded(), LineDrawingVprogFprogNoSSDMode::LineDrawingVprogFprogNoSSDMode(), ntt_init_vertex_program_arb(), ntt_init_vertex_program_arb_1D(), LineDrawingRenderingModeSelectionPolicy::SelectRenderingMode(), and CurvatureRenderingModeSelectionPolicy::SelectRenderingMode().

static bool GLExtensions::gl_arb_vertex_shader_supported  )  [inline, static]
 

Definition at line 110 of file gl_extensions.H.

References _gl_arb_vertex_shader_supported, and init().

Referenced by LineDrawingGLSLMode::LineDrawingGLSLMode(), and LineDrawingRenderingModeSelectionPolicy::SelectRenderingMode().

static bool GLExtensions::gl_ati_fragment_shader_supported  )  [inline, static]
 

Definition at line 104 of file gl_extensions.H.

References _gl_ati_fragment_shader_supported, and init().

Referenced by PaperEffect::init_ati().

static bool GLExtensions::gl_ext_compiled_vertex_array_supported  )  [inline, static]
 

Definition at line 98 of file gl_extensions.H.

References _gl_ext_compiled_vertex_array_supported, and init().

static bool GLExtensions::gl_nv_fragment_program_option_supported  )  [inline, static]
 

Definition at line 106 of file gl_extensions.H.

References _gl_nv_fragment_program_option_supported, and init().

Referenced by LineDrawingRenderingModeSelectionPolicy::SelectRenderingMode().

static bool GLExtensions::gl_nv_register_combiners_supported  )  [inline, static]
 

Definition at line 94 of file gl_extensions.H.

References _gl_nv_register_combiners_supported, and init().

Referenced by PaperEffect::init_nv().

static bool GLExtensions::gl_nv_vertex_program_supported  )  [inline, static]
 

Definition at line 96 of file gl_extensions.H.

References _gl_nv_vertex_program_supported, and init().

Referenced by ntt_init_vertex_program_nv(), and ntt_init_vertex_program_nv_1D().

static void GLExtensions::init  )  [inline, static]
 

Definition at line 90 of file gl_extensions.H.

References _init, and internal_init().

Referenced by gl_arb_fragment_program_supported(), gl_arb_fragment_shader_supported(), gl_arb_multitexture_supported(), gl_arb_shader_objects_supported(), gl_arb_vertex_program_supported(), gl_arb_vertex_shader_supported(), gl_ati_fragment_shader_supported(), gl_ext_compiled_vertex_array_supported(), gl_nv_fragment_program_option_supported(), gl_nv_register_combiners_supported(), gl_nv_vertex_program_supported(), and PaperEffect::init().

void GLExtensions::init_extensions  )  [static, private]
 

Definition at line 85 of file gl_extensions.C.

References _gl_arb_fragment_program_supported, _gl_arb_fragment_shader_supported, _gl_arb_multitexture_supported, _gl_arb_shader_objects_supported, _gl_arb_vertex_program_supported, _gl_arb_vertex_shader_supported, _gl_ati_fragment_shader_supported, _gl_ext_compiled_vertex_array_supported, _gl_nv_fragment_program_option_supported, _gl_nv_register_combiners_supported, _gl_nv_vertex_program_supported, init_gl_arb_fragment_program(), init_gl_arb_fragment_shader(), init_gl_arb_multitexture(), init_gl_arb_shader_objects(), init_gl_arb_vertex_program(), init_gl_arb_vertex_shader(), init_gl_ati_fragment_shader(), init_gl_ext_compiled_vertex_array(), init_gl_nv_fragment_program_option(), init_gl_nv_register_combiners(), and init_gl_nv_vertex_program().

Referenced by internal_init().

bool GLExtensions::init_gl_arb_fragment_program  )  [static, private]
 

Definition at line 280 of file gl_extensions.C.

References ERR_LEV_INFO, ERR_LEV_WARN, err_mesg(), Config::get_var_bool(), and is_extension_supported().

Referenced by init_extensions().

bool GLExtensions::init_gl_arb_fragment_shader  )  [static, private]
 

Definition at line 441 of file gl_extensions.C.

References ERR_LEV_INFO, ERR_LEV_WARN, err_mesg(), init_gl_arb_shader_objects(), and is_extension_supported().

Referenced by init_extensions().

bool GLExtensions::init_gl_arb_multitexture  )  [static, private]
 

Definition at line 175 of file gl_extensions.C.

References ERR_LEV_INFO, ERR_LEV_WARN, err_mesg(), Config::get_var_bool(), and is_extension_supported().

Referenced by init_extensions().

bool GLExtensions::init_gl_arb_shader_objects  )  [static, private]
 

Definition at line 379 of file gl_extensions.C.

References ERR_LEV_INFO, ERR_LEV_WARN, err_mesg(), and is_extension_supported().

Referenced by init_extensions(), init_gl_arb_fragment_shader(), and init_gl_arb_vertex_shader().

bool GLExtensions::init_gl_arb_vertex_program  )  [static, private]
 

Definition at line 244 of file gl_extensions.C.

References ERR_LEV_INFO, ERR_LEV_WARN, err_mesg(), Config::get_var_bool(), and is_extension_supported().

Referenced by init_extensions(), and init_gl_arb_vertex_shader().

bool GLExtensions::init_gl_arb_vertex_shader  )  [static, private]
 

Definition at line 409 of file gl_extensions.C.

References ERR_LEV_INFO, ERR_LEV_WARN, err_mesg(), init_gl_arb_shader_objects(), init_gl_arb_vertex_program(), and is_extension_supported().

Referenced by init_extensions().

bool GLExtensions::init_gl_ati_fragment_shader  )  [static, private]
 

Definition at line 315 of file gl_extensions.C.

References ERR_LEV_INFO, ERR_LEV_WARN, err_mesg(), Config::get_var_bool(), and is_extension_supported().

Referenced by init_extensions().

bool GLExtensions::init_gl_ext_compiled_vertex_array  )  [static, private]
 

Definition at line 107 of file gl_extensions.C.

References ERR_LEV_INFO, ERR_LEV_WARN, err_mesg(), Config::get_var_bool(), and is_extension_supported().

Referenced by init_extensions().

bool GLExtensions::init_gl_nv_fragment_program_option  )  [static, private]
 

Definition at line 349 of file gl_extensions.C.

References ERR_LEV_INFO, ERR_LEV_WARN, err_mesg(), and is_extension_supported().

Referenced by init_extensions().

bool GLExtensions::init_gl_nv_register_combiners  )  [static, private]
 

Definition at line 209 of file gl_extensions.C.

References ERR_LEV_INFO, ERR_LEV_WARN, err_mesg(), Config::get_var_bool(), and is_extension_supported().

Referenced by init_extensions().

bool GLExtensions::init_gl_nv_vertex_program  )  [static, private]
 

Definition at line 141 of file gl_extensions.C.

References ERR_LEV_INFO, ERR_LEV_WARN, err_mesg(), Config::get_var_bool(), and is_extension_supported().

Referenced by init_extensions().

void GLExtensions::internal_init  )  [static, private]
 

Definition at line 71 of file gl_extensions.C.

References _init, ERR_LEV_INFO, err_mesg(), and init_extensions().

Referenced by init().

bool GLExtensions::is_extension_supported const char *  extension  )  [static, private]
 

Definition at line 471 of file gl_extensions.C.

References GLEWSingleton::Instance(), and GLEWSingleton::is_supported().

Referenced by init_gl_arb_fragment_program(), init_gl_arb_fragment_shader(), init_gl_arb_multitexture(), init_gl_arb_shader_objects(), init_gl_arb_vertex_program(), init_gl_arb_vertex_shader(), init_gl_ati_fragment_shader(), init_gl_ext_compiled_vertex_array(), init_gl_nv_fragment_program_option(), init_gl_nv_register_combiners(), and init_gl_nv_vertex_program().

static void GLExtensions::set_debug bool  d  )  [inline, static]
 

Definition at line 87 of file gl_extensions.H.

References _debug.


Member Data Documentation

bool GLExtensions::_debug = Config::get_var_bool("DEBUG_GL_EXTENSIONS",false,true) [static, private]
 

Definition at line 57 of file gl_extensions.H.

Referenced by get_debug(), and set_debug().

bool GLExtensions::_gl_arb_fragment_program_supported = false [static, private]
 

Definition at line 48 of file gl_extensions.H.

Referenced by gl_arb_fragment_program_supported(), and init_extensions().

bool GLExtensions::_gl_arb_fragment_shader_supported = false [static, private]
 

Definition at line 53 of file gl_extensions.H.

Referenced by gl_arb_fragment_shader_supported(), and init_extensions().

bool GLExtensions::_gl_arb_multitexture_supported = false [static, private]
 

Definition at line 43 of file gl_extensions.H.

Referenced by gl_arb_multitexture_supported(), and init_extensions().

bool GLExtensions::_gl_arb_shader_objects_supported = false [static, private]
 

Definition at line 51 of file gl_extensions.H.

Referenced by gl_arb_shader_objects_supported(), and init_extensions().

bool GLExtensions::_gl_arb_vertex_program_supported = false [static, private]
 

Definition at line 47 of file gl_extensions.H.

Referenced by gl_arb_vertex_program_supported(), and init_extensions().

bool GLExtensions::_gl_arb_vertex_shader_supported = false [static, private]
 

Definition at line 52 of file gl_extensions.H.

Referenced by gl_arb_vertex_shader_supported(), and init_extensions().

bool GLExtensions::_gl_ati_fragment_shader_supported = false [static, private]
 

Definition at line 49 of file gl_extensions.H.

Referenced by gl_ati_fragment_shader_supported(), and init_extensions().

bool GLExtensions::_gl_ext_compiled_vertex_array_supported = false [static, private]
 

Definition at line 46 of file gl_extensions.H.

Referenced by gl_ext_compiled_vertex_array_supported(), and init_extensions().

bool GLExtensions::_gl_nv_fragment_program_option_supported = false [static, private]
 

Definition at line 50 of file gl_extensions.H.

Referenced by gl_nv_fragment_program_option_supported(), and init_extensions().

bool GLExtensions::_gl_nv_register_combiners_supported = false [static, private]
 

Definition at line 44 of file gl_extensions.H.

Referenced by gl_nv_register_combiners_supported(), and init_extensions().

bool GLExtensions::_gl_nv_vertex_program_supported = false [static, private]
 

Definition at line 45 of file gl_extensions.H.

Referenced by gl_nv_vertex_program_supported(), and init_extensions().

bool GLExtensions::_init = false [static, private]
 

Definition at line 55 of file gl_extensions.H.

Referenced by init(), and internal_init().


The documentation for this class was generated from the following files:
Generated on Mon Sep 18 11:45:35 2006 for jot by  doxygen 1.4.4