org.scilab.forge.scirenderer.implementation.jogl.utils
Class GLShortCuts

java.lang.Object
  extended by org.scilab.forge.scirenderer.implementation.jogl.utils.GLShortCuts

public final class GLShortCuts
extends java.lang.Object

Utility class for common OpenGl calls.

Author:
Pierre Lando

Method Summary
static void setEnable(javax.media.opengl.GL gl, int option, boolean status)
          Enable or disable GL option.
static void useColor(javax.media.opengl.GL gl, Color color)
          Set the OpenGl context color to the given color.
static void useLineAppearance(javax.media.opengl.GL gl, Appearance appearance)
          Set the OpenGl context line appearance from the given appearance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

useLineAppearance

public static void useLineAppearance(javax.media.opengl.GL gl,
                                     Appearance appearance)
Set the OpenGl context line appearance from the given appearance. If appearance is null, default value are used..

Parameters:
gl - the OpenGl context.
appearance - the appearance to use.

useColor

public static void useColor(javax.media.opengl.GL gl,
                            Color color)
Set the OpenGl context color to the given color.

Parameters:
gl - the OpenGl context.
color - the color to use.

setEnable

public static void setEnable(javax.media.opengl.GL gl,
                             int option,
                             boolean status)
Enable or disable GL option.

Parameters:
gl - the current gl.
option - the option to change.
status - the new option status.