com.partnersoft.gui
Class GLLib

java.lang.Object
  extended by com.partnersoft.gui.GLLib

public class GLLib
extends java.lang.Object

Handy routines to support OpenGL.

Author:
Paul Reavis Copyright 2004 Partner Software, Inc.

Constructor Summary
GLLib()
           
 
Method Summary
static GLFont createFont(java.awt.Font font)
           
static GLFont createFont(java.lang.String fontName, java.lang.String fontStyle, int size)
           
static GLTexture createTexture(java.awt.Image image)
           
static GLTexture createTexture(java.awt.Image image, boolean debug)
           
static byte[] imageToPixels(java.awt.Image image, int imageWidth, int imageHeight)
          Converts a Java Image object into a pixel buffer appropriate to send to JOGL for glDrawPixels etc.
static void setBackgroundColor(net.java.games.jogl.GL gl, java.awt.Color color)
           
static void setColor(net.java.games.jogl.GL gl, java.awt.Color color)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GLLib

public GLLib()
Method Detail

createFont

public static GLFont createFont(java.lang.String fontName,
                                java.lang.String fontStyle,
                                int size)

createFont

public static GLFont createFont(java.awt.Font font)

createTexture

public static GLTexture createTexture(java.awt.Image image)

createTexture

public static GLTexture createTexture(java.awt.Image image,
                                      boolean debug)

imageToPixels

public static byte[] imageToPixels(java.awt.Image image,
                                   int imageWidth,
                                   int imageHeight)
Converts a Java Image object into a pixel buffer appropriate to send to JOGL for glDrawPixels etc.


setColor

public static void setColor(net.java.games.jogl.GL gl,
                            java.awt.Color color)

setBackgroundColor

public static void setBackgroundColor(net.java.games.jogl.GL gl,
                                      java.awt.Color color)