Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
com.sun.opengl.impl.GLDrawableImpl
com.sun.opengl.impl.x11.X11GLDrawable
com.sun.opengl.impl.x11.X11OnscreenGLDrawable
public class X11OnscreenGLDrawable
extends X11GLDrawable
Field Summary | |
static int | |
static int | |
static int | |
protected Component | |
protected boolean |
Fields inherited from class com.sun.opengl.impl.x11.X11GLDrawable | |
DEBUG , capabilities , chooser , display , drawable , visualID |
Constructor Summary | |
|
Method Summary | |
GLContext |
|
int |
|
int |
|
int | |
void |
|
void |
|
void |
|
void |
Methods inherited from class com.sun.opengl.impl.x11.X11GLDrawable | |
chooseVisual , destroy , getDisplay , getDrawable , lockToolkit , setRealized , swapBuffers , unlockToolkit |
Methods inherited from class com.sun.opengl.impl.GLDrawableImpl | |
destroy , toHexString |
public static final int LOCK_SUCCESS
- Field Value:
- 3
public static final int LOCK_SURFACE_CHANGED
- Field Value:
- 2
public static final int LOCK_SURFACE_NOT_READY
- Field Value:
- 1
protected Component component
protected boolean realized
public GLContext createContext(GLContext shareWith)
Creates a new context for drawing to this drawable that will optionally share display lists and other server-side OpenGL objects with the specified GLContext. The GLContextshare
need not be associated with this GLDrawable and may be null if sharing of display lists and other objects is not desired. See the note in the overview documentation on context sharing.
- Specified by:
- createContext in interface GLDrawable
public int getHeight()
Returns the current height of this GLDrawable.
- Specified by:
- getHeight in interface GLDrawable
public int getWidth()
Returns the current width of this GLDrawable.
- Specified by:
- getWidth in interface GLDrawable
public void setRealized(boolean realized)
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 theGLDrawableFactory.getGLDrawable()
method. It must typically be called with an argument oftrue
in theaddNotify
method of components performing OpenGL rendering and with an argument offalse
in theremoveNotify
method. Calling this method has no other effects. For example, ifremoveNotify
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 callsetRealized
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
- Overrides:
- setRealized in interface X11GLDrawable
public void setSize(int width, int height)
Requests a new width and height for this GLDrawable. Not all drawables are able to respond to this request and may silently ignore it.
- Specified by:
- setSize in interface GLDrawable
public void swapBuffers() throws GLException
Swaps the front and back buffers of this drawable. ForGLAutoDrawable
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
- Overrides:
- swapBuffers in interface X11GLDrawable
public void unlockSurface()