當前位置: 首頁>>代碼示例>>Java>>正文


Java GlStateManager.clearColor方法代碼示例

本文整理匯總了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();
}
 
開發者ID:raphydaphy,項目名稱:ArcaneMagic,代碼行數:32,代碼來源:GuiAnimusMaterializer.java

示例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();
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:16,代碼來源:Framebuffer.java

示例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;
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:8,代碼來源:Shaders.java


注:本文中的net.minecraft.client.renderer.GlStateManager.clearColor方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。