本文整理汇总了Java中net.minecraft.client.renderer.Tessellator.func_78377_a方法的典型用法代码示例。如果您正苦于以下问题:Java Tessellator.func_78377_a方法的具体用法?Java Tessellator.func_78377_a怎么用?Java Tessellator.func_78377_a使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.Tessellator
的用法示例。
在下文中一共展示了Tessellator.func_78377_a方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawRect
import net.minecraft.client.renderer.Tessellator; //导入方法依赖的package包/类
/**
* This class is NOT mine! Credit to an anonymous friend.
*/
public static void drawRect(float x, float y, float x1, float x2, int color) {
Tessellator tessellator = Tessellator.field_78398_a;
GL11.glEnable(3042);
GL11.glDisable(3553);
OpenGlHelper.func_148821_a(770, 771, 1, 0);
RenderUtil.glColor(color);
tessellator.func_78382_b();
tessellator.func_78377_a((double) x, (double) x2, 0.0);
tessellator.func_78377_a((double) x1, (double) x2, 0.0);
tessellator.func_78377_a((double) x1, (double) y, 0.0);
tessellator.func_78377_a((double) x, (double) y, 0.0);
tessellator.func_78381_a();
GL11.glEnable(3553);
RenderUtil.glColor(-1);
GL11.glDisable(3042);
}
示例2: drawGradientRect
import net.minecraft.client.renderer.Tessellator; //导入方法依赖的package包/类
public static void drawGradientRect(float x, float y, float x1, float x2, int col1, int col2) {
int[] color = {col1, col1, col2, col2};
float[] r = new float[color.length];
float[] g = new float[color.length];
float[] b = new float[color.length];
float[] a = new float[color.length];
for (int i = 0; i < color.length; i++) {
r[i] = ((color[i] >> 16 & 0xFF) / 255.0F);
g[i] = ((color[i] >> 8 & 0xFF) / 255.0F);
b[i] = ((color[i] & 0xFF) / 255.0F);
a[i] = ((color[i] >> 24 & 0xFF) / 255.0F);
}
GL11.glDisable(3553);
GL11.glEnable(3042);
GL11.glDisable(3008);
OpenGlHelper.func_148821_a(770, 771, 1, 0);
GL11.glBlendFunc(770, 771);
GL11.glShadeModel(7425);
Tessellator t = Tessellator.field_78398_a;
t.func_78382_b();
t.func_78369_a(r[0], g[0], b[0], a[0]);
t.func_78377_a(x1, y, 0.0D);
t.func_78369_a(r[1], g[1], b[1], a[1]);
t.func_78377_a(x, y, 0.0D);
t.func_78369_a(r[2], g[2], b[2], a[2]);
t.func_78377_a(x, x2, 0.0D);
t.func_78369_a(r[3], g[3], b[3], a[3]);
t.func_78377_a(x1, x2, 0.0D);
t.func_78381_a();
GL11.glShadeModel(7424);
GL11.glDisable(3042);
GL11.glEnable(3008);
GL11.glEnable(3553);
}