Logo Search packages:      
Sourcecode: libjogl-java version File versions  Download package

boolean javax::media::opengl::GL::isFunctionAvailable ( String  glFunctionName  )  [inherited]

Returns true if the specified OpenGL core- or extension-function can be used successfully through this GL instance given the current host (OpenGL client) and display (OpenGL server) configuration.

By "successfully" we mean that the function is both callable on the machine running the program and available on the current display.

In order to call a function successfully, the function must be both callable on the machine running the program and available on the display device that is rendering the output (note: on non-networked, single-display machines these two conditions are identical; on networked and/or multi-display machines this becomes more complicated). These conditions are met if the function is either part of the core OpenGL version supported by both the host and display, or it is an OpenGL extension function that both the host and display support.

A GL function is callable if it is statically linked, or can be dynamically linked at runtime.

Whether or not a GL function is available is determined as follows:

  • If the function is an OpenGL core function (i.e., not an extension), glGetString(GL_VERSION) is used to determine the version number of the highest OpenGL specification version that both host and display support, and then the function name is cross-referenced with that specification version to see if it is part of that version.
  • If the function is an OpenGL extension, the function name is cross-referenced with the list returned by glGetString(GL_EXTENSIONS) to see if the function is one of the extensions that is supported on both host and display.

NOTE:The availability of a function may change at runtime in response to changes in the display environment. For example, when a window is dragged from one display to another on a multi-display system, or when the properties of the display device are modified (e.g., changing the color depth of the display). Any application that is concerned with handling these situations correctly should confirm availability after a display change before calling a questionable OpenGL function. To detect a change in the display device, please see GLEventListener#displayChanged(GLAutoDrawable,boolean,boolean).

Parameters:
glFunctionName the name of the OpenGL function (e.g., use "glBindRenderbufferEXT" to check if glBindRenderbufferEXT(int,int) is available).


Generated by  Doxygen 1.6.0   Back to index