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


Java GLAllocation.deleteDisplayLists方法代碼示例

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


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

示例1: render

import net.minecraft.client.renderer.GLAllocation; //導入方法依賴的package包/類
public void render(float partialTicks) {
	
	boolean ineff = false;
	
	if(ineff){
		updateSimpleRender(partialTicks);
		return;
	}
	
    if (needsUpdate) {
    	if (glRenderList >= 0) {
            GLAllocation.deleteDisplayLists(glRenderList);
            glRenderList = -1;
        }
		glRenderList = GLAllocation.generateDisplayLists(1);
        GL11.glNewList(glRenderList, GL11.GL_COMPILE);
        updateSimpleRender(partialTicks);
        GL11.glEndList();
        needsUpdate = false;
    }
    if(this.glRenderList >=0){
    	GlStateManager.callList(glRenderList);
    }
}
 
開發者ID:Alec-WAM,項目名稱:CrystalMod,代碼行數:25,代碼來源:ChunkRenderer.java

示例2: markRemoved

import net.minecraft.client.renderer.GLAllocation; //導入方法依賴的package包/類
public void markRemoved()
{
	isRemoved = true;
	
	try
	{
		if (glRenderList != 0)
		{
			ArchimedesShipMod.modLog.debug("Deleting mobile chunk display list " + glRenderList);
			GLAllocation.deleteDisplayLists(glRenderList);
			glRenderList = 0;
		}
	} catch (Exception e)
	{
		ArchimedesShipMod.modLog.error("Failed to destroy mobile chunk display list", e);
	}
}
 
開發者ID:Ckathode,項目名稱:archimedes-ships,代碼行數:18,代碼來源:MobileChunkRenderer.java

示例3: destroy

import net.minecraft.client.renderer.GLAllocation; //導入方法依賴的package包/類
public void destroy()
{
    if(shape1.compiled)
    {
        GLAllocation.deleteDisplayLists(shape1.displayList);
    }
    if(shape2.compiled)
    {
        GLAllocation.deleteDisplayLists(shape2.displayList);
    }
    if(shape2_1.compiled)
    {
        GLAllocation.deleteDisplayLists(shape2_1.displayList);
    }
    if(shape2_2.compiled)
    {
        GLAllocation.deleteDisplayLists(shape2_2.displayList);
    }
    if(shape2_3.compiled)
    {
        GLAllocation.deleteDisplayLists(shape2_3.displayList);
    }
}
 
開發者ID:iChun,項目名稱:iChunUtil,代碼行數:24,代碼來源:ModelSizeControls.java

示例4: freeGlList

import net.minecraft.client.renderer.GLAllocation; //導入方法依賴的package包/類
private void freeGlList(ModelRenderer renderer)
{
    try
    {
        fld_displayList.setAccessible(true);
        GLAllocation.deleteDisplayLists(fld_displayList.getInt(renderer));
    }
    catch (Exception ex)
    {
        ExPMisc.modLogger.log(LogLevel.Debug, "Could not free GL mem of list for %s at %s!", ex, renderer.toString(), this.toString());
    }
}
 
開發者ID:V0idWa1k3r,項目名稱:ExPetrum,代碼行數:13,代碼來源:EntityModelDynamic.java

示例5: markRemoved

import net.minecraft.client.renderer.GLAllocation; //導入方法依賴的package包/類
public void markRemoved() {
    isRemoved = true;

    try {
        if (glRenderList != 0) {
            //System.out.println("Deleting mobile chunk display list " + glRenderList);
            GLAllocation.deleteDisplayLists(glRenderList);
            glRenderList = 0;
        }
    } catch (Exception e) {
    	System.out.println("Failed to destroy mobile chunk display list");
    	e.printStackTrace();
    }
}
 
開發者ID:Alec-WAM,項目名稱:CrystalMod,代碼行數:15,代碼來源:ChunkRenderer.java

示例6: initGui

import net.minecraft.client.renderer.GLAllocation; //導入方法依賴的package包/類
@Override
public void initGui() {
    super.initGui();
    this.updateButtons = true;
    if (this.earthCompiled) {
        GLAllocation.deleteDisplayLists(this.earthList);
    }
    this.earthCompiled = false;
}
 
開發者ID:gegy1000,項目名稱:Earth,代碼行數:10,代碼來源:EarthMainMenuGUI.java

示例7: discardList

