com.hermetica.magician
Class GLDrawableFactory

java.lang.Object
  |
  +--com.hermetica.magician.GLDrawableFactory

public class GLDrawableFactory
extends java.lang.Object

This class instantiates GLComponent objects tailored to the requirements that you give it and the JVM/AWT implementation you are currently executing Magician applications on. For example, Sun and Microsoft's AWT implementations for Magician are incompatible, but this class will hide the differences for you ensuring your applications work on all platforms without any code changes.

Version:
$Id: GLDrawableFactory.java,v 1.2 1999/06/03 23:11:48 descarte Exp $
Author:
Alligator Descartes
See Also:
GLComponent, com.hermetica.magician.JGLComponent, GLOffscreenBuffer, GLContext

Constructor Summary
GLDrawableFactory()
           
 
Method Summary
static GLDrawable createGLComponent()
          Creates a new GLComponent object with the default dimensions of 100x100
static GLDrawable createGLComponent(java.awt.Dimension dim)
          Creates a new GLComponent object with the given dimensions
static GLDrawable createGLComponent(GLComponent component)
          Creates a new GLComponent object with the default dimensions of 100x100 and is set to share the display lists and texture objects of the given component.
static GLDrawable createGLComponent(GLComponent component, java.awt.Dimension dim)
          Creates a new GLComponent object with the given dimensions and the display lists and texture objects of the given component
static GLDrawable createGLComponent(GLComponent component, GLContext context)
          Creates a new GLComponent object with the default dimensions of 100x100 and the given customized OpenGL rendering context and the given component whose display lists and texture objects will be shared.
static GLDrawable createGLComponent(GLComponent component, GLContext context, java.awt.Dimension dim)
          Creates a new GLComponent object with the given dimensions and the given customized OpenGL rendering context and the given component whose display lists and texture objects will be shared.
static GLDrawable createGLComponent(GLComponent component, GLContext context, int width, int height)
          Creates a new GLComponent object with the given dimensions and the display lists and texture objects of the given component not to mention using the pre-created OpenGL rendering context
static GLDrawable createGLComponent(GLComponent component, int width, int height)
          Creates a new GLComponent object with the given dimensions and sharing the display lists and texture objects of the given component
static GLDrawable createGLComponent(GLContext context)
          Creates a new GLComponent object with the default dimensions of 100x100 and the given customized OpenGL rendering context
static GLDrawable createGLComponent(GLContext context, java.awt.Dimension dim)
          Creates a new GLComponent object with the given dimensions and the pre-created rendering context
static GLDrawable createGLComponent(GLContext context, int width, int height)
          Creates a new GLComponent object with the given dimensions and the pre-created rendering context
static GLDrawable createGLComponent(int width, int height)
          Creates a new GLComponent object with the given dimensions
static GLDrawable createGLOffscreenBuffer()
          Creates a new GLOffscreenBuffer object with the default dimensions of 100x100
static GLDrawable createGLOffscreenBuffer(java.awt.Dimension dim)
          Creates a new GLOffscreenBuffer object with the given dimensions
static GLDrawable createGLOffscreenBuffer(GLContext context)
          Creates a new GLOffscreenBuffer object with the default dimensions of 100x100 and the given customized OpenGL rendering context
static GLDrawable createGLOffscreenBuffer(GLContext context, java.awt.Dimension dim)
          Creates a new GLOffscreenBuffer object with the given dimensions and the pre-created rendering context
static GLDrawable createGLOffscreenBuffer(GLContext context, int width, int height)
          Creates a new GLOffscreenBuffer object with the given dimensions and the pre-created rendering context
static GLDrawable createGLOffscreenBuffer(GLDrawable component)
          Creates a new GLOffscreenBuffer object with the default dimensions of 100x100 and is set to share the display lists and texture objects of the given component.
static GLDrawable createGLOffscreenBuffer(GLDrawable component, java.awt.Dimension dim)
          Creates a new GLOffscreenBuffer object with the given dimensions and the display lists and texture objects of the given component
static GLDrawable createGLOffscreenBuffer(GLDrawable component, GLContext context)
          Creates a new GLOffscreenBuffer object with the default dimensions of 100x100 and the given customized OpenGL rendering context and the given component whose display lists and texture objects will be shared.
static GLDrawable createGLOffscreenBuffer(GLDrawable component, GLContext context, java.awt.Dimension dim)
          Creates a new GLOffscreenBuffer object with the given dimensions and the given customized OpenGL rendering context and the given component whose display lists and texture objects will be shared.
