本文整理汇总了Java中net.minecraft.client.renderer.GlStateManager.clearColor方法的典型用法代码示例。如果您正苦于以下问题:Java GlStateManager.clearColor方法的具体用法?Java GlStateManager.clearColor怎么用?Java GlStateManager.clearColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.GlStateManager
的用法示例。
在下文中一共展示了GlStateManager.clearColor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawBar
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
private void drawBar(int x, int y, float r, float g, float b, int essence, float rotation)
{
GlStateManager.pushMatrix();
GlStateManager.enableBlend();
GlStateManager.disableLighting();
GlStateManager.rotate(rotation, 0, 0, 1);
GlStateManager.color(1, 1, 1);
GlStateManager.clearColor(1, 1, 1, 1);
Minecraft.getMinecraft().getTextureManager()
.bindTexture(background);
GlStateManager.pushMatrix();
GlStateManager.color(1, 1, 1, 1);
drawModalRectWithCustomSizedTexture(x, y, 177, 2, 12, 60, 196, 181);
GlStateManager.popMatrix();
GlStateManager.pushMatrix();
GlStateManager.color(1, 1, 1, 0.2f);
drawModalRectWithCustomSizedTexture(x + 2, y + 6, 179, 63, 8, 48, 196, 181);
drawTexturedModalRect(x + 1, y + 4, 104, 0, 8, 29);
GlStateManager.popMatrix();
GlStateManager.pushMatrix();
GlStateManager.color(r, g, b, 1f);
drawModalRectWithCustomSizedTexture(x + 2, y + 6 + (48 - essence), 179, 63, 8, essence, 196, 181);
GlStateManager.popMatrix();
GlStateManager.popMatrix();
}
示例2: framebufferClear
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void framebufferClear()
{
this.bindFramebuffer(true);
GlStateManager.clearColor(this.framebufferColor[0], this.framebufferColor[1], this.framebufferColor[2], this.framebufferColor[3]);
int i = 16384;
if (this.useDepth)
{
GlStateManager.clearDepth(1.0D);
i |= 256;
}
GlStateManager.clear(i);
this.unbindFramebuffer();
}
示例3: setClearColor
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void setClearColor(float red, float green, float blue, float alpha)
{
GlStateManager.clearColor(red, green, blue, alpha);
clearColorR = red;
clearColorG = green;
clearColorB = blue;
}