本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
}
示例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;
}
示例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();
}
}
示例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();
}
}
示例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();
}
示例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();
}
}
示例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);
}
示例11: startUpdateGlList
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void startUpdateGlList()
{
GL11.glNewList(this.glListClouds, GL11.GL_COMPILE);
}
示例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_);
}
示例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();
}