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


Java TextureUtil.deleteTexture方法代碼示例

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


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

示例1: execute

import net.minecraft.client.renderer.texture.TextureUtil; //導入方法依賴的package包/類
@Override
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException
{
    TextureManager manager = Minecraft.getMinecraft().renderEngine;
    Map<ResourceLocation, ITextureObject> map = getTextures(manager);

    if (map != null)
    {
        Iterator<Map.Entry<ResourceLocation, ITextureObject>> it = map.entrySet().iterator();

        while (it.hasNext())
        {
            Map.Entry<ResourceLocation, ITextureObject> entry = it.next();

            if (entry.getKey().getResourceDomain().equals("blockbuster.actors") && entry.getValue() instanceof DynamicTexture)
            {
                TextureUtil.deleteTexture(entry.getValue().getGlTextureId());

                it.remove();
            }
        }
    }
}
 
開發者ID:mchorse,項目名稱:blockbuster,代碼行數:24,代碼來源:SubCommandModelClearCache.java

示例2: onClientConnect

import net.minecraft.client.renderer.texture.TextureUtil; //導入方法依賴的package包/類
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onClientConnect(FMLNetworkEvent.ClientConnectedToServerEvent event)
{
    ProjectHelper.projectParts.clear();
    ProjectHelper.projectTextureParts.clear();

    for(ProjectInfo proj : ProjectHelper.projects.values())
    {
        proj.destroy();
    }

    for(Integer id : ProjectHelper.projectTextureIDs.values())
    {
        TextureUtil.deleteTexture(id);
    }

    ProjectHelper.projects.clear();
    ProjectHelper.projectTextures.clear();
    ProjectHelper.projectTextureIDs.clear();
}
 
開發者ID:iChun,項目名稱:Tabula,代碼行數:22,代碼來源:EventHandler.java

示例3: destroy

import net.minecraft.client.renderer.texture.TextureUtil; //導入方法依賴的package包/類
@SideOnly(Side.CLIENT)
public void destroy()
{
    if(model != null && !destroyed)
    {
        destroyed = true;
        for(int i = model.cubes.size() - 1; i >= 0; i--)
        {
            model.removeCubeInfo(model.cubes.get(i));
        }
        model.rotationPoint.destroy();
        model.rotationControls.destroy();
        model.sizeControls.destroy();

        if(bufferedTextureId != -1)
        {
            TextureUtil.deleteTexture(bufferedTextureId);
        }
    }
    if(ghostModel != null)
    {
        ghostModel.destroy();
    }
}
 
開發者ID:iChun,項目名稱:iChunUtil,代碼行數:25,代碼來源:ProjectInfo.java

示例4: deleteFramebuffer

import net.minecraft.client.renderer.texture.TextureUtil; //導入方法依賴的package包/類
public void deleteFramebuffer()
{
    if (OpenGlHelper.isFramebufferEnabled())
    {
        this.unbindFramebufferTexture();
        this.unbindFramebuffer();

        if (this.depthBuffer > -1)
        {
            OpenGlHelper.glDeleteRenderbuffers(this.depthBuffer);
            this.depthBuffer = -1;
        }

        if (this.framebufferTexture > -1)
        {
            TextureUtil.deleteTexture(this.framebufferTexture);
            this.framebufferTexture = -1;
        }

        if (this.framebufferObject > -1)
        {
            OpenGlHelper.glBindFramebuffer(OpenGlHelper.GL_FRAMEBUFFER, 0);
            OpenGlHelper.glDeleteFramebuffers(this.framebufferObject);
            this.framebufferObject = -1;
        }
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:28,代碼來源:Framebuffer.java

示例5: deleteCustomTextures

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

示例6: deleteFramebuffer

import net.minecraft.client.renderer.texture.TextureUtil; //導入方法依賴的package包/類
public void deleteFramebuffer()
{
    if (OpenGlHelper.isFramebufferEnabled())
    {
        this.unbindFramebufferTexture();
        this.unbindFramebuffer();

        if (this.depthBuffer > -1)
        {
            EXTFramebufferObject.glDeleteRenderbuffersEXT(this.depthBuffer);
            this.depthBuffer = -1;
        }

        if (this.framebufferTexture > -1)
        {
            TextureUtil.deleteTexture(this.framebufferTexture);
            this.framebufferTexture = -1;
        }

        if (this.framebufferObject > -1)
        {
            EXTFramebufferObject.glBindFramebufferEXT(36160, 0);
            EXTFramebufferObject.glDeleteFramebuffersEXT(this.framebufferObject);
            this.framebufferObject = -1;
        }
    }
}
 
開發者ID:MinecraftModdedClients,項目名稱:Resilience-Client-Source,代碼行數:28,代碼來源:Framebuffer.java

示例7: deleteFramebuffer

import net.minecraft.client.renderer.texture.TextureUtil; //導入方法依賴的package包/類
public void deleteFramebuffer()
{
    if (OpenGlHelper.isFramebufferEnabled())
    {
        this.unbindFramebufferTexture();
        this.unbindFramebuffer();

        if (this.depthBuffer > -1)
        {
            OpenGlHelper.func_153184_g(this.depthBuffer);
            this.depthBuffer = -1;
        }

        if (this.framebufferTexture > -1)
        {
            TextureUtil.deleteTexture(this.framebufferTexture);
            this.framebufferTexture = -1;
        }

        if (this.framebufferObject > -1)
        {
            OpenGlHelper.func_153171_g(OpenGlHelper.field_153198_e, 0);
            OpenGlHelper.func_153174_h(this.framebufferObject);
            this.framebufferObject = -1;
        }
    }
}
 
開發者ID:xtrafrancyz,項目名稱:Cauldron,代碼行數:28,代碼來源:Framebuffer.java

示例8: shutdown

import net.minecraft.client.renderer.texture.TextureUtil; //導入方法依賴的package包/類
@Override
public void shutdown()
{
    if(imageId != -1)
    {
        TextureUtil.deleteTexture(imageId);
    }
}
 
開發者ID:iChun,項目名稱:Tabula,代碼行數:9,代碼來源:WindowTexture.java


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