com.threerings.opengl.renderer
Class TextureUnit

java.lang.Object
  extended by com.threerings.opengl.renderer.TextureUnit

public class TextureUnit
extends Object

Represents the state of a single texture unit.


Field Summary
 int alphaCombine
          The alpha combine mode.
 int alphaOperand0
          The first alpha combine operand.
 int alphaOperand1
          The second alpha combine operand.
 int alphaOperand2
          The third alpha combine operand.
 float alphaScale
          The alpha combine scale.
 int alphaSource0
          The first alpha combine source.
 int alphaSource1
          The second alpha combine source.
 int alphaSource2
          The third alpha combine source.
 boolean dirty
          Set when the state has changed and must be reapplied.
 Color4f envColor
          The texture environment color.
 int envMode
          The texture environment mode.
 int genModeQ
          The q texture coordinate generation mode (-1 for disabled).
 int genModeR
          The r texture coordinate generation mode (-1 for disabled).
 int genModeS
          The s texture coordinate generation mode (-1 for disabled).
 int genModeT
          The t texture coordinate generation mode (-1 for disabled).
 Vector4f genPlaneQ
          The q texture coordinate generation plane.
 Vector4f genPlaneR
          The r texture coordinate generation plane.
 Vector4f genPlaneS
          The s texture coordinate generation plane.
 Vector4f genPlaneT
          The t texture coordinate generation plane.
 float lodBias
          The texture level of detail bias.
 int rgbCombine
          The RGB combine mode.
 int rgbOperand0
          The first RGB combine operand.
 int rgbOperand1
          The second RGB combine operand.
 int rgbOperand2
          The third RGB combine operand.
 float rgbScale
          The RGB combine scale.
 int rgbSource0
          The first RGB combine source.
 int rgbSource1
          The second RGB combine source.
 int rgbSource2
          The third RGB combine source.
 Texture texture
          The texture bound to this unit.
 Transform3D transform
          The texture transform.
 
Constructor Summary
TextureUnit()
          Creates an empty texture unit.
TextureUnit(Texture texture)
          Creates a simple texture unit.
 
Method Summary
 boolean allGenModesEqual(int mode)
          Checks whether all of the unit's gen modes equal the supplied mode.
 boolean anyGenModesEqual(int mode)
          Checks whether any of the unit's gen modes equal the supplied mode.
 void setTexture(Texture texture)
          Sets the texture and the dirty flag.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

texture

public Texture texture
The texture bound to this unit.


envMode

public int envMode
The texture environment mode.


envColor

public Color4f envColor
The texture environment color.


rgbCombine

public int rgbCombine
The RGB combine mode.


alphaCombine

public int alphaCombine
The alpha combine mode.


rgbSource0

public int rgbSource0
The first RGB combine source.


rgbSource1

public int rgbSource1
The second RGB combine source.


rgbSource2

public int rgbSource2
The third RGB combine source.


alphaSource0

public int alphaSource0
The first alpha combine source.


alphaSource1

public int alphaSource1
The second alpha combine source.


alphaSource2

public int alphaSource2
The third alpha combine source.


rgbOperand0

public int rgbOperand0
The first RGB combine operand.


rgbOperand1

public int rgbOperand1
The second RGB combine operand.


rgbOperand2

public int rgbOperand2
The third RGB combine operand.


alphaOperand0

public int alphaOperand0
The first alpha combine operand.


alphaOperand1

public int alphaOperand1
The second alpha combine operand.


alphaOperand2

public int alphaOperand2
The third alpha combine operand.


rgbScale

public float rgbScale
The RGB combine scale.


alphaScale

public float alphaScale
The alpha combine scale.


lodBias

public float lodBias
The texture level of detail bias.


genModeS

public int genModeS
The s texture coordinate generation mode (-1 for disabled).


genPlaneS

public Vector4f genPlaneS
The s texture coordinate generation plane.


genModeT

public int genModeT
The t texture coordinate generation mode (-1 for disabled).


genPlaneT

public Vector4f genPlaneT
The t texture coordinate generation plane.


genModeR

public int genModeR
The r texture coordinate generation mode (-1 for disabled).


genPlaneR

public Vector4f genPlaneR
The r texture coordinate generation plane.


genModeQ

public int genModeQ
The q texture coordinate generation mode (-1 for disabled).


genPlaneQ

public Vector4f genPlaneQ
The q texture coordinate generation plane.


transform

public Transform3D transform
The texture transform.


dirty

public boolean dirty
Set when the state has changed and must be reapplied.

Constructor Detail

TextureUnit

public TextureUnit(Texture texture)
Creates a simple texture unit.


TextureUnit

public TextureUnit()
Creates an empty texture unit.

Method Detail

setTexture

public void setTexture(Texture texture)
Sets the texture and the dirty flag.


allGenModesEqual

public boolean allGenModesEqual(int mode)
Checks whether all of the unit's gen modes equal the supplied mode.


anyGenModesEqual

public boolean anyGenModesEqual(int mode)
Checks whether any of the unit's gen modes equal the supplied mode.



Copyright © 2011. All Rights Reserved.