VTK
Enumerations | Functions | Variables
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Rendering/OpenGL/vtkOpenGLExtensionManager.h File Reference

Go to the source code of this file.

Enumerations

enum  DriverGLVendorIdType {
  DRIVER_VENDOR_UNKNOWN = 0, DRIVER_VENDOR_ATI, DRIVER_VENDOR_NVIDIA, DRIVER_VENDOR_INTEL,
  DRIVER_VENDOR_MESA, DRIVER_VENDOR_MICROSOFT
}

Functions

virtual void Update ()
virtual int ExtensionSupported (const char *name)
virtual void LoadExtension (const char *name)
virtual int LoadSupportedExtension (const char *name)
virtual void LoadCorePromotedExtension (const char *name)
virtual void LoadAsARBExtension (const char *name)
virtual bool DriverGLRendererIsOSMesa ()
 vtkOpenGLExtensionManager ()
virtual ~vtkOpenGLExtensionManager ()
virtual void InitializeDriverInformation ()
virtual void ReadOpenGLExtensions ()
virtual int SafeLoadExtension (const char *name)
vtkRenderWindowGetRenderWindow ()
virtual void SetRenderWindow (vtkRenderWindow *renwin)
 vtkGetStringMacro (ExtensionsString)
virtual
vtkOpenGLExtensionManagerFunctionPointer 
GetProcAddress (const char *fname)
virtual int GetDriverVersionMajor ()
virtual int GetDriverVersionMinor ()
virtual int GetDriverVersionPatch ()
virtual int GetDriverGLVersionMajor ()
virtual int GetDriverGLVersionMinor ()
virtual int GetDriverGLVersionPatch ()
virtual bool DriverIsATI ()
virtual bool DriverIsNvidia ()
virtual bool DriverIsIntel ()
virtual bool DriverIsMesa ()
virtual bool DriverIsMicrosoft ()
virtual bool DriverVersionIs (int major)
virtual bool DriverVersionIs (int major, int minor)
virtual bool DriverVersionIs (int major, int minor, int patch)
virtual bool DriverVersionAtLeast (int major)
virtual bool DriverVersionAtLeast (int major, int minor)
virtual bool DriverVersionAtLeast (int major, int minor, int patch)
virtual bool DriverGLVersionIs (int major, int minor, int patch)
virtual bool DriverGLVersionIs (int major, int minor)
virtual bool DriverGLRendererIs (const char *str)
virtual bool DriverGLRendererHas (const char *str)
virtual bool DriverGLRendererHasToken (const char *str)
virtual const char * GetDriverGLVendor ()
virtual const char * GetDriverGLVersion ()
virtual const char * GetDriverGLRenderer ()
bool GetIgnoreDriverBugs (const char *description)
virtual void SetIgnoreDriverBugs (bool)
virtual void IgnoreDriverBugsOn ()
virtual void IgnoreDriverBugsOff ()

Variables

int OwnRenderWindow
char * ExtensionsString
vtkTimeStamp BuildTime
std::string DriverGLVersion
int DriverGLVersionMajor
int DriverGLVersionMinor
int DriverGLVersionPatch
std::string DriverGLVendor
std::string DriverGLRenderer
int DriverVersionMajor
int DriverVersionMinor
int DriverVersionPatch
DriverGLVendorIdType DriverGLVendorId
bool IgnoreDriverBugs
vtkWeakPointer< vtkRenderWindowRenderWindow

Enumeration Type Documentation

enum DriverGLVendorIdType [protected]
Enumerator:
DRIVER_VENDOR_UNKNOWN 
DRIVER_VENDOR_ATI 
DRIVER_VENDOR_NVIDIA 
DRIVER_VENDOR_INTEL 
DRIVER_VENDOR_MESA 
DRIVER_VENDOR_MICROSOFT 

Definition at line 339 of file vtkOpenGLExtensionManager.h.


Function Documentation

virtual void SetRenderWindow ( vtkRenderWindow renwin) [virtual]
virtual void Update ( ) [virtual]

Updates the extensions string.

Returns a string listing all available extensions. Call Update first to validate this string.

