本文整理匯總了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;
}