本文整理汇总了Java中net.minecraft.client.renderer.VertexBuffer.pos方法的典型用法代码示例。如果您正苦于以下问题:Java VertexBuffer.pos方法的具体用法?Java VertexBuffer.pos怎么用?Java VertexBuffer.pos使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.VertexBuffer
的用法示例。
在下文中一共展示了VertexBuffer.pos方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawTexturedModalRectZ
import net.minecraft.client.renderer.VertexBuffer; //导入方法依赖的package包/类
public void drawTexturedModalRectZ(final float i, final float y, final int k, final int i1, final int j1, final int k1, final float zLevel) {
float f = 0.015625F;
float f1 = 0.03125F;
Tessellator tesselator = Tessellator.getInstance();
VertexBuffer vertexbuffer = tesselator.getBuffer();
vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX);
/*
tesselator.getWorldRenderer().addVertexWithUV(i + 0, y + k1, zLevel, (k + 0) * f, (i1 + k1) * f1);
tesselator.getWorldRenderer().addVertexWithUV(i + j1, y + k1, zLevel, (k + j1) * f, (i1 + k1) * f1);
tesselator.getWorldRenderer().addVertexWithUV(i + j1, y + 0, zLevel, (k + j1) * f, (i1 + 0) * f1);
tesselator.getWorldRenderer().addVertexWithUV(i + 0, y + 0, zLevel, (k + 0) * f, (i1 + 0) * f1);
*/
vertexbuffer.pos(i + 0, y + k1, zLevel);
vertexbuffer.pos(i + j1, y + k1, zLevel);
vertexbuffer.pos(i + j1, y + 0, zLevel);
vertexbuffer.pos(i + 0, y + 0, zLevel);
tesselator.draw();
}
示例2: vector
import net.minecraft.client.renderer.VertexBuffer; //导入方法依赖的package包/类
private void vector(VertexBuffer vb, double x, double y, double z, double u, double v, double oU, double oV) {
vb.pos(x, y, z);
vb.tex(u + oU, v + oV);
vb.color(255, 255, 255, 255);
vb.endVertex();
}