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


Java GlStateManager.bindTexture方法代碼示例

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


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

示例1: updateTextureMinMagFilter

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
static void updateTextureMinMagFilter()
{
    TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
    ITextureObject itextureobject = texturemanager.getTexture(TextureMap.locationBlocksTexture);

    if (itextureobject != null)
    {
        MultiTexID multitexid = itextureobject.getMultiTexID();
        GlStateManager.bindTexture(multitexid.base);
        GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, Shaders.texMinFilValue[Shaders.configTexMinFilB]);
        GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, Shaders.texMagFilValue[Shaders.configTexMagFilB]);
        GlStateManager.bindTexture(multitexid.norm);
        GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, Shaders.texMinFilValue[Shaders.configTexMinFilN]);
        GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, Shaders.texMagFilValue[Shaders.configTexMagFilN]);
        GlStateManager.bindTexture(multitexid.spec);
        GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, Shaders.texMinFilValue[Shaders.configTexMinFilS]);
        GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, Shaders.texMagFilValue[Shaders.configTexMagFilS]);
        GlStateManager.bindTexture(0);
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:21,代碼來源:ShadersTex.java

示例2: setBlurMipmapDirect

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public void setBlurMipmapDirect(boolean p_174937_1_, boolean p_174937_2_)
{
    this.blur = p_174937_1_;
    this.mipmap = p_174937_2_;
    boolean flag = true;
    boolean flag1 = true;
    int i;
    short short1;

    if (p_174937_1_)
    {
        i = p_174937_2_ ? 9987 : 9729;
        short1 = 9729;
    }
    else
    {
        i = p_174937_2_ ? 9986 : 9728;
        short1 = 9728;
    }

    GlStateManager.bindTexture(this.getGlTextureId());
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, i);
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, short1);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:25,代碼來源:AbstractTexture.java