import net.minecraft.client.renderer.GLAllocation; //導入方法依賴的package包/類
void discardList() {
    for (EntityHack hack : hacks) {
        if (hack.displayList != -1) {
            GLAllocation.deleteDisplayLists(hack.displayList);
            hack.displayList = -1;
        }
        hack.setDead();
    }
    hacks.clear();
}
 
開發者ID:purpleposeidon,項目名稱:Factorization,代碼行數:11,代碼來源:ClientRenderInfo.java

示例8: closed

import net.minecraft.client.renderer.GLAllocation; //導入方法依賴的package包/類
@Override
public void closed() {
    if (display_list == -1) {
        return;
    }
    GLAllocation.deleteDisplayLists(display_list);
    display_list = -1;
}
 
開發者ID:purpleposeidon,項目名稱:Factorization,代碼行數:9,代碼來源:FigurePage.java

示例9: generateSky2

import net.minecraft.client.renderer.GLAllocation; //導入方法依賴的package包/類
private void generateSky2()
{
    Tessellator tessellator = Tessellator.getInstance();
    BufferBuilder bufferBuilder = tessellator.getBuffer();

    if (this.sky2VBO != null)
    {
        this.sky2VBO.deleteGlBuffers();
    }

    if (this.glSkyList2 >= 0)
    {
        GLAllocation.deleteDisplayLists(this.glSkyList2);
        this.glSkyList2 = -1;
    }

    if (this.vboEnabled)
    {
        this.sky2VBO = new net.minecraft.client.renderer.vertex.VertexBuffer(this.vertexBufferFormat);
        this.renderSky(bufferBuilder, -16.0F, true);
        bufferBuilder.finishDrawing();
        bufferBuilder.reset();
        this.sky2VBO.bufferData(bufferBuilder.getByteBuffer());
    }
    else
    {
        this.glSkyList2 = GLAllocation.generateDisplayLists(1);
        GlStateManager.glNewList(this.glSkyList2, 4864);
        this.renderSky(bufferBuilder, -16.0F, true);
        tessellator.draw();
        GlStateManager.glEndList();
    }
}
 
開發者ID:maruohon,項目名稱:justenoughdimensions,代碼行數:34,代碼來源:SkyRenderer.java

示例10: generateSky

import net.minecraft.client.renderer.GLAllocation; //導入方法依賴的package包/類
private void generateSky()
{
    Tessellator tessellator = Tessellator.getInstance();
    BufferBuilder bufferBuilder = tessellator.getBuffer();

    if (this.skyVBO != null)
    {
        this.skyVBO.deleteGlBuffers();
    }

    if (this.glSkyList >= 0)
    {
        GLAllocation.deleteDisplayLists(this.glSkyList);
        this.glSkyList = -1;
    }

    if (this.vboEnabled)
    {
        this.skyVBO = new net.minecraft.client.renderer.vertex.VertexBuffer(this.vertexBufferFormat);
        this.renderSky(bufferBuilder, 16.0F, false);
        bufferBuilder.finishDrawing();
        bufferBuilder.reset();
        this.skyVBO.bufferData(bufferBuilder.getByteBuffer());
    }
    else
    {
        this.glSkyList = GLAllocation.generateDisplayLists(1);
        GlStateManager.glNewList(this.glSkyList, 4864);
        this.renderSky(bufferBuilder, 16.0F, false);
        tessellator.draw();
        GlStateManager.glEndList();
    }
}
 
開發者ID:maruohon,項目名稱:justenoughdimensions,代碼行數:34,代碼來源:SkyRenderer.java

示例11: generateStars

import net.minecraft.client.renderer.GLAllocation; //導入方法依賴的package包/類
private void generateStars()
{
    Tessellator tessellator = Tessellator.getInstance();
    BufferBuilder bufferBuilder = tessellator.getBuffer();

    if (this.starVBO != null)
    {
        this.starVBO.deleteGlBuffers();
    }

    if (this.starGLCallList >= 0)
    {
        GLAllocation.deleteDisplayLists(this.starGLCallList);
        this.starGLCallList = -1;
    }

    if (this.vboEnabled)
    {
        this.starVBO = new net.minecraft.client.renderer.vertex.VertexBuffer(this.vertexBufferFormat);
        this.renderStars(bufferBuilder);
        bufferBuilder.finishDrawing();
        bufferBuilder.reset();
        this.starVBO.bufferData(bufferBuilder.getByteBuffer());
    }
    else
    {
        this.starGLCallList = GLAllocation.generateDisplayLists(1);
        GlStateManager.pushMatrix();
        GlStateManager.glNewList(this.starGLCallList, 4864);
        this.renderStars(bufferBuilder);
        tessellator.draw();
        GlStateManager.glEndList();
        GlStateManager.popMatrix();
    }
}
 
