j3d.org OpenGL SWT Bindings

org.j3d.opengl.swt
Class GLCanvas

java.lang.Object
  extended by Canvas
      extended by org.j3d.opengl.swt.GLCanvas

public class GLCanvas
extends Canvas

A widget that represents a surface that OpenGL draws into.

The canvas automatically creates a GLDrawable object to correspond to this canvas, and an accompanying GLContext instance. The GLContext instance, by default is not synchronized.

Version:
$Revision: 1.3 $
Author:
Justin Couch

Constructor Summary
GLCanvas(Composite parent, int style)
          Create a new isntance of this widget using the default GL capabilities.
GLCanvas(Composite parent, int style, GLCapabilities capabilities, GLCapabilitiesChooser chooser, GLContext sharedWith)
          Create a new instance of this widget.
GLCanvas(Composite parent, int style, GLContext shareWith)
          Create a new isntance of this widget
 
Method Summary
 GLContext getGLContext()
          Get the GLContext instance that was created for this canvas instance.
 GLDrawable getGLDrawable()
          Get the GLContext instance that was created for this canvas instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GLCanvas

public GLCanvas(Composite parent,
                int style)
Create a new isntance of this widget using the default GL capabilities.

Parameters:
parent - The parent component this widget exists in
style - SWT style bits

GLCanvas

public GLCanvas(Composite parent,
                int style,
                GLContext shareWith)
Create a new isntance of this widget

Parameters:
parent - The parent component this widget exists in
style - SWT style bits
sharedWith - The GL context to share resources with. May be null

GLCanvas

public GLCanvas(Composite parent,
                int style,
                GLCapabilities capabilities,
                GLCapabilitiesChooser chooser,
                GLContext sharedWith)
Create a new instance of this widget. The capabilities are defined from the list of prefered options in the chooser. If no chooser is given, a default implementation is used that picks the best option.

Parameters:
parent - The parent component this widget exists in
style - SWT style bits
capabilities - A selection of the requested capabilities
chooser - A chooser to help decide between requested and available screen and device capabilities
sharedWith - The GL context to share resources with. May be null
Method Detail

getGLContext

public GLContext getGLContext()
Get the GLContext instance that was created for this canvas instance.

Returns:
The current context

getGLDrawable

public GLDrawable getGLDrawable()
Get the GLContext instance that was created for this canvas instance.

Returns:
The current context

j3d.org OpenGL SWT Bindings

Latest Info from http://www.j3d.org/
Copyright © 2003 - 2005 j3d.org