|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.util.OGLUtil
public class OGLUtil
A collection of OpenGL utility methods, all static.
| Field Summary | |
|---|---|
protected static Vec4 |
DEFAULT_LIGHT_DIRECTION
|
protected static boolean |
DEFAULT_USE_PREMULTIPLIED_COLORS
|
protected static java.lang.String |
EXT_BLEND_FUNC_SEPARATE_STRING
|
| Constructor Summary | |
|---|---|
OGLUtil()
|
|
| Method Summary | |
|---|---|
static void |
applyBlending(javax.media.opengl.GL gl)
Sets the GL blending state for colors premultiplied by the alpha component. |
static void |
applyBlending(javax.media.opengl.GL gl,
boolean isPremultipliedAlpha)
Sets the GL blending state according to the specified color mode. |
static void |
applyColor(javax.media.opengl.GL gl,
java.awt.Color color)
Sets the GL color state to the specified Color. |
static void |
applyColor(javax.media.opengl.GL gl,
java.awt.Color color,
boolean premultiply)
Sets the GL color state to the specified Color, and with the specified color mode. |
static void |
applyColor(javax.media.opengl.GL gl,
java.awt.Color color,
double opacity)
Sets the GL color state to the specified Color and opacity. |
static void |
applyColor(javax.media.opengl.GL gl,
java.awt.Color color,
double opacity,
boolean premultiply)
Sets the GL color state to the specified Color and opacity, and with the specified color mode. |
static void |
applyLightingDirectionalFromViewer(javax.media.opengl.GL gl,
int light)
Sets the GL lighting state to a white light originating from the eye position and pointed directly along the forward vector form the eye point |
static void |
applyLightingDirectionalFromViewer(javax.media.opengl.GL gl,
int light,
Vec4 direction)
Sets the GL lighting state to a white light originating from the eye position and pointed in the specified direction, in model coordinates. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Vec4 DEFAULT_LIGHT_DIRECTION
protected static final boolean DEFAULT_USE_PREMULTIPLIED_COLORS
protected static final java.lang.String EXT_BLEND_FUNC_SEPARATE_STRING
| Constructor Detail |
|---|
public OGLUtil()
| Method Detail |
|---|
public static void applyBlending(javax.media.opengl.GL gl)
gl - the GL context.
java.lang.IllegalArgumentException - if the GL is null.
public static void applyBlending(javax.media.opengl.GL gl,
boolean isPremultipliedAlpha)
gl - the GL context.isPremultipliedAlpha - true to configure blending for colors premultiplied by the alpha components, and
false to configure blending for non-premultiplied colors.
java.lang.IllegalArgumentException - if the GL is null.
public static void applyColor(javax.media.opengl.GL gl,
java.awt.Color color)
Color. This premultipies the Red, Green, and Blue color
values by the Alpha value.
gl - the GL context.color - the Red, Green, Blue, and Alpha values to set.
java.lang.IllegalArgumentException - if the GL is null, if the Color is null, if the opacity is less than 0, or if
the opacity is greater than 1.
public static void applyColor(javax.media.opengl.GL gl,
java.awt.Color color,
boolean premultiply)
Color, and with the specified color mode. If
premultiply is true, this premultipies the Red, Green, and Blue color values by the Alpha value. Otherwise, this
does not modify the Red, Green, and Blue color values.
gl - the GL context.color - the Red, Green, Blue, and Alpha values to set.premultiply - true to premultiply the Red, Green and Blue color values by the Alpha value, false to leave
the Red, Green, and Blue values unmodified.
java.lang.IllegalArgumentException - if the GL is null, if the Color is null, if the opacity is less than 0, or if
the opacity is greater than 1.
public static void applyColor(javax.media.opengl.GL gl,
java.awt.Color color,
double opacity)
Color and opacity. This premultipies the Red, Green,
and Blue color values by the opacity value.
gl - the GL context.color - the Red, Green, and Blue values to set.opacity - the opacity to set.
java.lang.IllegalArgumentException - if the GL is null, if the Color is null, if the opacity is less than 0, or if
the opacity is greater than 1.
public static void applyColor(javax.media.opengl.GL gl,
java.awt.Color color,
double opacity,
boolean premultiply)
Color and opacity, and with the specified color mode.
If premultiply is true, this premultipies the Red, Green, and Blue color values by the opacity value. Otherwise,
this does not modify the Red, Green, and Blue color values.
gl - the GL context.color - the Red, Green, and Blue values to set.opacity - the opacity to set.premultiply - true to premultiply the Red, Green, and Blue color values by the opacity value, false to leave
the Red, Green, and Blue values unmodified.
java.lang.IllegalArgumentException - if the GL is null, if the Color is null, if the opacity is less than 0, or if
the opacity is greater than 1.
public static void applyLightingDirectionalFromViewer(javax.media.opengl.GL gl,
int light)
gl - the GL context.light - the GL light name to set.
java.lang.IllegalArgumentException - if the GL is null.
public static void applyLightingDirectionalFromViewer(javax.media.opengl.GL gl,
int light,
Vec4 direction)
gl - the GL context.light - the GL light name to set.direction - the light direction in model coordinates, may be null.
java.lang.IllegalArgumentException - if the GL is null.
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||