com.sun.opengl.impl.x11

Class X11GLDrawable

Implemented Interfaces:
GLDrawable
Known Direct Subclasses:
X11ExternalGLDrawable, X11OffscreenGLDrawable, X11OnscreenGLDrawable, X11PbufferGLDrawable

public abstract class X11GLDrawable
extends GLDrawableImpl

Field Summary

protected static boolean
DEBUG
protected GLCapabilities
capabilities
protected GLCapabilitiesChooser
chooser
protected long
display
protected long
drawable
protected long
visualID

Constructor Summary

X11GLDrawable(GLCapabilities capabilities, GLCapabilitiesChooser chooser)

Method Summary

protected XVisualInfo
chooseVisual(boolean onscreen)
void
destroy()
For offscreen GLDrawables (pbuffers and "pixmap" drawables), indicates that native resources should be reclaimed.
long
getDisplay()
long
getDrawable()
protected void
lockToolkit()
void
setRealized(boolean val)
Indicates to on-screen GLDrawable implementations whether the underlying window has been created and can be drawn into.
void
swapBuffers()
Swaps the front and back buffers of this drawable.
protected void
unlockToolkit()

Methods inherited from class com.sun.opengl.impl.GLDrawableImpl

destroy, toHexString

Field Details

DEBUG

protected static final boolean DEBUG

capabilities

protected GLCapabilities capabilities

chooser

protected GLCapabilitiesChooser chooser

display

protected long display

drawable

protected long drawable

visualID

protected long visualID

Constructor Details

X11GLDrawable

public X11GLDrawable(GLCapabilities capabilities,
                     GLCapabilitiesChooser chooser)

Method Details

chooseVisual

protected XVisualInfo chooseVisual(boolean onscreen)

destroy

public void destroy()
For offscreen GLDrawables (pbuffers and "pixmap" drawables), indicates that native resources should be reclaimed.
Overrides:
destroy in interface GLDrawableImpl

getDisplay

public long getDisplay()

getDrawable

public long getDrawable()

lockToolkit

protected void lockToolkit()

setRealized

public void setRealized(boolean val)
Indicates to on-screen GLDrawable implementations whether the underlying window has been created and can be drawn into. This method must be called from GLDrawables obtained from the GLDrawableFactory via the GLDrawableFactory.getGLDrawable() method. It must typically be called with an argument of true in the addNotify method of components performing OpenGL rendering and with an argument of false in the removeNotify method. Calling this method has no other effects. For example, if removeNotify is called on a Canvas implementation for which a GLDrawable has been created, it is also necessary to destroy all OpenGL contexts associated with that GLDrawable. This is not done automatically by the implementation. It is not necessary to call setRealized on a GLCanvas, a GLJPanel, or a GLPbuffer, as these perform the appropriate calls on their underlying GLDrawables internally..
Specified by:
setRealized in interface GLDrawable

swapBuffers

public void swapBuffers()
            throws GLException
Swaps the front and back buffers of this drawable. For GLAutoDrawable implementations, when automatic buffer swapping is enabled (as is the default), this method is called automatically and should not be called by the end user.
Specified by:
swapBuffers in interface GLDrawable

unlockToolkit

protected void unlockToolkit()

Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.