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


Java GL11.glNewList方法代码示例

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


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

示例1: compileDisplayList

import org.lwjgl.opengl.GL11; //导入方法依赖的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 org.lwjgl.opengl.GL11; //导入方法依赖的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: addDraw

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
private static <T extends Quadric> int addDraw(T form, int draw, int normal, Consumer<T> consumer) {
	form.setDrawStyle(draw);
	form.setNormals(normal);
	int id = GL11.glGenLists(1);

	GL11.glNewList(id, GL11.GL_COMPILE);
	consumer.accept(form);
	GL11.glEndList();

	return id;
}
 
开发者ID:ArekkuusuJerii,项目名称:Solar,代码行数:12,代码来源:RenderHelper.java

示例4: setPosition

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void setPosition(int i, int j, int k)
{
    if(i == posX && j == posY && k == posZ)
    {
        return;
    } else
    {
        setDontDraw();
        posX = i;
        posY = j;
        posZ = k;
        posXPlus = i + sizeWidth / 2;
        posYPlus = j + sizeHeight / 2;
        posZPlus = k + sizeDepth / 2;
        posXClip = i & 0x3ff;
        posYClip = j;
        posZClip = k & 0x3ff;
        posXMinus = i - posXClip;
        posYMinus = j - posYClip;
        posZMinus = k - posZClip;
        float f = 6F;
        rendererBoundingBox = AxisAlignedBB.getBoundingBox((float)i - f, (float)j - f, (float)k - f, (float)(i + sizeWidth) + f, (float)(j + sizeHeight) + f, (float)(k + sizeDepth) + f);
        GL11.glNewList(glRenderList + renderPasses, 4864 /*GL_COMPILE*/);
        RenderItem.renderAABB(AxisAlignedBB.getBoundingBoxFromPool((float)posXClip - f, (float)posYClip - f, (float)posZClip - f, (float)(posXClip + sizeWidth) + f, (float)(posYClip + sizeHeight) + f, (float)(posZClip + sizeDepth) + f));
        GL11.glEndList();
        markDirty();
        return;
    }
}
 
开发者ID:jd-lang,项目名称:betaexpansion,代码行数:30,代码来源:WorldRenderer.java

示例5: compileDisplayList

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
private void compileDisplayList(float f)
{
    displayList = GLAllocation.generateDisplayLists(1);
    GL11.glNewList(displayList, 4864 /*GL_COMPILE*/);
    Tessellator tessellator = Tessellator.instance;
    for(int i = 0; i < faces.length; i++)
    {
        faces[i].draw(tessellator, f);
    }

    GL11.glEndList();
    compiled = true;
}
 
开发者ID:jd-lang,项目名称:betaexpansion,代码行数:14,代码来源:ModelRenderer.java

示例6: generateSky2

import org.lwjgl.opengl.GL11; //导入方法依赖的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.func_181722_a(worldrenderer.getByteBuffer());
    }
    else
    {
        this.glSkyList2 = GLAllocation.generateDisplayLists(1);
        GL11.glNewList(this.glSkyList2, GL11.GL_COMPILE);
        this.renderSky(worldrenderer, -16.0F, true);
        tessellator.draw();
        GL11.glEndList();
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:34,代码来源:RenderGlobal.java

示例7: generateSky

import org.lwjgl.opengl.GL11; //导入方法依赖的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.func_181722_a(worldrenderer.getByteBuffer());
    }
    else
    {
        this.glSkyList = GLAllocation.generateDisplayLists(1);
        GL11.glNewList(this.glSkyList, GL11.GL_COMPILE);
        this.renderSky(worldrenderer, 16.0F, false);
        tessellator.draw();
        GL11.glEndList();
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:34,代码来源:RenderGlobal.java

示例8: onEnable

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@Override
public void onEnable()
{
	wurst.events.add(UpdateListener.class, this);
	wurst.events.add(RenderListener.class, this);
	
	mobBox = GL11.glGenLists(1);
	GL11.glNewList(mobBox, GL11.GL_COMPILE);
	AxisAlignedBB bb = new AxisAlignedBB(-0.5, 0, -0.5, 0.5, 1, 0.5);
	RenderUtils.drawOutlinedBox(bb);
	GL11.glEndList();
}
 
开发者ID:Wurst-Imperium,项目名称:Wurst-MC-1.12,代码行数:13,代码来源:MobEspMod.java

示例9: generateStars

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
private void generateStars()
{
    Tessellator tessellator = Tessellator.getInstance();
    WorldRenderer worldrenderer = tessellator.getWorldRenderer();

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

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

    if (this.vboEnabled)
    {
        this.starVBO = new VertexBuffer(this.vertexBufferFormat);
        this.renderStars(worldrenderer);
        worldrenderer.finishDrawing();
        worldrenderer.reset();
        this.starVBO.func_181722_a(worldrenderer.getByteBuffer());
    }
    else
    {
        this.starGLCallList = GLAllocation.generateDisplayLists(1);
        GlStateManager.pushMatrix();
        GL11.glNewList(this.starGLCallList, GL11.GL_COMPILE);
        this.renderStars(worldrenderer);
        tessellator.draw();
        GL11.glEndList();
        GlStateManager.popMatrix();
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:36,代码来源:RenderGlobal.java

示例10: glNewList

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
/**
 * @see org.newdawn.slick.opengl.renderer.SGL#glNewList(int, int)
 */
public void glNewList(int id, int option) {
	GL11.glNewList(id, option);
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:7,代码来源:ImmediateModeOGLRenderer.java

示例11: startUpdateGlList

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void startUpdateGlList()
{
    GL11.glNewList(this.glListClouds, GL11.GL_COMPILE);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:5,代码来源:CloudRenderer.java

示例12: glNewList

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void glNewList(int p_187423_0_, int p_187423_1_)
{
    GL11.glNewList(p_187423_0_, p_187423_1_);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:5,代码来源:GlStateManager.java

示例13: SkyProviderTrappistOneB

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public SkyProviderTrappistOneB()
{
        
	int displayLists = GLAllocation.generateDisplayLists(3);
    this.starList = displayLists;
    this.glSkyList = displayLists + 1;
    this.glSkyList2 = displayLists + 2;

    // Bind stars to display list
    GL11.glPushMatrix();
    GL11.glNewList(this.starList, GL11.GL_COMPILE);
    this.renderStars();
    GL11.glEndList();
    GL11.glPopMatrix();

    final Tessellator tessellator = Tessellator.instance;
    GL11.glNewList(this.glSkyList, GL11.GL_COMPILE);
    final byte byte2 = 64;
    final int i = 256 / byte2 + 2;
    float f = 16F;

    for (int j = -byte2 * i; j <= byte2 * i; j += byte2)
    {
        for (int l = -byte2 * i; l <= byte2 * i; l += byte2)
        {
            tessellator.startDrawingQuads();
            tessellator.addVertex(j + 0, f, l + 0);
            tessellator.addVertex(j + byte2, f, l + 0);
            tessellator.addVertex(j + byte2, f, l + byte2);
            tessellator.addVertex(j + 0, f, l + byte2);
            tessellator.draw();
        }
    }

    GL11.glEndList();
    GL11.glNewList(this.glSkyList2, GL11.GL_COMPILE);
    f = -16F;
    tessellator.startDrawingQuads();

    for (int k = -byte2 * i; k <= byte2 * i; k += byte2)
    {
        for (int i1 = -byte2 * i; i1 <= byte2 * i; i1 += byte2)
        {
            tessellator.addVertex(k + byte2, f, i1 + 0);
            tessellator.addVertex(k + 0, f, i1 + 0);
            tessellator.addVertex(k + 0, f, i1 + byte2);
            tessellator.addVertex(k + byte2, f, i1 + byte2);
        }
    }

    tessellator.draw();
    GL11.glEndList();
}
 
开发者ID:BlesseNtumble,项目名称:TRAPPIST-1,代码行数:54,代码来源:SkyProviderTrappistOneB.java


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