virtual int ExtensionSupported ( const char *  name) [virtual]

Returns true if the extension is supported, false otherwise.

virtual vtkOpenGLExtensionManagerFunctionPointer GetProcAddress ( const char *  fname) [virtual]

Returns a function pointer to the OpenGL extension function with the given name. Returns NULL if the function could not be retrieved.

virtual void LoadExtension ( const char *  name) [virtual]

Loads all the functions associated with the given extension into the appropriate static members of vtkgl. This method emits a warning if the requested extension is not supported. It emits an error if the extension does not load successfully.

virtual int LoadSupportedExtension ( const char *  name) [virtual]

Returns true if the extension is supported and loaded successfully, false otherwise. This method will "fail silently/gracefully" if the extension is not supported or does not load properly. It emits neither warnings nor errors. It is up to the caller to determine if the extension loaded properly by paying attention to the return value.

virtual void LoadCorePromotedExtension ( const char *  name) [virtual]

Loads all the functions associated with the given core-promoted extension into the appropriate static members of vtkgl associated with the OpenGL version that promoted the extension as a core feature. This method emits a warning if the requested extension is not supported. It emits an error if the extension does not load successfully. For instance, extension GL_ARB_multitexture was promoted as a core feature into OpenGL 1.3. An implementation that uses this feature has to (IN THIS ORDER), check if OpenGL 1.3 is supported with ExtensionSupported("GL_VERSION_1_3"), if true, load the extension with LoadExtension("GL_VERSION_1_3"). If false, test for the extension with ExtensionSupported("GL_ARB_multitexture"),if true load the extension with this method LoadCorePromotedExtension("GL_ARB_multitexture"). If any of those loading stage succeeded, use vtgl::ActiveTexture() in any case, NOT vtgl::ActiveTextureARB(). This method avoids the use of if statements everywhere in implementations using core-promoted extensions. Without this method, the implementation code should look like:

 int
      opengl_1_3=extensions->ExtensionSupported("GL_VERSION_1_3");
      if(opengl_1_3) { extensions->LoadExtension("GL_VERSION_1_3"); } else
      { if(extensions->ExtensionSupported("GL_ARB_multitexture")) {
      extensions->LoadCorePromotedExtension("GL_ARB_multitexture"); } else
      { vtkErrorMacro("Required multitexture feature is not supported!"); }
      } ... if(opengl_1_3) { vtkgl::ActiveTexture(vtkgl::TEXTURE0) } else {
      vtkgl::ActiveTextureARB(vtkgl::TEXTURE0_ARB) } 

Thanks to this method, the code looks like:

 int
      opengl_1_3=extensions->ExtensionSupported("GL_VERSION_1_3");
      if(opengl_1_3) { extensions->LoadExtension("GL_VERSION_1_3"); } else
      { if(extensions->ExtensionSupported("GL_ARB_multitexture")) {
      extensions->LoadCorePromotedExtension("GL_ARB_multitexture"); } else
      { vtkErrorMacro("Required multitexture feature is not supported!"); }
      } ... vtkgl::ActiveTexture(vtkgl::TEXTURE0); 
virtual void LoadAsARBExtension ( const char *  name) [virtual]

Similar to LoadCorePromotedExtension(). It loads an EXT extension into the pointers of its ARB equivalent.

virtual int GetDriverVersionMajor ( ) [virtual]

Return the driver's version parts. This may be used for fine grained feature testing.

Definition at line 238 of file vtkOpenGLExtensionManager.h.

virtual int GetDriverVersionMinor ( ) [virtual]

Return the driver's version parts. This may be used for fine grained feature testing.

Definition at line 239 of file vtkOpenGLExtensionManager.h.

virtual int GetDriverVersionPatch ( ) [virtual]

Return the driver's version parts. This may be used for fine grained feature testing.

Definition at line 240 of file vtkOpenGLExtensionManager.h.

virtual int GetDriverGLVersionMajor ( ) [virtual]

Get GL API version that the driver provides. This is often different than the GL version that VTK recognizes so only use this for identifying a specific driver.

