本文整理汇总了Java中org.lwjgl.opengl.GL11.glGenLists方法的典型用法代码示例。如果您正苦于以下问题:Java GL11.glGenLists方法的具体用法?Java GL11.glGenLists怎么用?Java GL11.glGenLists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.lwjgl.opengl.GL11
的用法示例。
在下文中一共展示了GL11.glGenLists方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateDisplayLists
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
/**
* Generates the specified number of display lists and returns the first index.
*/
public static synchronized int generateDisplayLists(int range)
{
int i = GL11.glGenLists(range);
if (i == 0)
{
int j = GL11.glGetError();
String s = "No error code reported";
if (j != 0)
{
s = GLU.gluErrorString(j);
}
throw new IllegalStateException("glGenLists returned an ID of 0 for a count of " + range + ", GL error (" + j + "): " + s);
}
else
{
return i;
}
}
示例2: onEnable
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@Override
public void onEnable()
{
wurst.events.add(UpdateListener.class, this);
wurst.events.add(RenderListener.class, this);
itemBox = GL11.glGenLists(1);
GL11.glNewList(itemBox, GL11.GL_COMPILE);
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glColor4f(1, 1, 0, 0.5F);
RenderUtils.drawOutlinedBox(
new AxisAlignedBB(-0.175, 0, -0.175, 0.175, 0.35, 0.175));
GL11.glEndList();
}
示例3: onEnable
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@Override
public void onEnable()
{
wurst.events.add(UpdateListener.class, this);
wurst.events.add(RenderListener.class, this);
emptyChests.clear();
nonEmptyChests.clear();
solidBox = GL11.glGenLists(1);
GL11.glNewList(solidBox, GL11.GL_COMPILE);
RenderUtils.drawSolidBox();
GL11.glEndList();
outlinedBox = GL11.glGenLists(1);
GL11.glNewList(outlinedBox, GL11.GL_COMPILE);
RenderUtils.drawOutlinedBox();
GL11.glEndList();
crossBox = GL11.glGenLists(1);
GL11.glNewList(crossBox, GL11.GL_COMPILE);
RenderUtils.drawCrossBox();
GL11.glEndList();
normalChests = GL11.glGenLists(1);
}
示例4: init
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@Override
public void init(FMLInitializationEvent e) {
super.init(e);
{
Sphere sphere = new Sphere();
sphere.setDrawStyle(GLU.GLU_FILL);
sphere.setNormals(GLU.GLU_SMOOTH);
sphere.setOrientation(GLU.GLU_OUTSIDE);
defierSphereIdOutside = GL11.glGenLists(1);
GL11.glNewList(defierSphereIdOutside, GL11.GL_COMPILE);
sphere.draw(0.5F, 30, 30);
GL11.glEndList();
sphere.setOrientation(GLU.GLU_INSIDE);
defierSphereIdInside = GL11.glGenLists(1);
GL11.glNewList(defierSphereIdInside, GL11.GL_COMPILE);
sphere.draw(0.5F, 30, 30);
GL11.glEndList();
}
ClientRegistry.bindTileEntitySpecialRenderer(DefierTileEntity.class, new DefierTESR());
ClientRegistry.bindTileEntitySpecialRenderer(EnergyProviderTileEntity.class, new EnergyProviderTESR());
}
示例5: 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();
}
示例6: 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;
}
示例7: glGenLists
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
/**
* @see org.newdawn.slick.opengl.renderer.SGL#glGenLists(int)
*/
public int glGenLists(int count) {
return GL11.glGenLists(count);
}
示例8: compileRenderList
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
private int compileRenderList(AxisAlignedBB aabb) {
int renderList = GL11.glGenLists(1);
GL11.glNewList(renderList, GL11.GL_COMPILE);
BufferBuilder wr = Tessellator.getInstance().getBuffer();
wr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION);
wr.pos(aabb.minX, aabb.minY, aabb.minZ).endVertex();
wr.pos(aabb.minX, aabb.maxY, aabb.minZ).endVertex();
wr.pos(aabb.maxX, aabb.maxY, aabb.minZ).endVertex();
wr.pos(aabb.maxX, aabb.minY, aabb.minZ).endVertex();
wr.pos(aabb.maxX, aabb.minY, aabb.maxZ).endVertex();
wr.pos(aabb.maxX, aabb.maxY, aabb.maxZ).endVertex();
wr.pos(aabb.minX, aabb.maxY, aabb.maxZ).endVertex();
wr.pos(aabb.minX, aabb.minY, aabb.maxZ).endVertex();
wr.pos(aabb.minX, aabb.minY, aabb.minZ).endVertex();
wr.pos(aabb.minX, aabb.minY, aabb.maxZ).endVertex();
wr.pos(aabb.minX, aabb.maxY, aabb.maxZ).endVertex();
wr.pos(aabb.minX, aabb.maxY, aabb.minZ).endVertex();
wr.pos(aabb.maxX, aabb.maxY, aabb.minZ).endVertex();
wr.pos(aabb.maxX, aabb.maxY, aabb.maxZ).endVertex();
wr.pos(aabb.maxX, aabb.minY, aabb.maxZ).endVertex();
wr.pos(aabb.maxX, aabb.minY, aabb.minZ).endVertex();
wr.pos(aabb.minX, aabb.minY, aabb.minZ).endVertex();
wr.pos(aabb.maxX, aabb.minY, aabb.minZ).endVertex();
wr.pos(aabb.maxX, aabb.minY, aabb.maxZ).endVertex();
wr.pos(aabb.minX, aabb.minY, aabb.maxZ).endVertex();
wr.pos(aabb.minX, aabb.maxY, aabb.maxZ).endVertex();
wr.pos(aabb.maxX, aabb.maxY, aabb.maxZ).endVertex();
wr.pos(aabb.maxX, aabb.maxY, aabb.minZ).endVertex();
wr.pos(aabb.minX, aabb.maxY, aabb.minZ).endVertex();
Tessellator.getInstance().draw();
GL11.glEndList();
return renderList;
}
示例9: glGenLists
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static int glGenLists(int p_187442_0_)
{
return GL11.glGenLists(p_187442_0_);
}