net.minecraft.client.renderer
Class Tessellator

java.lang.Object
  extended by net.minecraft.client.renderer.Tessellator

public class Tessellator
extends Object


Field Summary
 boolean defaultTexture
           
 int drawMode
          The draw mode currently being used by the tessellator.
static Tessellator instance
          The static instance of the Tessellator.
 boolean isDrawing
          Whether this tessellator is currently in draw mode.
static boolean renderingWorldRenderer
           
 int textureID
           
 double xOffset
          An offset to be applied along the x-axis for all vertices in this draw call.
 double yOffset
          An offset to be applied along the y-axis for all vertices in this draw call.
 double zOffset
          An offset to be applied along the z-axis for all vertices in this draw call.
 
Constructor Summary
Tessellator()
           
 
Method Summary
 void addTranslation(float par1, float par2, float par3)
          Offsets the translation for all vertices in the current draw call.
 void addVertex(double par1, double par3, double par5)
          Adds a vertex with the specified x,y,z to the current draw call.
 void addVertexWithUV(double par1, double par3, double par5, double par7, double par9)
          Adds a vertex specifying both x,y,z and the texture u,v for it.
 void disableColor()
          Disables colors for the current draw call.
 int draw()
          Draws the data set up in this tessellator and resets the state to prepare for new drawing.
 void setBrightness(int par1)
           
 void setColorOpaque_F(float par1, float par2, float par3)
          Sets the RGB values as specified, converting from floats between 0 and 1 to integers from 0-255.
 void setColorOpaque_I(int par1)
          Sets the color to the given opaque value (stored as byte values packed in an integer).
 void setColorOpaque(int par1, int par2, int par3)
          Sets the RGB values as specified, and sets alpha to opaque.
 void setColorRGBA_F(float par1, float par2, float par3, float par4)
          Sets the RGBA values for the color, converting from floats between 0 and 1 to integers from 0-255.
 void setColorRGBA_I(int par1, int par2)
          Sets the color to the given color (packed as bytes in integer) and alpha values.
 void setColorRGBA(int par1, int par2, int par3, int par4)
          Sets the RGBA values for the color.
 void setNormal(float par1, float par2, float par3)
          Sets the normal for the current draw call.
 void setTextureUV(double par1, double par3)
          Sets the texture coordinates.
 void setTranslation(double par1, double par3, double par5)
          Sets the translation for all vertices in the current draw call.
 void startDrawing(int par1)
          Resets tessellator state and prepares for drawing (with the specified draw mode).
 void startDrawingQuads()
          Sets draw mode in the tessellator to draw quads.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

renderingWorldRenderer

public static boolean renderingWorldRenderer

defaultTexture

public boolean defaultTexture

textureID

public int textureID

drawMode

public int drawMode
The draw mode currently being used by the tessellator.


xOffset

public double xOffset
An offset to be applied along the x-axis for all vertices in this draw call.


yOffset

public double yOffset
An offset to be applied along the y-axis for all vertices in this draw call.


zOffset

public double zOffset
An offset to be applied along the z-axis for all vertices in this draw call.


instance

public static Tessellator instance
The static instance of the Tessellator.


isDrawing

public boolean isDrawing
Whether this tessellator is currently in draw mode.

Constructor Detail

Tessellator

public Tessellator()
Method Detail

draw

public int draw()
Draws the data set up in this tessellator and resets the state to prepare for new drawing.


startDrawingQuads

public void startDrawingQuads()
Sets draw mode in the tessellator to draw quads.


startDrawing

public void startDrawing(int par1)
Resets tessellator state and prepares for drawing (with the specified draw mode).


setTextureUV

public void setTextureUV(double par1,
                         double par3)
Sets the texture coordinates.


setBrightness

public void setBrightness(int par1)

setColorOpaque_F

public void setColorOpaque_F(float par1,
                             float par2,
                             float par3)
Sets the RGB values as specified, converting from floats between 0 and 1 to integers from 0-255.


setColorRGBA_F

public void setColorRGBA_F(float par1,
                           float par2,
                           float par3,
                           float par4)
Sets the RGBA values for the color, converting from floats between 0 and 1 to integers from 0-255.


setColorOpaque

public void setColorOpaque(int par1,
                           int par2,
                           int par3)
Sets the RGB values as specified, and sets alpha to opaque.


setColorRGBA

public void setColorRGBA(int par1,
                         int par2,
                         int par3,
                         int par4)
Sets the RGBA values for the color. Also clamps them to 0-255.


addVertexWithUV

public void addVertexWithUV(double par1,
                            double par3,
                            double par5,
                            double par7,
                            double par9)
Adds a vertex specifying both x,y,z and the texture u,v for it.


addVertex

public void addVertex(double par1,
                      double par3,
                      double par5)
Adds a vertex with the specified x,y,z to the current draw call. It will trigger a draw() if the buffer gets full.


setColorOpaque_I

public void setColorOpaque_I(int par1)
Sets the color to the given opaque value (stored as byte values packed in an integer).


setColorRGBA_I

public void setColorRGBA_I(int par1,
                           int par2)
Sets the color to the given color (packed as bytes in integer) and alpha values.


disableColor

public void disableColor()
Disables colors for the current draw call.


setNormal

public void setNormal(float par1,
                      float par2,
                      float par3)
Sets the normal for the current draw call.


setTranslation

public void setTranslation(double par1,
                           double par3,
                           double par5)
Sets the translation for all vertices in the current draw call.


addTranslation

public void addTranslation(float par1,
                           float par2,
                           float par3)
Offsets the translation for all vertices in the current draw call.