static GLDrawable createGLOffscreenBuffer(GLDrawable component, GLContext context, int width, int height)
          Creates a new GLOffscreenBuffer object with the given dimensions and the display lists and texture objects of the given component not to mention using the pre-created OpenGL rendering context
static GLDrawable createGLOffscreenBuffer(GLDrawable component, int width, int height)
          Creates a new GLOffscreenBuffer object with the given dimensions and sharing the display lists and texture objects of the given component
static GLDrawable createGLOffscreenBuffer(int width, int height)
          Creates a new GLOffscreenBuffer object with the given dimensions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GLDrawableFactory

public GLDrawableFactory()
Method Detail

createGLComponent

public static final GLDrawable createGLComponent()
Creates a new GLComponent object with the default dimensions of 100x100

Returns:
A new GLComponent object

createGLComponent

public static final GLDrawable createGLComponent(GLComponent component)
Creates a new GLComponent object with the default dimensions of 100x100 and is set to share the display lists and texture objects of the given component.

Parameters:
component - Another component whose texture objects and display lists will be shared
Returns:
A new GLComponent object

createGLComponent

public static final GLDrawable createGLComponent(GLContext context)
Creates a new GLComponent object with the default dimensions of 100x100 and the given customized OpenGL rendering context

Parameters:
context - The pre-allocated OpenGL rendering context
Returns:
A new GLComponent object

createGLComponent

public static final GLDrawable createGLComponent(GLComponent component,
                                                 GLContext context)
Creates a new GLComponent object with the default dimensions of 100x100 and the given customized OpenGL rendering context and the given component whose display lists and texture objects will be shared.

Parameters:
component - The component whose texture objects and display lists will be shared
context - The pre-allocated OpenGL rendering context
Returns:
A new GLComponent object

createGLComponent

public static final GLDrawable createGLComponent(GLComponent component,
                                                 GLContext context,
                                                 java.awt.Dimension dim)
Creates a new GLComponent object with the given dimensions and the given customized OpenGL rendering context and the given component whose display lists and texture objects will be shared.

Parameters:
component - The component whose texture objects and display lists will be shared
context - The pre-allocated OpenGL rendering context
dim - The dimensions of the component
Returns:
A new GLComponent object

createGLComponent

public static final GLDrawable createGLComponent(int width,
                                                 int height)
Creates a new GLComponent object with the given dimensions

Parameters:
width - The width of the component
height - The height of the component
Returns:
A new GLComponent object

createGLComponent

public static final GLDrawable createGLComponent(java.awt.Dimension dim)
Creates a new GLComponent object with the given dimensions

Parameters:
dim - The dimensions of the component
Returns:
A new GLComponent object

createGLComponent

public static final GLDrawable createGLComponent(GLContext context,
                                                 java.awt.Dimension dim)
Creates a new GLComponent object with the given dimensions and the pre-created rendering context

Parameters:
context - The pre-created OpenGL rendering context
dim - The dimensions of the component
Returns:
A new GLComponent object

createGLComponent

public static final GLDrawable createGLComponent(GLContext context,
                                                 int width,
                                                 int height)
Creates a new GLComponent object with the given dimensions and the pre-created rendering context

Parameters:
context - The pre-created OpenGL rendering context
width - The width of the component
height - The height of the component
Returns:
A new GLComponent object

createGLComponent

public static final GLDrawable createGLComponent(GLComponent component,
                                                 int width,
                                                 int height)
Creates a new GLComponent object with the given dimensions and sharing the display lists and texture objects of the given component

Parameters:
component - The component whose display lists and texture objects are to be shared
width - The width of the component
height - The height of the component
Returns:
A new GLComponent object

createGLComponent

public static final GLDrawable createGLComponent(GLComponent component,
                                                 java.awt.Dimension dim)
Creates a new GLComponent object with the given dimensions and the display lists and texture objects of the given component

Parameters:
context - The component whose display lists and texture objects are to be shared
dim - The dimensions of the component
Returns:
A new GLComponent object

createGLComponent

public static GLDrawable createGLComponent(GLComponent component,
                                           GLContext context,
                                           int width,
                                           int height)
Creates a new GLComponent object with the given dimensions and the display lists and texture objects of the given component not to mention using the pre-created OpenGL rendering context

Parameters:
component - The component whose display lists and texture objects are to be shared
context - The pre-created OpenGL rendering context
width - The width of the component
height - The height of the component
Returns:
A new GLComponent object

createGLOffscreenBuffer

