net.letskit.redbook.fourth
Class mvarray

java.lang.Object
  extended by net.letskit.redbook.glskeleton
      extended by net.letskit.redbook.fourth.mvarray
All Implemented Interfaces:
java.awt.event.KeyListener, java.util.EventListener, javax.media.opengl.GLEventListener

public class mvarray
extends glskeleton
implements javax.media.opengl.GLEventListener, java.awt.event.KeyListener

This program demonstrates multiple vertex arrays, specifically the OpenGL routine glMultiDrawElements(), but it's a bitch to setup--so I use DrawElements in a loop instead.

Author:
Kiet Le (JOGL port)

Constructor Summary
mvarray()
           
 
Method Summary
 void display(javax.media.opengl.GLAutoDrawable drawable)
           
 void displayChanged(javax.media.opengl.GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged)
           
 void init(javax.media.opengl.GLAutoDrawable drawable)
           
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
static void main(java.lang.String[] args)
           
 void reshape(javax.media.opengl.GLAutoDrawable drawable, int x, int y, int width, int height)
           
 
Methods inherited from class net.letskit.redbook.glskeleton
animate, pause, refresh, runExit, setCanvas, setCanvas, setDefaultAnimator, setDefaultListeners
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

mvarray

public mvarray()
Method Detail

display

public void display(javax.media.opengl.GLAutoDrawable drawable)
Specified by:
display in interface javax.media.opengl.GLEventListener

displayChanged

public void displayChanged(javax.media.opengl.GLAutoDrawable drawable,
                           boolean modeChanged,
                           boolean deviceChanged)
Specified by:
displayChanged in interface javax.media.opengl.GLEventListener

init

public void init(javax.media.opengl.GLAutoDrawable drawable)
Specified by:
init in interface javax.media.opengl.GLEventListener

reshape

public void reshape(javax.media.opengl.GLAutoDrawable drawable,
                    int x,
                    int y,
                    int width,
                    int height)
Specified by:
reshape in interface javax.media.opengl.GLEventListener

main

public static void main(java.lang.String[] args)
Parameters:
args -

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener