net.letskit.redbook.fourth
Class combiner
java.lang.Object
net.letskit.redbook.glskeleton
net.letskit.redbook.fourth.combiner
- All Implemented Interfaces:
- java.awt.event.KeyListener, java.util.EventListener, javax.media.opengl.GLEventListener
public class combiner
- extends glskeleton
- implements javax.media.opengl.GLEventListener, java.awt.event.KeyListener
This program renders a variety of quads showing different effects of texture
combiner functions. The first row renders an untextured polygon (so you can
compare the fragment colors) and then the 2 textures. The second row shows
several different combiner functions on a single texture: replace, modulate,
add, add-signed, and subtract. The third row shows the interpolate combiner
function on a single texture with a constant color/alpha value, varying the
amount of interpolation. The fourth row uses multitexturing with two textures
and different combiner functions. The fifth row are some combiner
experiments: using the scaling factor and reversing the order of subtraction
for a combination function.
- Author:
- Kiet Le (Java port)
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 key)
|
void |
keyReleased(java.awt.event.KeyEvent key)
|
void |
keyTyped(java.awt.event.KeyEvent key)
|
static void |
main(java.lang.String[] args)
|
void |
reshape(javax.media.opengl.GLAutoDrawable drawable,
int x,
int y,
int w,
int h)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
combiner
public combiner()
main
public static void main(java.lang.String[] args)
init
public void init(javax.media.opengl.GLAutoDrawable drawable)
- Specified by:
init
in interface javax.media.opengl.GLEventListener
display
public void display(javax.media.opengl.GLAutoDrawable drawable)
- Specified by:
display
in interface javax.media.opengl.GLEventListener
reshape
public void reshape(javax.media.opengl.GLAutoDrawable drawable,
int x,
int y,
int w,
int h)
- Specified by:
reshape
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
keyTyped
public void keyTyped(java.awt.event.KeyEvent key)
- Specified by:
keyTyped
in interface java.awt.event.KeyListener
keyPressed
public void keyPressed(java.awt.event.KeyEvent key)
- Specified by:
keyPressed
in interface java.awt.event.KeyListener
keyReleased
public void keyReleased(java.awt.event.KeyEvent key)
- Specified by:
keyReleased
in interface java.awt.event.KeyListener