public static final GLDrawable createGLOffscreenBuffer()
Creates a new GLOffscreenBuffer object with the default dimensions of 100x100

Returns:
A new GLOffscreenBuffer object

createGLOffscreenBuffer

public static final GLDrawable createGLOffscreenBuffer(GLDrawable component)
Creates a new GLOffscreenBuffer object with the default dimensions of 100x100 and is set to share the display lists and texture objects of the given component.

Parameters:
component - Another component whose texture objects and display lists will be shared
Returns:
A new GLOffscreenBuffer object

createGLOffscreenBuffer

public static final GLDrawable createGLOffscreenBuffer(GLContext context)
Creates a new GLOffscreenBuffer object with the default dimensions of 100x100 and the given customized OpenGL rendering context

Parameters:
context - The pre-allocated OpenGL rendering context
Returns:
A new GLOffscreenBuffer object

createGLOffscreenBuffer

public static final GLDrawable createGLOffscreenBuffer(GLDrawable component,
                                                       GLContext context)
Creates a new GLOffscreenBuffer object with the default dimensions of 100x100 and the given customized OpenGL rendering context and the given component whose display lists and texture objects will be shared.

Parameters:
component - The component whose texture objects and display lists will be shared
context - The pre-allocated OpenGL rendering context
Returns:
A new GLOffscreenBuffer object

createGLOffscreenBuffer

public static final GLDrawable createGLOffscreenBuffer(GLDrawable component,
                                                       GLContext context,
                                                       java.awt.Dimension dim)
Creates a new GLOffscreenBuffer object with the given dimensions and the given customized OpenGL rendering context and the given component whose display lists and texture objects will be shared.

Parameters:
component - The component whose texture objects and display lists will be shared
context - The pre-allocated OpenGL rendering context
dim - The dimensions of the component
Returns:
A new GLOffscreenBuffer object

createGLOffscreenBuffer

public static final GLDrawable createGLOffscreenBuffer(int width,
                                                       int height)
Creates a new GLOffscreenBuffer object with the given dimensions

Parameters:
width - The width of the component
height - The height of the component
Returns:
A new GLOffscreenBuffer object

createGLOffscreenBuffer

public static final GLDrawable createGLOffscreenBuffer(java.awt.Dimension dim)
Creates a new GLOffscreenBuffer object with the given dimensions

Parameters:
dim - The dimensions of the component
Returns:
A new GLOffscreenBuffer object

createGLOffscreenBuffer

public static final GLDrawable createGLOffscreenBuffer(GLContext context,
                                                       java.awt.Dimension dim)
Creates a new GLOffscreenBuffer object with the given dimensions and the pre-created rendering context

Parameters:
context - The pre-created OpenGL rendering context
dim - The dimensions of the component
Returns:
A new GLOffscreenBuffer object

createGLOffscreenBuffer

public static final GLDrawable createGLOffscreenBuffer(GLContext context,
                                                       int width,
                                                       int height)
Creates a new GLOffscreenBuffer object with the given dimensions and the pre-created rendering context

Parameters:
context - The pre-created OpenGL rendering context
width - The width of the component
height - The height of the component
Returns:
A new GLOffscreenBuffer object

createGLOffscreenBuffer

public static final GLDrawable createGLOffscreenBuffer(GLDrawable component,
                                                       int width,
                                                       int height)
Creates a new GLOffscreenBuffer object with the given dimensions and sharing the display lists and texture objects of the given component

Parameters:
component - The component whose display lists and texture objects are to be shared
width - The width of the component
height - The height of the component
Returns:
A new GLOffscreenBuffer object

createGLOffscreenBuffer

public static final GLDrawable createGLOffscreenBuffer(GLDrawable component,
                                                       java.awt.Dimension dim)
Creates a new GLOffscreenBuffer object with the given dimensions and the display lists and texture objects of the given component

Parameters:
context - The component whose display lists and texture objects are to be shared
dim - The dimensions of the component
Returns:
A new GLOffscreenBuffer object

createGLOffscreenBuffer

public static GLDrawable createGLOffscreenBuffer(GLDrawable component,
                                                 GLContext context,
                                                 int width,
                                                 int height)
Creates a new GLOffscreenBuffer object with the given dimensions and the display lists and texture objects of the given component not to mention using the pre-created OpenGL rendering context

Parameters:
component - The component whose display lists and texture objects are to be shared
context - The pre-created OpenGL rendering context
width - The width of the component
height - The height of the component
Returns:
A new GLOffscreenBuffer object