Definition at line 247 of file vtkOpenGLExtensionManager.h.

virtual int GetDriverGLVersionMinor ( ) [virtual]

Get GL API version that the driver provides. This is often different than the GL version that VTK recognizes so only use this for identifying a specific driver.

Definition at line 248 of file vtkOpenGLExtensionManager.h.

virtual int GetDriverGLVersionPatch ( ) [virtual]

Get GL API version that the driver provides. This is often different than the GL version that VTK recognizes so only use this for identifying a specific driver.

Definition at line 249 of file vtkOpenGLExtensionManager.h.

virtual bool DriverIsATI ( ) [virtual]

Test's for common implementors of rendering drivers. This may be used for fine grained feature testing. Note: DriverIsMesa succeeds for OS Mesa, use DriverGLRendererIsOSMessa to differentiate.

virtual bool DriverIsNvidia ( ) [virtual]

Test's for common implementors of rendering drivers. This may be used for fine grained feature testing. Note: DriverIsMesa succeeds for OS Mesa, use DriverGLRendererIsOSMessa to differentiate.

virtual bool DriverIsIntel ( ) [virtual]

Test's for common implementors of rendering drivers. This may be used for fine grained feature testing. Note: DriverIsMesa succeeds for OS Mesa, use DriverGLRendererIsOSMessa to differentiate.

virtual bool DriverIsMesa ( ) [virtual]

Test's for common implementors of rendering drivers. This may be used for fine grained feature testing. Note: DriverIsMesa succeeds for OS Mesa, use DriverGLRendererIsOSMessa to differentiate.

virtual bool DriverIsMicrosoft ( ) [virtual]

Test's for common implementors of rendering drivers. This may be used for fine grained feature testing. Note: DriverIsMesa succeeds for OS Mesa, use DriverGLRendererIsOSMessa to differentiate.

virtual bool DriverVersionIs ( int  major) [virtual]

Test for a specific driver version.

virtual bool DriverVersionIs ( int  major,
int  minor 
) [virtual]

Test for a specific driver version.

virtual bool DriverVersionIs ( int  major,
int  minor,
int  patch 
) [virtual]

Test for a specific driver version.

virtual bool DriverVersionAtLeast ( int  major) [virtual]

Test for driver version greater than or equal to the named version.

virtual bool DriverVersionAtLeast ( int  major,
int  minor 
) [virtual]

Test for driver version greater than or equal to the named version.

virtual bool DriverVersionAtLeast ( int  major,
int  minor,
int  patch 
) [virtual]

Test for driver version greater than or equal to the named version.

virtual bool DriverGLVersionIs ( int  major,
int  minor,
int  patch 
) [virtual]

Test for the driver's GL version as reported in its GL_VERSION string. This is intended for driver identification only, use ExtensionSuppported to test for VTK support of a specific GL version.

virtual bool DriverGLVersionIs ( int  major,
int  minor 
) [virtual]

Test for the driver's GL version as reported in its GL_VERSION string. This is intended for driver identification only, use ExtensionSuppported to test for VTK support of a specific GL version.

virtual bool DriverGLRendererIs ( const char *  str) [virtual]

Test for a specific renderer. This could be used in some cases to identify the graphics card or specific driver. Use HasToken to prevent false matches eg. avoid GeForce4 matching GeForce400

virtual bool DriverGLRendererHas ( const char *  str) [virtual]

Test for a specific renderer. This could be used in some cases to identify the graphics card or specific driver. Use HasToken to prevent false matches eg. avoid GeForce4 matching GeForce400

virtual bool DriverGLRendererHasToken ( const char *  str) [virtual]

Test for a specific renderer. This could be used in some cases to identify the graphics card or specific driver. Use HasToken to prevent false matches eg. avoid GeForce4 matching GeForce400

virtual bool DriverGLRendererIsOSMesa ( ) [virtual]

Test for Mesa's offscreen renderer.

virtual const char* GetDriverGLVendor ( ) [virtual]

Get the OpenGL version, vendor and renderer strings. These can be used to idnetify a specific driver.

Definition at line 300 of file vtkOpenGLExtensionManager.h.

virtual const char* GetDriverGLVersion ( ) [virtual]

Get the OpenGL version, vendor and renderer strings. These can be used to idnetify a specific driver.

Definition at line 301 of file vtkOpenGLExtensionManager.h.

virtual const char* GetDriverGLRenderer ( ) [virtual]

Get the OpenGL version, vendor and renderer strings. These can be used to idnetify a specific driver.

Definition at line 302 of file vtkOpenGLExtensionManager.h.

bool GetIgnoreDriverBugs ( const char *  description)

When set known driver bugs are ignored during driver feature detection. This is used to evaluate the status of a new driver release to see if the bugs have been fixed. The function takes a description argument which, is sent to VTK's warning stream when the ignore flag is set. This makes the test output searchable for tests which have problems with certain drivers. The CMakeLists variable VTK_IGNORE_GLDRIVER_BUGS can be used to set this at build time. Default OFF.

virtual void SetIgnoreDriverBugs ( bool  ) [virtual]

When set known driver bugs are ignored during driver feature detection. This is used to evaluate the status of a new driver release to see if the bugs have been fixed. The function takes a description argument which, is sent to VTK's warning stream when the ignore flag is set. This makes the test output searchable for tests which have problems with certain drivers. The CMakeLists variable VTK_IGNORE_GLDRIVER_BUGS can be used to set this at build time. Default OFF.

virtual void IgnoreDriverBugsOn ( ) [virtual]

When set known driver bugs are ignored during driver feature detection. This is used to evaluate the status of a new driver release to see if the bugs have been fixed. The function takes a description argument which, is sent to VTK's warning stream when the ignore flag is set. This makes the test output searchable for tests which have problems with certain drivers. The CMakeLists variable VTK_IGNORE_GLDRIVER_BUGS can be used to set this at build time. Default OFF.

virtual void IgnoreDriverBugsOff ( ) [virtual]

When set known driver bugs are ignored during driver feature detection. This is used to evaluate the status of a new driver release to see if the bugs have been fixed. The function takes a description argument which, is sent to VTK's warning stream when the ignore flag is set. This makes the test output searchable for tests which have problems with certain drivers. The CMakeLists variable VTK_IGNORE_GLDRIVER_BUGS can be used to set this at build time. Default OFF.

vtkOpenGLExtensionManager ( ) [protected]
virtual ~vtkOpenGLExtensionManager ( ) [protected, virtual]
virtual void InitializeDriverInformation ( ) [protected, virtual]
virtual void ReadOpenGLExtensions ( ) [protected, virtual]
virtual int SafeLoadExtension ( const char *  name) [protected, virtual]

Wrap around the generated vtkgl::LoadExtension to deal with OpenGL 1.2 and its optional part GL_ARB_imaging. Also functions like glBlendEquation() or glBlendColor() are optional in OpenGL 1.2 or 1.3 and provided by the GL_ARB_imaging but there are core features in OpenGL 1.4.


Variable Documentation

Definition at line 324 of file vtkOpenGLExtensionManager.h.

Definition at line 325 of file vtkOpenGLExtensionManager.h.

Definition at line 327 of file vtkOpenGLExtensionManager.h.

std::string DriverGLVersion

Definition at line 330 of file vtkOpenGLExtensionManager.h.

Definition at line 331 of file vtkOpenGLExtensionManager.h.

Definition at line 332 of file vtkOpenGLExtensionManager.h.

Definition at line 333 of file vtkOpenGLExtensionManager.h.

std::string DriverGLVendor

Definition at line 334 of file vtkOpenGLExtensionManager.h.

std::string DriverGLRenderer

Definition at line 335 of file vtkOpenGLExtensionManager.h.

Definition at line 336 of file vtkOpenGLExtensionManager.h.

Definition at line 337 of file vtkOpenGLExtensionManager.h.

Definition at line 338 of file vtkOpenGLExtensionManager.h.

Definition at line 348 of file vtkOpenGLExtensionManager.h.

Definition at line 349 of file vtkOpenGLExtensionManager.h.

Definition at line 366 of file vtkOpenGLExtensionManager.h.