当前位置: 首页>>代码示例>>Java>>正文


Java GLAllocation.generateDisplayLists方法代码示例

本文整理汇总了Java中net.minecraft.client.renderer.GLAllocation.generateDisplayLists方法的典型用法代码示例。如果您正苦于以下问题:Java GLAllocation.generateDisplayLists方法的具体用法?Java GLAllocation.generateDisplayLists怎么用?Java GLAllocation.generateDisplayLists使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.client.renderer.GLAllocation的用法示例。


在下文中一共展示了GLAllocation.generateDisplayLists方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: compileDisplayList

import net.minecraft.client.renderer.GLAllocation; //导入方法依赖的package包/类
/**
 * Compiles a GL display list for this model
 */
private void compileDisplayList(float scale)
{
    if (this.displayList == 0)
    {
        this.savedScale = scale;
        this.displayList = GLAllocation.generateDisplayLists(1);
    }

    GL11.glNewList(this.displayList, GL11.GL_COMPILE);
    WorldRenderer worldrenderer = Tessellator.getInstance().getWorldRenderer();

    for (int i = 0; i < this.cubeList.size(); ++i)
    {
        ((ModelBox)this.cubeList.get(i)).render(worldrenderer, scale);
    }

    for (int j = 0; j < this.spriteList.size(); ++j)
    {
        ModelSprite modelsprite = (ModelSprite)this.spriteList.get(j);
        modelsprite.render(Tessellator.getInstance(), scale);
    }

    GL11.glEndList();
    this.compiled = true;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:29,代码来源:ModelRenderer.java

示例2: compileDisplayList

import net.minecraft.client.renderer.GLAllocation; //导入方法依赖的package包/类
/**
 * Compiles a GL display list for this model
 */
private void compileDisplayList(float scale)
{
    this.displayList = GLAllocation.generateDisplayLists(1);
    GL11.glNewList(this.displayList, GL11.GL_COMPILE);
    WorldRenderer worldrenderer = Tessellator.getInstance().getWorldRenderer();

    for (int i = 0; i < this.cubeList.size(); ++i)
    {
        ((ModelBox)this.cubeList.get(i)).render(worldrenderer, scale);
    }

    for (int j = 0; j < this.spriteList.size(); ++j)
    {
        ModelSprite modelsprite = (ModelSprite)this.spriteList.get(j);
        modelsprite.render(Tessellator.getInstance(), scale);
    }

    GL11.glEndList();
    this.compiled = true;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:24,代码来源:ModelRenderer.java

示例3: compileDisplayList

import net.minecraft.client.renderer.GLAllocation; //导入方法依赖的package包/类
/**
 * Compiles a GL display list for this model
 */
private void compileDisplayList(float scale)
{
    if (this.displayList == 0)
    {
        this.savedScale = scale;
        this.displayList = GLAllocation.generateDisplayLists(1);
    }

    GlStateManager.glNewList(this.displayList, 4864);
    VertexBuffer vertexbuffer = Tessellator.getInstance().getBuffer();

    for (int i = 0; i < this.cubeList.size(); ++i)
    {
        ((ModelBox)this.cubeList.get(i)).render(vertexbuffer, scale);
    }

    for (int j = 0; j < this.spriteList.size(); ++j)
    {
        ModelSprite modelsprite = (ModelSprite)this.spriteList.get(j);
        modelsprite.render(Tessellator.getInstance(), scale);
    }

    GlStateManager.glEndList();
    this.compiled = true;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:29,代码来源:ModelRenderer.java

示例4: compileDisplayList

import net.minecraft.client.renderer.GLAllocation; //导入方法依赖的package包/类
/**
 * Compiles a GL display list for this model
 */
@SideOnly(Side.CLIENT)
private void compileDisplayList(float scale)
{
    this.displayList = GLAllocation.generateDisplayLists(1);
    GlStateManager.glNewList(this.displayList, 4864);
    VertexBuffer vertexbuffer = Tessellator.getInstance().getBuffer();

    for (int i = 0; i < this.cubeList.size(); ++i)
    {
        ((ModelBox)this.cubeList.get(i)).render(vertexbuffer, scale);
    }

    GlStateManager.glEndList();
    this.compiled = true;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:19,代码来源:ModelRenderer.java

示例5: 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

示例6: compileDisplayList

import net.minecraft.client.renderer.GLAllocation; //导入方法依赖的package包/类
/**
 * Compiles a GL display list for this model
 */
@SideOnly(Side.CLIENT)
protected void compileDisplayList(float scale)
{
    this.displayList = GLAllocation.generateDisplayLists(1);
    GlStateManager.glNewList(this.displayList, 4864);
    VertexBuffer vertexbuffer = Tessellator.getInstance().getBuffer();

    for (int i = 0; i < this.cubeList.size(); ++i)
    {
        ((ModelBox) this.cubeList.get(i)).render(vertexbuffer, scale);
    }

    GlStateManager.glEndList();
    this.compiled = true;
}
 
开发者ID:mchorse,项目名称:metamorph,代码行数:19,代码来源:ModelCustomRenderer.java

示例7: compileDisplayList

import net.minecraft.client.renderer.GLAllocation; //导入方法依赖的package包/类
private void compileDisplayList (float worldScale) {
    if (this.useLegacyCompiler)
        this.compileLegacyDisplayList(worldScale);
    else {
        final Collection<TextureGroup> textures = this.textureGroup.values();
        final Iterator<TextureGroup> itr = textures.iterator();
        this.displayListArray = new int[this.textureGroup.size()];
        for (int i = 0; itr.hasNext(); i++) {
            this.displayListArray[i] = GLAllocation.generateDisplayLists(1);
            GL11.glNewList(this.displayListArray[i], 4864);
            final Tessellator tessellator = Tessellator.getInstance();
            final TextureGroup usedGroup = itr.next();
            for (int j = 0; j < usedGroup.poly.size(); j++)
                usedGroup.poly.get(j).draw(tessellator, worldScale);
            GL11.glEndList();
        }
    }
    this.compiled = true;
}
 
开发者ID:MinecraftModDevelopmentMods,项目名称:MMDLib-old,代码行数:20,代码来源:ModelRendererTurbo.java

示例8: update

import net.minecraft.client.renderer.GLAllocation; //导入方法依赖的package包/类
public boolean update(BlockSlice slice) {
  if (!changed) {
    return false;
  }
  for (int pass = 0; pass < 2; pass++) {
    if (glDisplayList[pass] < 0) {
      glDisplayList[pass] = GLAllocation.generateDisplayLists(1);
    }
    GL11.glPushMatrix();
    GL11.glNewList(glDisplayList[pass], GL11.GL_COMPILE);
    if (slice.sculpture.needRenderPass(pass)) {
      build(slice, pass);
    }
    GL11.glEndList();
    GL11.glPopMatrix();
  }

  changed = false;
  return true;
}
 
开发者ID:twothe,项目名称:DaVincing,代码行数:21,代码来源:SculptureRenderCompiler.java

示例9: compileDisplayList

import net.minecraft.client.renderer.GLAllocation; //导入方法依赖的package包/类
private static void compileDisplayList()
{
    displayList = GLAllocation.generateDisplayLists(1);
    GlStateManager.glNewList(displayList, 4864);
    BufferBuilder vertexbuffer = Tessellator.getInstance().getBuffer();

    vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_NORMAL);

    for(RawQuad q : quads)
    {
        for(int i = 0; i < 4; i++)
        {
            Vertex v = q.getVertex(i);
            Vec3d n = v.getNormal();
            vertexbuffer.pos(v.x, v.y, v.z).tex(v.u, v.v).normal((float)n.x, (float)n.y, (float)n.z).endVertex();
        }
    }

    Tessellator.getInstance().draw();

    GlStateManager.glEndList();



}
 
开发者ID:grondag,项目名称:Hard-Science,代码行数:26,代码来源:RenderLavaBlob.java

示例10: update

import net.minecraft.client.renderer.GLAllocation; //导入方法依赖的package包/类
public boolean update(BlockSlice slice){
	if(glDisplayList != null && !changed)return false;
	
	if(glDisplayList == null)glDisplayList = new int[]{-1,-1};
	for(int pass = 0; pass < 2; pass++){
		if(glDisplayList[pass] < 0)glDisplayList[pass] = GLAllocation.generateDisplayLists(1);
		GL11.glPushMatrix();
		GL11.glNewList(glDisplayList[pass], GL11.GL_COMPILE);
		if(slice.sculpture.needRenderPass(pass))
			build(slice,pass);
		GL11.glEndList();
		GL11.glPopMatrix();
	}		
	
	changed = false;
	return true;
}
 
开发者ID:hypercross,项目名称:minepainter,代码行数:18,代码来源:SculptureRenderCompiler.java

示例11: compileDisplayList

import net.minecraft.client.renderer.GLAllocation; //导入方法依赖的package包/类
/**
 * Compiles a GL display list for this model
 */
@SideOnly(Side.CLIENT)
private void compileDisplayList(float par1)
{
    this.displayList = GLAllocation.generateDisplayLists(1);
    GL11.glNewList(this.displayList, GL11.GL_COMPILE);
    Tessellator tessellator = Tessellator.instance;

    for (int i = 0; i < this.cubeList.size(); ++i)
    {
        ((ModelBox)this.cubeList.get(i)).render(tessellator, par1);
    }

    GL11.glEndList();
    this.compiled = true;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:19,代码来源:ModelRenderer.java

示例12: compileDisplayList

import net.minecraft.client.renderer.GLAllocation; //导入方法依赖的package包/类
/**
 * Compiles a GL display list for this model
 */
@SideOnly(Side.CLIENT)
private void compileDisplayList(float par1) {
	this.displayList = GLAllocation.generateDisplayLists(1);
	GL11.glNewList(this.displayList, GL11.GL_COMPILE);
	Tessellator var2 = Tessellator.instance;

	for (int var3 = 0; var3 < this.cubeList.size(); ++var3) {
		((ModelBox) this.cubeList.get(var3)).render(var2, par1);
	}

	for(int i = 0; i < this.objs.size(); i++){
		this.objs.get(i).render(par1);
	}

	GL11.glEndList();
	this.compiled = true;
}
 
开发者ID:uzzaco2002,项目名称:secri,代码行数:21,代码来源:MaemeModelRenderer.java

示例13: compileDisplayList

import net.minecraft.client.renderer.GLAllocation; //导入方法依赖的package包/类
/**
 * Compiles a GL display list for this model
 */
private void compileDisplayList(float scale)
{
    this.displayList = GLAllocation.generateDisplayLists(1);
    GL11.glNewList(this.displayList, GL11.GL_COMPILE);
    WorldRenderer worldrenderer = Tessellator.getInstance().getWorldRenderer();

    for (int i = 0; i < this.cubeList.size(); ++i)
    {
        ((ModelBox)this.cubeList.get(i)).render(worldrenderer, scale);
    }

    GL11.glEndList();
    this.compiled = true;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:18,代码来源:ModelRenderer.java

示例14: compileDisplayList

import net.minecraft.client.renderer.GLAllocation; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
private void compileDisplayList(float scale)
{
	this.displayList = GLAllocation.generateDisplayLists(1);
	GL11.glNewList(this.displayList, GL11.GL_COMPILE);
	BufferBuilder bufferbuilder = Tessellator.getInstance().getBuffer();

	for (int i = 0; i < this.quadList.length; i++)
	{
		this.quadList[i].draw(bufferbuilder, scale);
	}

	GL11.glEndList();
	this.compiled = true;
}
 
开发者ID:crazysnailboy,项目名称:Halloween,代码行数:16,代码来源:ModelRendererPyramid.java

示例15: compileDisplayList

import net.minecraft.client.renderer.GLAllocation; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
private void compileDisplayList(float par1)
{
    this.displayList = GLAllocation.generateDisplayLists(1);
    GL11.glNewList(this.displayList, GL11.GL_COMPILE);
    Tessellator tessellator = Tessellator.instance;

    for (int i = 0; i < this.cubeList.size(); ++i)
    {
        ((ModelBox) this.cubeList.get(i)).render(tessellator, par1);
    }

    GL11.glEndList();
    this.compiled = true;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:16,代码来源:ModelRendererGC.java


注:本文中的net.minecraft.client.renderer.GLAllocation.generateDisplayLists方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。