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


Java GL11.glGenLists方法代码示例

本文整理汇总了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;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:25,代码来源:GLAllocation.java

示例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();
}
 
开发者ID:Wurst-Imperium,项目名称:Wurst-MC-1.12,代码行数:18,代码来源:ItemEspMod.java

示例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);
}
 
开发者ID:Wurst-Imperium,项目名称:Wurst-MC-1.12,代码行数:27,代码来源:ChestEspMod.java

示例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());
}
 
开发者ID:tiffit,项目名称:Defier,代码行数:24,代码来源:ClientProxy.java

示例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();
}
 
开发者ID:Wurst-Imperium,项目名称:Wurst-MC-1.12,代码行数:13,代码来源:MobEspMod.java

示例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;
}
 
开发者ID:ArekkuusuJerii,项目名称:Solar,代码行数:12,代码来源:RenderHelper.java

示例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);
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:7,代码来源:ImmediateModeOGLRenderer.java

示例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;
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:43,代码来源:SemiBlockRendererTransferGadget.java

示例9: glGenLists

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


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