本文整理匯總了Java中net.minecraft.client.renderer.Tessellator.func_78382_b方法的典型用法代碼示例。如果您正苦於以下問題:Java Tessellator.func_78382_b方法的具體用法?Java Tessellator.func_78382_b怎麽用?Java Tessellator.func_78382_b使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.client.renderer.Tessellator
的用法示例。
在下文中一共展示了Tessellator.func_78382_b方法的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);
}