開發者ID:maruohon,項目名稱:justenoughdimensions,代碼行數:36,代碼來源:SkyRenderer.java

示例12: setDead

import net.minecraft.client.renderer.GLAllocation; //導入方法依賴的package包/類
@Override
public void setDead() {
	super.setDead();

	//unlink any connected tiles
	Iterator<IInfrastructure> connectedTiles = connectedInfrastructure.iterator();
	while(connectedTiles.hasNext()) {
		connectedTiles.next().unlinkRocket();
		connectedTiles.remove();
	}

	if(worldObj.isRemote && storage != null && storage.world.glListID != -1) {
		GLAllocation.deleteDisplayLists(storage.world.glListID);
	}
}
 
開發者ID:zmaster587,項目名稱:AdvancedRocketry,代碼行數:16,代碼來源:EntityRocket.java

示例13: generateSky

import net.minecraft.client.renderer.GLAllocation; //導入方法依賴的package包/類
private void generateSky() {
    Tessellator tessellator = Tessellator.getInstance();
    WorldRenderer worldrenderer = tessellator.getWorldRenderer();

    if (this.skyVBO != null) {
        this.skyVBO.deleteGlBuffers();
    }

    if (this.glSkyList >= 0) {
        GLAllocation.deleteDisplayLists(this.glSkyList);
        this.glSkyList = -1;
    }

    if (this.vboEnabled) {
        this.skyVBO = new VertexBuffer(this.vertexBufferFormat);
        this.renderSky(worldrenderer, 16.0F, false);
        worldrenderer.finishDrawing();
        worldrenderer.reset();
        this.skyVBO.bufferData(worldrenderer.getByteBuffer(), worldrenderer.getByteIndex());
    }
    else {
        this.glSkyList = GLAllocation.generateDisplayLists(1);
        GL11.glNewList(this.glSkyList, GL11.GL_COMPILE);
        this.renderSky(worldrenderer, 16.0F, false);
        tessellator.draw();
        GL11.glEndList();
    }
}
 
開發者ID:tyronx,項目名稱:vintagecraft,代碼行數:29,代碼來源:RenderSkyVC.java

示例14: generateSky2

import net.minecraft.client.renderer.GLAllocation; //導入方法依賴的package包/類
private void generateSky2() {
    Tessellator tessellator = Tessellator.getInstance();
    WorldRenderer worldrenderer = tessellator.getWorldRenderer();

    if (this.sky2VBO != null) {
        this.sky2VBO.deleteGlBuffers();
    }

    if (this.glSkyList2 >= 0) {
        GLAllocation.deleteDisplayLists(this.glSkyList2);
        this.glSkyList2 = -1;
    }

    if (this.vboEnabled) {
        this.sky2VBO = new VertexBuffer(this.vertexBufferFormat);
        this.renderSky(worldrenderer, -16.0F, true);
        worldrenderer.finishDrawing();
        worldrenderer.reset();
        this.sky2VBO.bufferData(worldrenderer.getByteBuffer(), worldrenderer.getByteIndex());
    }
    else {
        this.glSkyList2 = GLAllocation.generateDisplayLists(1);
        GL11.glNewList(this.glSkyList2, GL11.GL_COMPILE);
        this.renderSky(worldrenderer, -16.0F, true);
        tessellator.draw();
        GL11.glEndList();
    }
}
 
開發者ID:tyronx,項目名稱:vintagecraft,代碼行數:29,代碼來源:RenderSkyVC.java

示例15: finalize

import net.minecraft.client.renderer.GLAllocation; //導入方法依賴的package包/類
@SideOnly(Side.CLIENT)
@Override
protected void finalize() throws Throwable
{
	// Call super
	super.finalize();

	// Dealoc the cached render list
	if( this.cachedDisplayList != null )
	{
		GLAllocation.deleteDisplayLists( this.cachedDisplayList );
	}
}
 
開發者ID:Nividica,項目名稱:ThaumicEnergistics,代碼行數:14,代碼來源:PartEssentiaStorageMonitor.java


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