/**
* Utility method for rendering a texture as the front-side overlay
* over a specified horizontal area.
*
* @param texture the texture to use to render the overlay.
* @param u0 the lower end of the vertical area to render at.
* @param u1 the upper end of the vertical area to render at.
*/
public void renderOverlay(final ResourceLocation texture, final float u0, final float u1) {
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
final Tessellator t = Tessellator.getInstance();
final VertexBuffer r = t.getBuffer();
r.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
r.pos(u0, v1, 0).tex(u0, v1).endVertex();
r.pos(u1, v1, 0).tex(u1, v1).endVertex();
r.pos(u1, v0, 0).tex(u1, v0).endVertex();
r.pos(u0, v0, 0).tex(u0, v0).endVertex();
t.draw();
}
RackMountableRenderEvent.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:HeroUtils
作者:
评论列表
文章目录