public abstract class GLInterface extends java.lang.Object implements Interface
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
clipX
Boolean indicating whether to clip in the horizontal direction
|
protected java.util.List<net.minecraft.util.Identifier> |
textures |
| Constructor and Description |
|---|
GLInterface(boolean clipX)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
begin()
Set OpenGL to the state used by the rendering methods.
|
void |
drawImage(java.awt.Rectangle r,
int rotation,
boolean parity,
int image)
Draw an image.
|
void |
drawLine(java.awt.Point a,
java.awt.Point b,
java.awt.Color c1,
java.awt.Color c2)
Draw a line on the screen.
|
void |
drawRect(java.awt.Rectangle r,
java.awt.Color c1,
java.awt.Color c2,
java.awt.Color c3,
java.awt.Color c4)
Draw the outline of an axis-aligned rectangle on the screen.
|
static void |
end()
Restore OpenGL to the state expected by Minecraft.
|
void |
fillRect(java.awt.Rectangle r,
java.awt.Color c1,
java.awt.Color c2,
java.awt.Color c3,
java.awt.Color c4)
Draw an axis-aligned rectangle on the screen.
|
void |
fillTriangle(java.awt.Point pos1,
java.awt.Point pos2,
java.awt.Point pos3,
java.awt.Color c1,
java.awt.Color c2,
java.awt.Color c3)
Draw a triangle on the screen.
|
void |
getMatrices()
Update the matrix buffers.
|
protected abstract java.lang.String |
getResourcePrefix()
Get the Minecraft resource location string.
|
protected abstract float |
getZLevel()
Get the z-coordinate to render everything.
|
int |
loadImage(java.lang.String name)
Load an image into memory and return a number that may be used to draw that image.
|
void |
restore()
Restore the clipping to the previous state.
|
protected void |
scissor(java.awt.Rectangle r)
Utility function to set clipping rectangle by projecting the coordinates using gluProject.
|
void |
window(java.awt.Rectangle r)
Clip all rendering on screen outside the intersection of the specified rectangle and the current clipping rectangle.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdrawString, getButton, getFontHeight, getFontWidth, getMouseprotected boolean clipX
protected java.util.List<net.minecraft.util.Identifier> textures
public GLInterface(boolean clipX)
clipX - whether to clip in the horizontal directionpublic void fillTriangle(java.awt.Point pos1,
java.awt.Point pos2,
java.awt.Point pos3,
java.awt.Color c1,
java.awt.Color c2,
java.awt.Color c3)
InterfacefillTriangle in interface Interfacepos1 - the first corner of the trianglepos2 - the second corner of the trianglepos3 - the third corner of the trianglec1 - the color at the first cornerc2 - the color at the second cornerc3 - the color at the third cornerpublic void drawLine(java.awt.Point a,
java.awt.Point b,
java.awt.Color c1,
java.awt.Color c2)
Interfacepublic void fillRect(java.awt.Rectangle r,
java.awt.Color c1,
java.awt.Color c2,
java.awt.Color c3,
java.awt.Color c4)
InterfacefillRect in interface Interfacer - the rectangle to be renderedc1 - the color at the top-left corner of the rectanglec2 - the color at the top-right corner of the rectanglec3 - the color at the bottom-right corner of the rectanglec4 - the color at the bottom-left corner of the rectanglepublic void drawRect(java.awt.Rectangle r,
java.awt.Color c1,
java.awt.Color c2,
java.awt.Color c3,
java.awt.Color c4)
InterfacedrawRect in interface Interfacer - the rectangle to be renderedc1 - the color at the top-left corner of the rectanglec2 - the color at the top-right corner of the rectanglec3 - the color at the bottom-right corner of the rectanglec4 - the color at the bottom-left corner of the rectanglepublic int loadImage(java.lang.String name)
InterfaceloadImage in interface Interfacename - a string indicating the location of the image to be loadedInterface.drawImage(Rectangle, int, boolean, int)public void drawImage(java.awt.Rectangle r,
int rotation,
boolean parity,
int image)
InterfacedrawImage in interface Interfacer - the rectangle specifying the position of the imagerotation - the rotation of the image in units of 90 degrees counter-clockwiseparity - if true, will switch the top-left and bottom-right, the bottom-left and top-right cornersimage - the number identifying the imageInterface.loadImage(String)protected void scissor(java.awt.Rectangle r)
r - the clipping rectanglepublic void window(java.awt.Rectangle r)
InterfaceInterface.restore() after rendering.window in interface Interfacer - the clipping rectangleInterface.restore()public void restore()
Interfacerestore in interface InterfaceInterface.window(Rectangle)public void getMatrices()
public static void begin()
public static void end()
protected abstract float getZLevel()
protected abstract java.lang.String getResourcePrefix()