de.rico.engine.util
Class ExtensAvailChecker

java.lang.Object
  extended by de.rico.engine.util.ExtensAvailChecker

public class ExtensAvailChecker
extends java.lang.Object

This class contains static methods that can be called to check for the availabilty of certain OpenGL extensions.

Author:
Frank Bruns

Constructor Summary
ExtensAvailChecker()
           
 
Method Summary
static int getMaxNumTexUnits(javax.media.opengl.GL gl)
          Returns the number of maximum available texture units on the graphics hardware.
static boolean isAvailable(javax.media.opengl.GL gl, java.lang.String extensionName)
          Determines whether the specified extension is available
static boolean isAvailableAmbientShadow(javax.media.opengl.GL gl)
          Checks, if the GL_ARB_shadow_ambient extension is available on current graphics card.
static boolean isAvailableMultiTexturing(javax.media.opengl.GL gl)
          Checks, if multitexturing available on current graphics card.
static boolean isAvailableShadow(javax.media.opengl.GL gl)
          Checks, if the GL_ARB_shadow extension is available on current graphics card.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtensAvailChecker

public ExtensAvailChecker()
Method Detail

isAvailableShadow

public static boolean isAvailableShadow(javax.media.opengl.GL gl)
Checks, if the GL_ARB_shadow extension is available on current graphics card. That extension is useful for the depth texture shadowing technique.

Parameters:
gl -
Returns:
Is extension available? --> yes = true, no = false

isAvailableAmbientShadow

public static boolean isAvailableAmbientShadow(javax.media.opengl.GL gl)
Checks, if the GL_ARB_shadow_ambient extension is available on current graphics card. That extension is useful for the depth texture shadowing technique.

Parameters:
gl -
Returns:
Is extension available? --> yes = true, no = false

isAvailableMultiTexturing

public static boolean isAvailableMultiTexturing(javax.media.opengl.GL gl)
Checks, if multitexturing available on current graphics card.

Parameters:
gl -
Returns:
Is extension available? --> yes = true, no = false

isAvailable

public static boolean isAvailable(javax.media.opengl.GL gl,
                                  java.lang.String extensionName)
Determines whether the specified extension is available

Parameters:
gl -
extensionName - name of the extension to check (e.g. "GL_ARB_multitexture")
Returns:
is available? --> true=yes, false=no

getMaxNumTexUnits

public static int getMaxNumTexUnits(javax.media.opengl.GL gl)
Returns the number of maximum available texture units on the graphics hardware.

Parameters:
gl -
Returns:
maximum number of texture units