public interface IRenderer extends IDisposable
IRenderer object given to you in render methods or access IGameInstance.getRenderer()| Modifier and Type | Method and Description |
|---|---|
void |
addEmptyRect(float x,
float y,
float width,
float height,
float lineWidth,
int color)
Draws a colored, unfilled rectangle at the specified x and y
coordinates.
|
void |
addEmptyRect(float x,
float y,
float width,
float height,
int color)
Draws a colored, unfilled rectangle at the specified x and y
coordinates.
|
void |
addFilledRect(float x,
float y,
float width,
float height,
int color)
Draws a colored, filled rectangle at the spcified x and y coordinates.
|
void |
addTexturedRegion(ITexture texture,
float x,
float y,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4,
float srcX,
float srcY,
float srcX2,
float srcY2,
int[] light,
int filter) |
void |
addTriangle(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
int color1,
int color2,
int color3,
float u1,
float v1,
float u2,
float v2,
float u3,
float v3) |
void |
addVertex(float x,
float y,
int color,
float u,
float v) |
void |
backgroundColor(int color) |
void |
begin() |
void |
calcScales() |
IVAO |
createVAO() |
IVBO |
createVBO(boolean isStatic) |
void |
describeItem(IGameInstance game,
IAssetManager manager,
ItemInstance instance)
Renders an item's hover over information on the mouse cursor position.
|
void |
drawHoverInfo(IGameInstance game,
IAssetManager manager,
float x,
float y,
float scale,
boolean firstLineOffset,
boolean canLeaveScreen,
int maxLength,
java.util.List<java.lang.String> text)
Draws a hovering information at the specified position using the
specified text
|
void |
drawHoverInfoAtMouse(IGameInstance game,
IAssetManager manager,
boolean firstLineOffset,
int maxLength,
java.util.List<java.lang.String> text)
Draws a hovering information at the mouse's position using the specified
text
|
void |
drawHoverInfoAtMouse(IGameInstance game,
IAssetManager manager,
boolean firstLineOffset,
int maxLength,
java.lang.String... text)
Draws a hovering information at the mouse's position using the specified
text
|
void |
end() |
void |
flush() |
float |
getDisplayRatio() |
int |
getFlushes() |
float |
getGuiScale() |
float |
getHeightInGui() |
float |
getHeightInWorld() |
double |
getMousedTileX() |
double |
getMousedTileY() |
float |
getMouseInGuiX() |
float |
getMouseInGuiY() |
IShaderProgram |
getProgram() |
float |
getRotation() |
float |
getScaleX() |
float |
getScaleY() |
ITexture |
getTexture() |
float |
getTranslationX() |
float |
getTranslationY() |
float |
getWidthInGui() |
float |
getWidthInWorld() |
float |
getWorldScale() |
boolean |
isChunkBorderDebug() |
boolean |
isDebug() |
boolean |
isGuiDebug() |
boolean |
isItemInfoDebug() |
boolean |
isMirroredHor() |
boolean |
isMirroredVert() |
void |
mirror(boolean hor,
boolean vert) |
void |
renderItemInGui(IGameInstance game,
IAssetManager manager,
ItemInstance slot,
float x,
float y,
float scale,
int color)
Renders an item and its amount.
|
void |
renderSlotInGui(IGameInstance game,
IAssetManager manager,
ItemInstance slot,
float x,
float y,
float scale,
boolean hovered)
Renders a slot.
|
void |
resetTransformation() |
void |
rotate(float angle) |
void |
scale(float x,
float y) |
void |
setMirrored(boolean hor,
boolean vert) |
void |
setProgram(IShaderProgram program) |
void |
setRotation(float angle) |
void |
setScale(float x,
float y) |
void |
setTexture(ITexture texture) |
void |
setTranslation(float x,
float y) |
void |
translate(float x,
float y) |
void |
unbindShaderProgram() |
void |
unbindTexture() |
void |
unbindVAO() |
void |
unbindVBO() |
disposevoid setProgram(IShaderProgram program)
void setTexture(ITexture texture)
void addTexturedRegion(ITexture texture, float x, float y, float x2, float y2, float x3, float y3, float x4, float y4, float srcX, float srcY, float srcX2, float srcY2, int[] light, int filter)
void addTriangle(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
int color1,
int color2,
int color3,
float u1,
float v1,
float u2,
float v2,
float u3,
float v3)
void addVertex(float x,
float y,
int color,
float u,
float v)
void begin()
void end()
void flush()
void rotate(float angle)
void setRotation(float angle)
void translate(float x,
float y)
void setTranslation(float x,
float y)
void scale(float x,
float y)
void setScale(float x,
float y)
void mirror(boolean hor,
boolean vert)
void setMirrored(boolean hor,
boolean vert)
void resetTransformation()
float getRotation()
float getTranslationX()
float getTranslationY()
float getScaleX()
float getScaleY()
boolean isMirroredHor()
boolean isMirroredVert()
IShaderProgram getProgram()
ITexture getTexture()
void renderSlotInGui(IGameInstance game, IAssetManager manager, ItemInstance slot, float x, float y, float scale, boolean hovered)
ItemContainer to create functioning slots.game - The game instancemanager - The asset managerslot - The content of the slot to drawx - The x coordinatey - The y coordinatescale - The scalehovered - If the slot is currently being hovered or not (ie if it
should show the hover info of what is in the slot)void renderItemInGui(IGameInstance game, IAssetManager manager, ItemInstance slot, float x, float y, float scale, int color)
renderSlotInGui(IGameInstance, IAssetManager, ItemInstance, float,
float, float, boolean), only that it doesn't render the box below the
item.game - The game instancemanager - The asset managerslot - The item to drawx - The x coordinatey - The y coordinatescale - The scalecolor - The color to filter the item's renderer withvoid describeItem(IGameInstance game, IAssetManager manager, ItemInstance instance)
isItemInfoDebug() text and
also fires the TooltipEvent.game - The game instancemanager - The asset managerinstance - The item whose information to drawvoid drawHoverInfoAtMouse(IGameInstance game, IAssetManager manager, boolean firstLineOffset, int maxLength, java.lang.String... text)
game - The game instancemanager - The asset managerfirstLineOffset - If the first line should have a bit of a gap below
it making it act as a "headline"maxLength - The maximum length before the tooltip wraps into
the next linetext - The array of lines of text to drawvoid drawHoverInfoAtMouse(IGameInstance game, IAssetManager manager, boolean firstLineOffset, int maxLength, java.util.List<java.lang.String> text)
game - The game instancemanager - The asset managerfirstLineOffset - If the first line should have a bit of a gap below
it making it act as a "headline"maxLength - The maximum length before the tooltip wraps into
the next linetext - The list of lines of text to drawvoid drawHoverInfo(IGameInstance game, IAssetManager manager, float x, float y, float scale, boolean firstLineOffset, boolean canLeaveScreen, int maxLength, java.util.List<java.lang.String> text)
game - The game instancemanager - The asset managerx - The x positiony - The y positionscale - The scale of the tooltipfirstLineOffset - If the first line should have a bit of a gap below
it making it act as a "headline"canLeaveScreen - If the tooltip can leave the screen or should stop
at the bordersmaxLength - The maximum length before the tooltip wraps into
the next linetext - The list of lines of text to drawvoid addEmptyRect(float x,
float y,
float width,
float height,
int color)
x - The x coordinatey - The y coordinatewidth - The widthheight - The heightcolor - The colorvoid addEmptyRect(float x,
float y,
float width,
float height,
float lineWidth,
int color)
x - The x coordinatey - The y coordinatewidth - The widthheight - The heightlineWidth - The width of the outlinescolor - The colorvoid addFilledRect(float x,
float y,
float width,
float height,
int color)
x - The x coordinatey - The y coordinatewidth - The widthheight - The heightcolor - The colorvoid unbindTexture()
void unbindVAO()
void unbindVBO()
void unbindShaderProgram()
IVAO createVAO()
IVBO createVBO(boolean isStatic)
@ApiInternal void calcScales()
float getDisplayRatio()
float getGuiScale()
float getWorldScale()
float getWidthInWorld()
float getHeightInWorld()
float getWidthInGui()
float getHeightInGui()
float getMouseInGuiX()
float getMouseInGuiY()
boolean isDebug()
boolean isItemInfoDebug()
boolean isChunkBorderDebug()
boolean isGuiDebug()
double getMousedTileX()
double getMousedTileY()
int getFlushes()
void backgroundColor(int color)