示例3: endShader

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public void endShader()
{
    OpenGlHelper.glUseProgram(0);
    currentProgram = -1;
    staticShaderManager = null;
    field_148000_e = true;

    for (int i = 0; i < this.shaderSamplerLocations.size(); ++i)
    {
        if (this.shaderSamplers.get(this.samplerNames.get(i)) != null)
        {
            GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit + i);
            GlStateManager.bindTexture(0);
        }
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:17,代碼來源:ShaderManager.java

示例4: initDynamicTexture

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public static void initDynamicTexture(int texID, int width, int height, DynamicTexture tex)
{
    MultiTexID multitexid = tex.getMultiTexID();
    int[] aint = tex.getTextureData();
    int i = width * height;
    Arrays.fill(aint, i, i * 2, -8421377);
    Arrays.fill((int[])aint, i * 2, i * 3, (int)0);
    TextureUtil.allocateTexture(multitexid.base, width, height);
    TextureUtil.setTextureBlurMipmap(false, false);
    TextureUtil.setTextureClamped(false);
    TextureUtil.allocateTexture(multitexid.norm, width, height);
    TextureUtil.setTextureBlurMipmap(false, false);
    TextureUtil.setTextureClamped(false);
    TextureUtil.allocateTexture(multitexid.spec, width, height);
    TextureUtil.setTextureBlurMipmap(false, false);
    TextureUtil.setTextureClamped(false);
    GlStateManager.bindTexture(multitexid.base);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:19,代碼來源:ShadersTex.java

示例5: uploadTexSubForLoadAtlas

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public static void uploadTexSubForLoadAtlas(int[][] data, int width, int height, int xoffset, int yoffset, boolean linear, boolean clamp)
{
    TextureUtil.uploadTextureMipmap(data, width, height, xoffset, yoffset, linear, clamp);
    boolean flag = false;

    if (Shaders.configNormalMap)
    {
        int[][] aint = readImageAndMipmaps(iconName + "_n", width, height, data.length, flag, -8421377);
        GlStateManager.bindTexture(updatingTex.norm);
        TextureUtil.uploadTextureMipmap(aint, width, height, xoffset, yoffset, linear, clamp);
    }

    if (Shaders.configSpecularMap)
    {
        int[][] aint1 = readImageAndMipmaps(iconName + "_s", width, height, data.length, flag, 0);
        GlStateManager.bindTexture(updatingTex.spec);
        TextureUtil.uploadTextureMipmap(aint1, width, height, xoffset, yoffset, linear, clamp);
    }

    GlStateManager.bindTexture(updatingTex.base);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:22,代碼來源:ShadersTex.java

示例6: uploadTexSub

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public static void uploadTexSub(int[][] data, int width, int height, int xoffset, int yoffset, boolean linear, boolean clamp)
{
    TextureUtil.uploadTextureMipmap(data, width, height, xoffset, yoffset, linear, clamp);

    if (Shaders.configNormalMap || Shaders.configSpecularMap)
    {
        if (Shaders.configNormalMap)
        {
            GlStateManager.bindTexture(updatingTex.norm);
            uploadTexSub1(data, width, height, xoffset, yoffset, 1);
        }

        if (Shaders.configSpecularMap)
        {
            GlStateManager.bindTexture(updatingTex.spec);
            uploadTexSub1(data, width, height, xoffset, yoffset, 2);
        }

        GlStateManager.bindTexture(updatingTex.base);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:22,代碼來源:ShadersTex.java

示例7: createFramebuffer

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public void createFramebuffer(int width, int height)
{
    this.framebufferWidth = width;
    this.framebufferHeight = height;
    this.framebufferTextureWidth = width;
    this.framebufferTextureHeight = height;

    if (!OpenGlHelper.isFramebufferEnabled())
    {
        this.framebufferClear();
    }
    else
    {
        this.framebufferObject = OpenGlHelper.glGenFramebuffers();
        this.framebufferTexture = TextureUtil.glGenTextures();

        if (this.useDepth)
        {
            this.depthBuffer = OpenGlHelper.glGenRenderbuffers();
        }

        this.setFramebufferFilter(9728);
        GlStateManager.bindTexture(this.framebufferTexture);
        GlStateManager.glTexImage2D(3553, 0, 32856, this.framebufferTextureWidth, this.framebufferTextureHeight, 0, 6408, 5121, (IntBuffer)null);
        OpenGlHelper.glBindFramebuffer(OpenGlHelper.GL_FRAMEBUFFER, this.framebufferObject);
        OpenGlHelper.glFramebufferTexture2D(OpenGlHelper.GL_FRAMEBUFFER, OpenGlHelper.GL_COLOR_ATTACHMENT0, 3553, this.framebufferTexture, 0);

        if (this.useDepth)
        {
            OpenGlHelper.glBindRenderbuffer(OpenGlHelper.GL_RENDERBUFFER, this.depthBuffer);
            OpenGlHelper.glRenderbufferStorage(OpenGlHelper.GL_RENDERBUFFER, 33190, this.framebufferTextureWidth, this.framebufferTextureHeight);
            OpenGlHelper.glFramebufferRenderbuffer(OpenGlHelper.GL_FRAMEBUFFER, OpenGlHelper.GL_DEPTH_ATTACHMENT, OpenGlHelper.GL_RENDERBUFFER, this.depthBuffer);
        }

        this.framebufferClear();
        this.unbindFramebufferTexture();
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:39,代碼來源:Framebuffer.java

示例8: unsetBrightness

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
protected void unsetBrightness()
{
    GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
    GlStateManager.enableTexture2D();
    GlStateManager.glTexEnvi(8960, 8704, OpenGlHelper.GL_COMBINE);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_COMBINE_RGB, 8448);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE0_RGB, OpenGlHelper.defaultTexUnit);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE1_RGB, OpenGlHelper.GL_PRIMARY_COLOR);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND0_RGB, 768);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND1_RGB, 768);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_COMBINE_ALPHA, 8448);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE0_ALPHA, OpenGlHelper.defaultTexUnit);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE1_ALPHA, OpenGlHelper.GL_PRIMARY_COLOR);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND0_ALPHA, 770);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND1_ALPHA, 770);
    GlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit);
    GlStateManager.glTexEnvi(8960, 8704, OpenGlHelper.GL_COMBINE);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_COMBINE_RGB, 8448);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND0_RGB, 768);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND1_RGB, 768);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE0_RGB, 5890);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE1_RGB, OpenGlHelper.GL_PREVIOUS);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_COMBINE_ALPHA, 8448);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND0_ALPHA, 770);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE0_ALPHA, 5890);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    GlStateManager.setActiveTexture(OpenGlHelper.GL_TEXTURE2);
    GlStateManager.disableTexture2D();
    GlStateManager.bindTexture(0);
    GlStateManager.glTexEnvi(8960, 8704, OpenGlHelper.GL_COMBINE);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_COMBINE_RGB, 8448);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND0_RGB, 768);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND1_RGB, 768);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE0_RGB, 5890);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE1_RGB, OpenGlHelper.GL_PREVIOUS);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_COMBINE_ALPHA, 8448);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND0_ALPHA, 770);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE0_ALPHA, 5890);
    GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:41,代碼來源:RenderLivingBase.java

