|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gl4java.drawable.GLDrawableFactory
Provides a VM- and OS-independent mechanism for creating
GLAnimCanvas
,
GLCanvas
,
GLAnimJPanel
and GLJPanel
objects. Most useful when used in conjunction with the GLEventListener
model, where subclassing is not
required.
The GLCapabilities
objects passed in to the
various factory methods are used as a minimum specification for
the properties of the returned GLCanvas. The canvas will either
meet or exceed all of the integer properties such as color and
accumulation buffer depth and will match all of the boolean
properties such as enabling or disabling of stereo. The selection
algorithm in general attempts to select the most minimal window
type to meet the criteria, but is otherwise left loosely
specified.
The implementing class of this abstract factory methods does clone your given GLCapabilities. So your version is unchanged. The GLContext's GLCapabilites instance is changed to the used capabilities, so you can query GLContext's GLCapabilites!
It is currently not possible to specify GLCapabilities for lightweight components.
Constructor Summary | |
GLDrawableFactory()
|
Method Summary | |
GLAnimCanvas |
createGLAnimCanvas(GLCapabilities capabilities,
int width,
int height)
Create a new GLAnimCanvas given the specified GLCapabilities. |
abstract GLAnimCanvas |
createGLAnimCanvas(GLCapabilities capabilities,
int width,
int height,
java.lang.String glName,
java.lang.String gluName)
Create a new GLAnimCanvas given the specified GLCapabilities. |
GLAnimJPanel |
createGLAnimJPanel()
Create a new GLAnimJPanel. |
GLAnimJPanel |
createGLAnimJPanel(java.lang.String glName,
java.lang.String gluName,
java.awt.LayoutManager layout,
boolean isDoubleBuffered)
Create a new GLAnimJPanel with the specified GL/GLU library names, LayoutManager, and double buffering specification. |
GLCanvas |
createGLCanvas(GLCapabilities capabilities,
int width,
int height)
Create a new GLCanvas given the specified GLCapabilities. |
abstract GLCanvas |
createGLCanvas(GLCapabilities capabilities,
int width,
int height,
java.lang.String glName,
java.lang.String gluName)
Create a new GLCanvas given the specified GLCapabilities. |
GLJPanel |
createGLJPanel()
Create a new GLJPanel. |
GLJPanel |
createGLJPanel(java.lang.String glName,
java.lang.String gluName,
java.awt.LayoutManager layout,
boolean isDoubleBuffered)
Create a new GLJPanel with the specified GL/GLU library names, LayoutManager, and double buffering specification. |
static GLDrawableFactory |
getFactory()
Returns the sole instance of the GLCanvasFactory (singleton pattern). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GLDrawableFactory()
Method Detail |
public static GLDrawableFactory getFactory()
public GLAnimCanvas createGLAnimCanvas(GLCapabilities capabilities, int width, int height)
capabilities
- the requested set of OpenGL capabilities of
the canvaswidth
- the canvas's initial widthheight
- the canvas's initial heightpublic abstract GLAnimCanvas createGLAnimCanvas(GLCapabilities capabilities, int width, int height, java.lang.String glName, java.lang.String gluName)
capabilities
- the requested set of OpenGL capabilities of
the canvaswidth
- the canvas's initial widthheight
- the canvas's initial heightglName
- the name of the GLFunc implementation.
If null, the default class will be usedgluName
- the name of the GLUFunc implementation.
If null, the default class will be usedpublic GLCanvas createGLCanvas(GLCapabilities capabilities, int width, int height)
capabilities
- the requested set of OpenGL capabilities of
the canvaswidth
- the canvas's initial widthheight
- the canvas's initial heightpublic abstract GLCanvas createGLCanvas(GLCapabilities capabilities, int width, int height, java.lang.String glName, java.lang.String gluName)
capabilities
- the requested set of OpenGL capabilities of
the canvaswidth
- the canvas's initial widthheight
- the canvas's initial heightglName
- the name of the GLFunc implementation.
If null, the default class will be usedgluName
- the name of the GLUFunc implementation.
If null, the default class will be usedpublic GLAnimJPanel createGLAnimJPanel()
public GLAnimJPanel createGLAnimJPanel(java.lang.String glName, java.lang.String gluName, java.awt.LayoutManager layout, boolean isDoubleBuffered)
glName
- the name of the GLFunc implementation.
If null, the default class will be usedgluName
- the name of the GLUFunc implementation.
If null, the default class will be usedlayout
- the layout managerisDoubleBuffered
- indicates if double buffering should be usedpublic GLJPanel createGLJPanel()
public GLJPanel createGLJPanel(java.lang.String glName, java.lang.String gluName, java.awt.LayoutManager layout, boolean isDoubleBuffered)
glName
- the name of the GLFunc implementation.
If null, the default class will be usedgluName
- the name of the GLUFunc implementation.
If null, the default class will be usedlayout
- the layout managerisDoubleBuffered
- indicates if double buffering should be used
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |