com.sun.opengl.impl
Class GLDrawableFactoryImpl
- DynamicLookupHelper
public abstract class GLDrawableFactoryImpl
implements DynamicLookupHelper
Extends GLDrawableFactory with a few methods for handling
typically software-accelerated offscreen rendering (Device
Independent Bitmaps on Windows, pixmaps on X11). Direct access to
these GLDrawables is not supplied directly to end users, though
they may be instantiated by the GLJPanel implementation.
createOffscreenDrawable
public abstract GLDrawableImpl createOffscreenDrawable(GLCapabilities capabilities,
GLCapabilitiesChooser chooser)
Creates a (typically software-accelerated) offscreen GLDrawable
used to implement the fallback rendering path of the
GLJPanel.
dynamicLookupFunction
public abstract long dynamicLookupFunction(String glFuncName)
Dynamically looks up the given function.
getGammaRamp
protected Buffer getGammaRamp()
Gets the current gamma ramp. This is basically an opaque value
used only on some platforms to reset the gamma ramp to its
original settings.
getGammaRampLength
protected int getGammaRampLength()
Returns the length of the computed gamma ramp for this OS and
hardware. Returns 0 if gamma changes are not supported.
loadGLULibrary
public abstract void loadGLULibrary()
lockAWTForJava2D
public abstract void lockAWTForJava2D()
Locks the AWT for the purposes of Java2D/JOGL integration. This
is not necessary on some platforms.
resetDisplayGamma
public void resetDisplayGamma()
resetGammaRamp
protected void resetGammaRamp(Buffer originalGammaRamp)
Resets the gamma ramp, potentially using the specified Buffer as
data to restore the original values.
setDisplayGamma
public boolean setDisplayGamma(float gamma,
float brightness,
float contrast)
throws IllegalArgumentException
Sets the gamma, brightness, and contrast of the current main
display. Returns true if the settings were changed, false if
not. If this method returns true, the display settings will
automatically be reset upon JVM exit (assuming the JVM does not
crash); if the user wishes to change the display settings back to
normal ahead of time, use resetDisplayGamma(). Throws
IllegalArgumentException if any of the parameters were
out-of-bounds.
gamma
- The gamma value, typically > 1.0 (default value is
1.0)brightness
- The brightness value between -1.0 and 1.0,
inclusive (default value is 0)contrast
- The contrast, greater than 0.0 (default value is 1)
setGammaRamp
protected boolean setGammaRamp(float[] ramp)
Sets the gamma ramp for the main screen. Returns false if gamma
ramp changes were not supported.
unlockAWTForJava2D
public abstract void unlockAWTForJava2D()
Unlocks the AWT for the purposes of Java2D/JOGL integration.
This is not necessary on some platforms.
Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.