示例9: bindFramebufferTexture

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public void bindFramebufferTexture()
{
    if (OpenGlHelper.isFramebufferEnabled())
    {
        GlStateManager.bindTexture(this.framebufferTexture);
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:8,代碼來源:Framebuffer.java

示例10: unsetBrightness

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
protected void unsetBrightness()
{
    GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
    GlStateManager.enableTexture2D();
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, GL11.GL_TEXTURE_ENV_MODE, OpenGlHelper.GL_COMBINE);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_COMBINE_RGB, GL11.GL_MODULATE);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_SOURCE0_RGB, OpenGlHelper.defaultTexUnit);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_SOURCE1_RGB, OpenGlHelper.GL_PRIMARY_COLOR);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_OPERAND0_RGB, GL11.GL_SRC_COLOR);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_OPERAND1_RGB, GL11.GL_SRC_COLOR);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_COMBINE_ALPHA, GL11.GL_MODULATE);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_SOURCE0_ALPHA, OpenGlHelper.defaultTexUnit);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_SOURCE1_ALPHA, OpenGlHelper.GL_PRIMARY_COLOR);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_OPERAND0_ALPHA, GL11.GL_SRC_ALPHA);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_OPERAND1_ALPHA, GL11.GL_SRC_ALPHA);
    GlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, GL11.GL_TEXTURE_ENV_MODE, OpenGlHelper.GL_COMBINE);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_COMBINE_RGB, GL11.GL_MODULATE);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_OPERAND0_RGB, GL11.GL_SRC_COLOR);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_OPERAND1_RGB, GL11.GL_SRC_COLOR);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_SOURCE0_RGB, GL11.GL_TEXTURE);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_SOURCE1_RGB, OpenGlHelper.GL_PREVIOUS);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_COMBINE_ALPHA, GL11.GL_MODULATE);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_OPERAND0_ALPHA, GL11.GL_SRC_ALPHA);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_SOURCE0_ALPHA, GL11.GL_TEXTURE);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    GlStateManager.setActiveTexture(OpenGlHelper.GL_TEXTURE2);
    GlStateManager.disableTexture2D();
    GlStateManager.bindTexture(0);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, GL11.GL_TEXTURE_ENV_MODE, OpenGlHelper.GL_COMBINE);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_COMBINE_RGB, GL11.GL_MODULATE);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_OPERAND0_RGB, GL11.GL_SRC_COLOR);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_OPERAND1_RGB, GL11.GL_SRC_COLOR);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_SOURCE0_RGB, GL11.GL_TEXTURE);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_SOURCE1_RGB, OpenGlHelper.GL_PREVIOUS);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_COMBINE_ALPHA, GL11.GL_MODULATE);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_OPERAND0_ALPHA, GL11.GL_SRC_ALPHA);
    GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, OpenGlHelper.GL_SOURCE0_ALPHA, GL11.GL_TEXTURE);
    GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:41,代碼來源:RendererLivingEntity.java

示例11: bindCustomTextures

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
private static void bindCustomTextures(CustomTexture[] cts)
{
    if (cts != null)
    {
        for (int i = 0; i < cts.length; ++i)
        {
            CustomTexture customtexture = cts[i];
            GlStateManager.setActiveTexture(33984 + customtexture.getTextureUnit());
            ITextureObject itextureobject = customtexture.getTexture();
            GlStateManager.bindTexture(itextureobject.getGlTextureId());
        }
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:14,代碼來源:Shaders.java

示例12: HFNoiseTexture

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public HFNoiseTexture(int width, int height)
{
    byte[] abyte = this.genHFNoiseImage(width, height);
    ByteBuffer bytebuffer = BufferUtils.createByteBuffer(abyte.length);
    bytebuffer.put(abyte);
    bytebuffer.flip();
    GlStateManager.bindTexture(this.texID);
    GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGB, width, height, 0, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, (ByteBuffer)bytebuffer);
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL11.GL_REPEAT);
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_REPEAT);
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
    GlStateManager.bindTexture(0);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:15,代碼來源:HFNoiseTexture.java

示例13: readImageAndMipmaps

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public static int[][] readImageAndMipmaps(String name, int width, int height, int numLevels, boolean border, int defColor)
{
    int[][] aint = new int[numLevels][];
    int[] aint1;
    aint[0] = aint1 = new int[width * height];
    boolean flag = false;
    BufferedImage bufferedimage = readImage(updatingTextureMap.completeResourceLocation(new ResourceLocation(name)));

    if (bufferedimage != null)
    {
        int i = bufferedimage.getWidth();
        int j = bufferedimage.getHeight();

        if (i + (border ? 16 : 0) == width)
        {
            flag = true;
            bufferedimage.getRGB(0, 0, i, i, aint1, 0, i);
        }
    }

    if (!flag)
    {
        Arrays.fill(aint1, defColor);
    }

    GlStateManager.bindTexture(updatingTex.spec);
    aint = genMipmapsSimple(aint.length - 1, width, aint);
    return aint;
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:30,代碼來源:ShadersTex.java

示例14: updateDynamicTexture

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public static void updateDynamicTexture(int texID, int[] src, int width, int height, DynamicTexture tex)
{
    MultiTexID multitexid = tex.getMultiTexID();
    GlStateManager.bindTexture(multitexid.base);
    updateDynTexSubImage1(src, width, height, 0, 0, 0);
    GlStateManager.bindTexture(multitexid.norm);
    updateDynTexSubImage1(src, width, height, 0, 0, 1);
    GlStateManager.bindTexture(multitexid.spec);
    updateDynTexSubImage1(src, width, height, 0, 0, 2);
    GlStateManager.bindTexture(multitexid.base);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:12,代碼來源:ShadersTex.java

示例15: preLoadShader

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
private void preLoadShader()
{
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    GlStateManager.disableBlend();
    GlStateManager.disableDepth();
    GlStateManager.disableAlpha();
    GlStateManager.disableFog();
    GlStateManager.disableLighting();
    GlStateManager.disableColorMaterial();
    GlStateManager.enableTexture2D();
    GlStateManager.bindTexture(0);
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:13,代碼來源:Shader.java


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