本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
}
示例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());
}
}
示例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();
}
}
示例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;
}
示例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();
}
示例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;
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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);
}
}
示例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();
}
}
示例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();
}
}
示例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 );
}
}