当前位置: 首页>>代码示例>>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;未经允许,请勿转载。