|
j3d.org OpenGL SWT Bindings | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectGLDrawableFactory
org.j3d.opengl.swt.SWTRIDrawableFactory
An implementation of the GLDrawableFactory
that generates
SWT-specific capabilities using an extension of the JOGL Reference
Implementation codebase.
Constructor Summary | |
SWTRIDrawableFactory()
Create a new instance of this drawable factory. |
Method Summary | |
boolean |
canCreateExternalGLDrawable()
Check to see if this card can create a drawable instance using an external GL context. |
boolean |
canCreateGLPbuffer()
Check to see if this system is capable of creating a Pbuffer. |
AbstractGraphicsConfiguration |
chooseGraphicsConfiguration(GLCapabilities capabilities,
GLCapabilitiesChooser chooser,
AbstractGraphicsDevice device)
Selects a graphics configuration on the specified graphics device compatible with the supplied GLCapabilities. |
GLContext |
createExternalGLContext()
Creates a GLContext object representing an existing OpenGL context in an external (third-party) OpenGL-based library. |
GLDrawable |
createExternalGLDrawable()
Create a GLDrawable object representing an existing
OpenGL drawable in an external (third-party) OpenGL-based
library. |
GLPbuffer |
createGLPbuffer(GLCapabilities capabilities,
GLCapabilitiesChooser chooser,
int initialWidth,
int initialHeight,
GLContext shareWith)
Creates a GLPbuffer with the given capabilites and dimensions. |
GLDrawable |
getGLDrawable(java.lang.Object target,
GLCapabilities capabilities,
GLCapabilitiesChooser chooser)
Returns a GLDrawable that wraps a platform-specific window system object, such as an AWT or LCDUI Canvas. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SWTRIDrawableFactory()
Method Detail |
public AbstractGraphicsConfiguration chooseGraphicsConfiguration(GLCapabilities capabilities, GLCapabilitiesChooser chooser, AbstractGraphicsDevice device)
The concrete data type of the passed graphics device and
returned graphics configuration must be specified in the
documentation binding this particular API to the underlying
window toolkit. The SWT implementation accepts SWTGraphicsDevice
objects and returns SWTGraphicsConfiguration
objects.
public GLDrawable getGLDrawable(java.lang.Object target, GLCapabilities capabilities, GLCapabilitiesChooser chooser) throws java.lang.IllegalArgumentException, GLException
java.lang.IllegalArgumentException
- if the passed target is either
null or its data type is not supported by this GLDrawableFactory.
GLException
- if any window system-specific errors caused
the creation of the GLDrawable to fail.public boolean canCreateGLPbuffer()
public GLPbuffer createGLPbuffer(GLCapabilities capabilities, GLCapabilitiesChooser chooser, int initialWidth, int initialHeight, GLContext shareWith)
public GLContext createExternalGLContext()
Creates a GLContext object representing an existing OpenGL
context in an external (third-party) OpenGL-based library. This
GLContext object may be used to draw into this preexisting
context using its GL
and javax.media.opengl.glu.GLU
objects. New contexts created through
GLDrawable
s may share textures and display lists with
this external context.
The underlying OpenGL context must be current on the current
thread at the time this method is called. The user is responsible
for the maintenance of the underlying OpenGL context; calls to
makeCurrent
and release
on the returned
GLContext object have no effect. If the underlying OpenGL context
is destroyed, the destroy
method should be called on
the GLContext
. A new GLContext
object
should be created for each newly-created underlying OpenGL
context.
public boolean canCreateExternalGLDrawable()
createExternalGLDrawable()
.public GLDrawable createExternalGLDrawable()
GLDrawable
object representing an existing
OpenGL drawable in an external (third-party) OpenGL-based
library. This GLDrawable object may be used to create new,
fully-functional GLContext
s on the OpenGL drawable. This
is useful when interoperating with a third-party OpenGL-based
library and it is essential to not perturb the state of the
library's existing context, even to the point of not sharing
textures or display lists with that context.
|
j3d.org OpenGL SWT Bindings | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |