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


Java GlStateManager.glTexParameteri方法代碼示例

本文整理匯總了Java中net.minecraft.client.renderer.GlStateManager.glTexParameteri方法的典型用法代碼示例。如果您正苦於以下問題:Java GlStateManager.glTexParameteri方法的具體用法?Java GlStateManager.glTexParameteri怎麽用?Java GlStateManager.glTexParameteri使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.client.renderer.GlStateManager的用法示例。


在下文中一共展示了GlStateManager.glTexParameteri方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setBlurMipmapDirect

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public void setBlurMipmapDirect(boolean blurIn, boolean mipmapIn)
{
    this.blur = blurIn;
    this.mipmap = mipmapIn;
    int i;
    int j;

    if (blurIn)
    {
        i = mipmapIn ? 9987 : 9729;
        j = 9729;
    }
    else
    {
        i = mipmapIn ? 9986 : 9728;
        j = 9728;
    }

    GlStateManager.bindTexture(this.getGlTextureId());
    GlStateManager.glTexParameteri(3553, 10241, i);
    GlStateManager.glTexParameteri(3553, 10240, j);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:23,代碼來源:AbstractTexture.java

示例2: setBlurMipmapDirect

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public void setBlurMipmapDirect(boolean blurIn, boolean mipmapIn)
{
    this.blur = blurIn;
    this.mipmap = mipmapIn;
    int i;
    int j;

    if (blurIn)
    {
        i = mipmapIn ? 9987 : 9729;
        j = 9729;
    }
    else
    {
        i = mipmapIn ? 9986 : 9728;
        j = 9728;
    }

    GlStateManager.glTexParameteri(3553, 10241, i);
    GlStateManager.glTexParameteri(3553, 10240, j);
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:22,代碼來源:AbstractTexture.java

示例3: allocateTextureImpl

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public static void allocateTextureImpl(int glTextureId, int mipmapLevels, int width, int height)
{
    synchronized (net.minecraftforge.fml.client.SplashProgress.class)
    {
    deleteTexture(glTextureId);
    bindTexture(glTextureId);
    }
    if (mipmapLevels >= 0)
    {
        GlStateManager.glTexParameteri(3553, 33085, mipmapLevels);
        GlStateManager.glTexParameteri(3553, 33082, 0);
        GlStateManager.glTexParameteri(3553, 33083, mipmapLevels);
        GlStateManager.glTexParameterf(3553, 34049, 0.0F);
    }

    for (int i = 0; i <= mipmapLevels; ++i)
    {
        GlStateManager.glTexImage2D(3553, i, 6408, width >> i, height >> i, 0, 32993, 33639, (IntBuffer)null);
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:21,代碼來源:TextureUtil.java

示例4: setFramebufferFilter

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public void setFramebufferFilter(int framebufferFilterIn)
{
    if (OpenGlHelper.isFramebufferEnabled())
    {
        this.framebufferFilter = framebufferFilterIn;
        GlStateManager.bindTexture(this.framebufferTexture);
        GlStateManager.glTexParameteri(3553, 10241, framebufferFilterIn);
        GlStateManager.glTexParameteri(3553, 10240, framebufferFilterIn);
        GlStateManager.glTexParameteri(3553, 10242, 10496);
        GlStateManager.glTexParameteri(3553, 10243, 10496);
        GlStateManager.bindTexture(0);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:14,代碼來源:Framebuffer.java

示例5: allocateTextureImpl

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public static void allocateTextureImpl(int glTextureId, int mipmapLevels, int width, int height)
{
    Object object = TextureUtil.class;

    if (Reflector.SplashScreen.exists())
    {
        object = Reflector.SplashScreen.getTargetClass();
    }

    synchronized (object)
    {
        deleteTexture(glTextureId);
        bindTexture(glTextureId);
    }

    if (mipmapLevels >= 0)
    {
        GlStateManager.glTexParameteri(3553, 33085, mipmapLevels);
        GlStateManager.glTexParameteri(3553, 33082, 0);
        GlStateManager.glTexParameteri(3553, 33083, mipmapLevels);
        GlStateManager.glTexParameterf(3553, 34049, 0.0F);
    }

    for (int i = 0; i <= mipmapLevels; ++i)
    {
        GlStateManager.glTexImage2D(3553, i, 6408, width >> i, height >> i, 0, 32993, 33639, (IntBuffer)null);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:29,代碼來源:TextureUtil.java

示例6: setTextureClamped

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public static void setTextureClamped(boolean p_110997_0_)
{
    if (p_110997_0_)
    {
        GlStateManager.glTexParameteri(3553, 10242, 33071);
        GlStateManager.glTexParameteri(3553, 10243, 33071);
    }
    else
    {
        GlStateManager.glTexParameteri(3553, 10242, 10497);
        GlStateManager.glTexParameteri(3553, 10243, 10497);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:14,代碼來源:TextureUtil.java

示例7: setTextureBlurMipmap

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public static void setTextureBlurMipmap(boolean p_147954_0_, boolean p_147954_1_)
{
    if (p_147954_0_)
    {
        GlStateManager.glTexParameteri(3553, 10241, p_147954_1_ ? 9987 : 9729);
        GlStateManager.glTexParameteri(3553, 10240, 9729);
    }
    else
    {
        int i = Config.getMipmapType();
        GlStateManager.glTexParameteri(3553, 10241, p_147954_1_ ? i : 9728);
        GlStateManager.glTexParameteri(3553, 10240, 9728);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:15,代碼來源:TextureUtil.java

示例8: setTextureClamped

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
private static void setTextureClamped(boolean p_110997_0_)
{
    if (p_110997_0_)
    {
        GlStateManager.glTexParameteri(3553, 10242, 10496);
        GlStateManager.glTexParameteri(3553, 10243, 10496);
    }
    else
    {
        GlStateManager.glTexParameteri(3553, 10242, 10497);
        GlStateManager.glTexParameteri(3553, 10243, 10497);
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:14,代碼來源:TextureUtil.java

示例9: setTextureBlurMipmap

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
private static void setTextureBlurMipmap(boolean p_147954_0_, boolean p_147954_1_)
{
    if (p_147954_0_)
    {
        GlStateManager.glTexParameteri(3553, 10241, p_147954_1_ ? 9987 : 9729);
        GlStateManager.glTexParameteri(3553, 10240, 9729);
    }
    else
    {
        GlStateManager.glTexParameteri(3553, 10241, p_147954_1_ ? 9986 : 9728);
        GlStateManager.glTexParameteri(3553, 10240, 9728);
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:14,代碼來源:TextureUtil.java

示例10: rotateAndBlurSkybox

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
/**
 * Rotate and blurs the skybox view in the main menu
 */
private void rotateAndBlurSkybox(float partialTicks)
{
    this.mc.getTextureManager().bindTexture(this.backgroundTexture);
    GlStateManager.glTexParameteri(3553, 10241, 9729);
    GlStateManager.glTexParameteri(3553, 10240, 9729);
    GlStateManager.glCopyTexSubImage2D(3553, 0, 0, 0, 0, 0, 256, 256);
    GlStateManager.enableBlend();
    GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
    GlStateManager.colorMask(true, true, true, false);
    Tessellator tessellator = Tessellator.getInstance();
    VertexBuffer vertexbuffer = tessellator.getBuffer();
    vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
    GlStateManager.disableAlpha();
    int i = 3;

    for (int j = 0; j < 3; ++j)
    {
        float f = 1.0F / (float)(j + 1);
        int k = this.width;
        int l = this.height;
        float f1 = (float)(j - 1) / 256.0F;
        vertexbuffer.pos((double)k, (double)l, (double)this.zLevel).tex((double)(0.0F + f1), 1.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
        vertexbuffer.pos((double)k, 0.0D, (double)this.zLevel).tex((double)(1.0F + f1), 1.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
        vertexbuffer.pos(0.0D, 0.0D, (double)this.zLevel).tex((double)(1.0F + f1), 0.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
        vertexbuffer.pos(0.0D, (double)l, (double)this.zLevel).tex((double)(0.0F + f1), 0.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
    }

    tessellator.draw();
    GlStateManager.enableAlpha();
    GlStateManager.colorMask(true, true, true, true);
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:35,代碼來源:GuiMainMenu.java

示例11: rotateAndBlurSkybox

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
/**
 * Rotate and blurs the skybox view in the main menu
 */
private void rotateAndBlurSkybox(float partialTicks) {
	this.mc.getTextureManager().bindTexture(this.backgroundTexture);
	GlStateManager.glTexParameteri(3553, 10241, 9729);
	GlStateManager.glTexParameteri(3553, 10240, 9729);
	GlStateManager.glCopyTexSubImage2D(3553, 0, 0, 0, 0, 0, 256, 256);
	GlStateManager.enableBlend();
	GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA,
			GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE,
			GlStateManager.DestFactor.ZERO);
	GlStateManager.colorMask(true, true, true, false);
	Tessellator tessellator = Tessellator.getInstance();
	VertexBuffer vertexbuffer = tessellator.getBuffer();
	vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
	GlStateManager.disableAlpha();
	int i = 3;
	int j = 3;
	CustomPanoramaProperties custompanoramaproperties = CustomPanorama.getCustomPanoramaProperties();

	if (custompanoramaproperties != null) {
		j = custompanoramaproperties.getBlur2();
	}

	for (int k = 0; k < j; ++k) {
		float f = 1.0F / (float) (k + 1);
		int l = this.width;
		int i1 = this.height;
		float f1 = (float) (k - 1) / 256.0F;
		vertexbuffer.pos((double) l, (double) i1, (double) this.zLevel).tex((double) (0.0F + f1), 1.0D)
				.color(1.0F, 1.0F, 1.0F, f).endVertex();
		vertexbuffer.pos((double) l, 0.0D, (double) this.zLevel).tex((double) (1.0F + f1), 1.0D)
				.color(1.0F, 1.0F, 1.0F, f).endVertex();
		vertexbuffer.pos(0.0D, 0.0D, (double) this.zLevel).tex((double) (1.0F + f1), 0.0D)
				.color(1.0F, 1.0F, 1.0F, f).endVertex();
		vertexbuffer.pos(0.0D, (double) i1, (double) this.zLevel).tex((double) (0.0F + f1), 0.0D)
				.color(1.0F, 1.0F, 1.0F, f).endVertex();
	}

	tessellator.draw();
	GlStateManager.enableAlpha();
	GlStateManager.colorMask(true, true, true, true);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:45,代碼來源:GuiMainMenu.java


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