|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.opengl.impl.GLPbufferImpl
public class GLPbufferImpl
Platform-independent class exposing pbuffer functionality to applications. This class is not exposed in the public API as it would probably add no value; however it implements the GLDrawable interface so can be interacted with via its display() method.
Field Summary |
---|
Fields inherited from interface javax.media.opengl.GLPbuffer |
---|
APPLE_FLOAT, ATI_FLOAT, NV_FLOAT |
Constructor Summary | |
---|---|
GLPbufferImpl(GLDrawableImpl pbufferDrawable,
GLContext parentContext)
|
Method Summary | |
---|---|
void |
addComponentListener(java.awt.event.ComponentListener l)
|
void |
addFocusListener(java.awt.event.FocusListener l)
|
void |
addGLEventListener(GLEventListener listener)
Adds a GLEventListener to this drawable. |
void |
addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener l)
|
void |
addHierarchyListener(java.awt.event.HierarchyListener l)
|
void |
addInputMethodListener(java.awt.event.InputMethodListener l)
|
void |
addKeyListener(java.awt.event.KeyListener l)
|
void |
addMouseListener(java.awt.event.MouseListener l)
|
void |
addMouseMotionListener(java.awt.event.MouseMotionListener l)
|
void |
addMouseWheelListener(java.awt.event.MouseWheelListener l)
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
|
void |
bindTexture()
Binds this pbuffer to its internal texture target. |
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. |
void |
destroy()
Destroys the native resources associated with this pbuffer. |
void |
display()
Causes OpenGL rendering to be performed for this GLAutoDrawable by calling display for all
registered GLEventListener s. |
boolean |
getAutoSwapBufferMode()
Indicates whether automatic buffer swapping is enabled for this drawable. |
GLCapabilities |
getChosenGLCapabilities()
Fetches the GLCapabilities corresponding to the chosen
OpenGL capabilities (pixel format / visual) for this drawable. |
GLContext |
getContext()
Returns the context associated with this drawable. |
GLDrawable |
getDrawable()
|
int |
getFloatingPointMode()
Indicates which vendor's extension is being used to support floating point channels in this pbuffer if that capability was requested in the GLCapabilities during pbuffer creation. |
GL |
getGL()
Returns the GL pipeline object this GLAutoDrawable uses. |
int |
getHeight()
Returns the current height of this GLDrawable. |
int |
getWidth()
Returns the current width of this GLDrawable. |
void |
releaseTexture()
Unbinds the pbuffer from its internal texture target. |
void |
removeComponentListener(java.awt.event.ComponentListener l)
|
void |
removeFocusListener(java.awt.event.FocusListener l)
|
void |
removeGLEventListener(GLEventListener listener)
Removes a GLEventListener from this drawable. |
void |
removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener l)
|
void |
removeHierarchyListener(java.awt.event.HierarchyListener l)
|
void |
removeInputMethodListener(java.awt.event.InputMethodListener l)
|
void |
removeKeyListener(java.awt.event.KeyListener l)
|
void |
removeMouseListener(java.awt.event.MouseListener l)
|
void |
removeMouseMotionListener(java.awt.event.MouseMotionListener l)
|
void |
removeMouseWheelListener(java.awt.event.MouseWheelListener l)
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
|
void |
repaint()
Schedules a repaint of the component at some point in the future. |
void |
setAutoSwapBufferMode(boolean onOrOff)
Enables or disables automatic buffer swapping for this drawable. |
void |
setGL(GL gl)
Sets the GL pipeline object this GLAutoDrawable uses. |
void |
setRealized(boolean realized)
Indicates to on-screen GLDrawable implementations whether the underlying window has been created and can be drawn into. |
void |
setSize(int width,
int height)
Requests a new width and height for this GLDrawable. |
void |
swapBuffers()
Swaps the front and back buffers of this drawable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GLPbufferImpl(GLDrawableImpl pbufferDrawable, GLContext parentContext)
Method Detail |
---|
public GLContext createContext(GLContext shareWith)
GLDrawable
The GLContext share
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.
createContext
in interface GLDrawable
public void setRealized(boolean realized)
GLDrawable
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..
setRealized
in interface GLDrawable
public void setSize(int width, int height)
GLDrawable
setSize
in interface GLDrawable
public int getWidth()
GLDrawable
getWidth
in interface GLDrawable
public int getHeight()
GLDrawable
getHeight
in interface GLDrawable
public void display()
GLAutoDrawable
display
for all
registered GLEventListener
s. Called automatically by the
window system toolkit upon receiving a repaint() request. this
routine may be called manually for better control over the
rendering process. It is legal to call another GLAutoDrawable's
display method from within the display
callback.
display
in interface GLAutoDrawable
public void repaint()
GLAutoDrawable
repaint
in interface GLAutoDrawable
public void addGLEventListener(GLEventListener listener)
GLAutoDrawable
GLEventListener
to this drawable. If multiple
listeners are added to a given drawable, they are notified of
events in an arbitrary order.
addGLEventListener
in interface GLAutoDrawable
public void removeGLEventListener(GLEventListener listener)
GLAutoDrawable
GLEventListener
from this drawable. Note that
if this is done from within a particular drawable's GLEventListener
handler (reshape, display, etc.) that it is not
guaranteed that all other listeners will be evaluated properly
during this update cycle.
removeGLEventListener
in interface GLAutoDrawable
public GLContext getContext()
GLAutoDrawable
getContext
in interface GLAutoDrawable
public GLDrawable getDrawable()
public GL getGL()
GLAutoDrawable
GL
pipeline object this GLAutoDrawable uses.
If this method is called outside of the GLEventListener
's callback methods (init, display, etc.) it may
return null. Users should not rely on the identity of the
returned GL object; for example, users should not maintain a
hash table with the GL object as the key. Additionally, the GL
object should not be cached in client code, but should be
re-fetched from the GLAutoDrawable at the beginning of each call
to init, display, etc.
getGL
in interface GLAutoDrawable
public void setGL(GL gl)
GLAutoDrawable
GL
pipeline object this GLAutoDrawable uses.
This should only be called from within the GLEventListener's
callback methods, and usually only from within the init()
method, in order to install a composable pipeline. See the JOGL
demos for examples.
setGL
in interface GLAutoDrawable
public void setAutoSwapBufferMode(boolean onOrOff)
GLAutoDrawable
GLDrawable.swapBuffers()
manually.
setAutoSwapBufferMode
in interface GLAutoDrawable
public boolean getAutoSwapBufferMode()
GLAutoDrawable
GLAutoDrawable.setAutoSwapBufferMode(boolean)
.
getAutoSwapBufferMode
in interface GLAutoDrawable
public void swapBuffers()
GLDrawable
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.
swapBuffers
in interface GLDrawable
public void bindTexture()
GLPbuffer
bindTexture
in interface GLPbuffer
public void releaseTexture()
GLPbuffer
releaseTexture
in interface GLPbuffer
public GLCapabilities getChosenGLCapabilities()
GLDrawable
GLCapabilities
corresponding to the chosen
OpenGL capabilities (pixel format / visual) for this drawable.
Some drawables, in particular on-screen drawables, may be
created lazily; null is returned if the drawable is not
currently created or if its pixel format has not been set yet.
On some platforms, the pixel format is not directly associated
with the drawable; a best attempt is made to return a reasonable
value in this case.
getChosenGLCapabilities
in interface GLDrawable
public void addComponentListener(java.awt.event.ComponentListener l)
addComponentListener
in interface ComponentEvents
public void removeComponentListener(java.awt.event.ComponentListener l)
removeComponentListener
in interface ComponentEvents
public void addFocusListener(java.awt.event.FocusListener l)
addFocusListener
in interface ComponentEvents
public void removeFocusListener(java.awt.event.FocusListener l)
removeFocusListener
in interface ComponentEvents
public void addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener l)
addHierarchyBoundsListener
in interface ComponentEvents
public void removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener l)
removeHierarchyBoundsListener
in interface ComponentEvents
public void addHierarchyListener(java.awt.event.HierarchyListener l)
addHierarchyListener
in interface ComponentEvents
public void removeHierarchyListener(java.awt.event.HierarchyListener l)
removeHierarchyListener
in interface ComponentEvents
public void addInputMethodListener(java.awt.event.InputMethodListener l)
addInputMethodListener
in interface ComponentEvents
public void removeInputMethodListener(java.awt.event.InputMethodListener l)
removeInputMethodListener
in interface ComponentEvents
public void addKeyListener(java.awt.event.KeyListener l)
addKeyListener
in interface ComponentEvents
public void removeKeyListener(java.awt.event.KeyListener l)
removeKeyListener
in interface ComponentEvents
public void addMouseListener(java.awt.event.MouseListener l)
addMouseListener
in interface ComponentEvents
public void removeMouseListener(java.awt.event.MouseListener l)
removeMouseListener
in interface ComponentEvents
public void addMouseMotionListener(java.awt.event.MouseMotionListener l)
addMouseMotionListener
in interface ComponentEvents
public void removeMouseMotionListener(java.awt.event.MouseMotionListener l)
removeMouseMotionListener
in interface ComponentEvents
public void addMouseWheelListener(java.awt.event.MouseWheelListener l)
addMouseWheelListener
in interface ComponentEvents
public void removeMouseWheelListener(java.awt.event.MouseWheelListener l)
removeMouseWheelListener
in interface ComponentEvents
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface ComponentEvents
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface ComponentEvents
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface ComponentEvents
public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface ComponentEvents
public void destroy()
GLPbuffer
GLDrawable.createContext(javax.media.opengl.GLContext)
.
destroy
in interface GLPbuffer
public int getFloatingPointMode()
GLPbuffer
getFloatingPointMode
in interface GLPbuffer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |