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


Java GL11.glCallList方法代码示例

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


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

示例1: renderChunk

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
private static void renderChunk(Chunk chunk) {
    if (!chunk.isUpdate()) {
        if (chunks.containsKey(chunk.getId())) GL11.glDeleteLists(chunks.get(chunk.getId()), 1);
        else chunks.put(chunk.getId(), GL11.glGenLists(1));

        GL11.glNewList(chunks.get(chunk.getId()), GL11.GL_COMPILE);
        GL11.glBegin(GL11.GL_QUADS);
        Block[][][] blocks = chunk.getBlocks();
        for (int x = 0; x < 16; x++)
            for (int y = 0; y < 32; y++)
                for (int z = 0; z < 16; z++)
                    renderBlock(blocks[x][y][z], chunk.getLocation().clone().add(x, y, z));
        GL11.glEnd();
        GL11.glEndList();

        chunk.setUpdate(true);
    }

    // Draw the chunk.
    GL11.glEnable(GL11.GL_CULL_FACE);
    GL11.glCullFace(GL11.GL_BACK);
    GL11.glCallList(chunks.get(chunk.getId()));
    GL11.glDisable(GL11.GL_CULL_FACE);
}
 
开发者ID:Vinetos,项目名称:FreeWorld,代码行数:25,代码来源:Renderer.java

示例2: render

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@Override
public void render(DefierTileEntity te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
	super.render(te, x, y, z, partialTicks, destroyStage, alpha);
	GL11.glPushMatrix();
	if(te.render_pulsate_increase){
		te.render_pulsate++;
		if(te.render_pulsate >= 100){
			te.render_pulsate_increase = false;
		}
	}else{
		te.render_pulsate--;
		if(te.render_pulsate <= 0)te.render_pulsate_increase = true;
	}
	GL11.glTranslated(x+0.5, y + 0.5, z+0.5);
	float scale = 0.7F + te.render_pulsate/1000F;
	GL11.glScalef(scale, scale, scale);
	if(te.rf.getMaxEnergyStored() == 0)GL11.glColor4d(0, 0, 0, 1);
	else GL11.glColor4d(te.rf.getEnergyStored()/(double)te.rf.getMaxEnergyStored() * 0.7, 0, 0, 1);
	ResourceLocation rL = new ResourceLocation(Defier.MODID + ":textures/blocks/blank.png");
	Minecraft.getMinecraft().getTextureManager().bindTexture(rL);
	GL11.glCallList(ClientProxy.defierSphereIdOutside);
	GL11.glCallList(ClientProxy.defierSphereIdInside);
	GL11.glColor4d(1, 1, 1, 1);
	GL11.glPopMatrix();
	
}
 
开发者ID:tiffit,项目名称:Defier,代码行数:27,代码来源:DefierTESR.java

示例3: renderWithRotation

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@Override
public void renderWithRotation(float scale)
{
	if (!this.isHidden)
	{
		if (this.showModel)
		{
			if (!this.compiled)
			{
				this.compileDisplayList(scale);
			}

			GL11.glPushMatrix();
			GL11.glTranslatef(this.rotationPointX * scale, this.rotationPointY * scale, this.rotationPointZ * scale);

			if (this.rotateAngleY != 0.0F)
			{
				GL11.glRotatef(this.rotateAngleY * 57.29578F, 0.0F, 1.0F, 0.0F);
			}

			if (this.rotateAngleX != 0.0F)
			{
				GL11.glRotatef(this.rotateAngleX * 57.29578F, 1.0F, 0.0F, 0.0F);
			}

			if (this.rotateAngleZ != 0.0F)
			{
				GL11.glRotatef(this.rotateAngleZ * 57.29578F, 0.0F, 0.0F, 1.0F);
			}

			GL11.glCallList(this.displayList);
			GL11.glPopMatrix();
		}
	}
}
 
开发者ID:crazysnailboy,项目名称:Halloween,代码行数:36,代码来源:ModelRendererPyramid.java

示例4: renderWithRotation

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void renderWithRotation(float f)
{
    if(field_1402_i)
    {
        return;
    }
    if(!showModel)
    {
        return;
    }
    if(!compiled)
    {
        compileDisplayList(f);
    }
    GL11.glPushMatrix();
    GL11.glTranslatef(rotationPointX * f, rotationPointY * f, rotationPointZ * f);
    if(rotateAngleY != 0.0F)
    {
        GL11.glRotatef(rotateAngleY * 57.29578F, 0.0F, 1.0F, 0.0F);
    }
    if(rotateAngleX != 0.0F)
    {
        GL11.glRotatef(rotateAngleX * 57.29578F, 1.0F, 0.0F, 0.0F);
    }
    if(rotateAngleZ != 0.0F)
    {
        GL11.glRotatef(rotateAngleZ * 57.29578F, 0.0F, 0.0F, 1.0F);
    }
    GL11.glCallList(displayList);
    GL11.glPopMatrix();
}
 
开发者ID:jd-lang,项目名称:betaexpansion,代码行数:32,代码来源:ModelRenderer.java

示例5: drawSphere

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void drawSphere(int color, float alpha) {
	float r = (color >> 16 & 255) / 255.0F;
	float g = (color >> 8 & 255) / 255.0F;
	float b = (color & 255) / 255.0F;

	GlStateManager.color(r, g, b, alpha);
	GL11.glCallList(sphere);
}
 
开发者ID:ArekkuusuJerii,项目名称:Solar,代码行数:9,代码来源:RenderHelper.java

示例6: renderBoxes

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
private void renderBoxes(ArrayList<AxisAlignedBB> boxes, int displayList)
{
	for(AxisAlignedBB bb : boxes)
	{
		GL11.glPushMatrix();
		GL11.glTranslated(bb.minX, bb.minY, bb.minZ);
		GL11.glScaled(bb.maxX - bb.minX, bb.maxY - bb.minY,
			bb.maxZ - bb.minZ);
		GL11.glCallList(displayList);
		GL11.glPopMatrix();
	}
}
 
开发者ID:Wurst-Imperium,项目名称:Wurst-MC-1.12,代码行数:13,代码来源:ChestEspMod.java

示例7: renderChunkLayer

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void renderChunkLayer(EnumWorldBlockLayer layer)
{
    if (this.initialized)
    {
        if (this.renderChunks.size() == 0)
        {
            return;
        }

        for (RenderChunk renderchunk : this.renderChunks)
        {
            ListedRenderChunk listedrenderchunk = (ListedRenderChunk)renderchunk;
            GlStateManager.pushMatrix();
            this.preRenderChunk(renderchunk);
            GL11.glCallList(listedrenderchunk.getDisplayList(layer, listedrenderchunk.getCompiledChunk()));
            GlStateManager.popMatrix();
        }

        if (Config.isMultiTexture())
        {
            GlStateManager.bindCurrentTexture();
        }

        GlStateManager.resetColor();
        this.renderChunks.clear();
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:28,代码来源:RenderList.java

示例8: renderItem

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@Override
public void renderItem(ItemStack stack, TransformType transformType) {
	GL11.glPushMatrix();
	GL11.glTranslated(0.5, .5, .5);
	GL11.glScalef(0.7F, 0.7F, 0.7F);
	GL11.glColor4f(0f, 0f, 0f, 1f);
	ResourceLocation rL = new ResourceLocation(Defier.MODID + ":textures/blocks/blank.png");
	Minecraft.getMinecraft().getTextureManager().bindTexture(rL);
	GL11.glCallList(ClientProxy.defierSphereIdOutside);
	GL11.glCallList(ClientProxy.defierSphereIdInside);
	GL11.glPopMatrix();
	GL11.glColor4f(1f, 1f, 1f, 1f);
}
 
开发者ID:tiffit,项目名称:Defier,代码行数:14,代码来源:RenderDefierItem.java

示例9: render

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void render() {
    GL11.glCallList(renderList);
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:4,代码来源:AreaShowHandler.java

示例10: callOcclusionQueryList

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void callOcclusionQueryList()
{
    GL11.glCallList(glRenderList + renderPasses);
}
 
开发者ID:jd-lang,项目名称:betaexpansion,代码行数:5,代码来源:WorldRenderer.java

示例11: render

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void render(float f)
{
    if(field_1402_i)
    {
        return;
    }
    if(!showModel)
    {
        return;
    }
    if(!compiled)
    {
        compileDisplayList(f);
    }
    if(rotateAngleX != 0.0F || rotateAngleY != 0.0F || rotateAngleZ != 0.0F)
    {
        GL11.glPushMatrix();
        GL11.glTranslatef(rotationPointX * f, rotationPointY * f, rotationPointZ * f);
        if(rotateAngleZ != 0.0F)
        {
            GL11.glRotatef(rotateAngleZ * 57.29578F, 0.0F, 0.0F, 1.0F);
        }
        if(rotateAngleY != 0.0F)
        {
            GL11.glRotatef(rotateAngleY * 57.29578F, 0.0F, 1.0F, 0.0F);
        }
        if(rotateAngleX != 0.0F)
        {
            GL11.glRotatef(rotateAngleX * 57.29578F, 1.0F, 0.0F, 0.0F);
        }
        GL11.glCallList(displayList);
        GL11.glPopMatrix();
    } else
    if(rotationPointX != 0.0F || rotationPointY != 0.0F || rotationPointZ != 0.0F)
    {
        GL11.glTranslatef(rotationPointX * f, rotationPointY * f, rotationPointZ * f);
        GL11.glCallList(displayList);
        GL11.glTranslatef(-rotationPointX * f, -rotationPointY * f, -rotationPointZ * f);
    } else
    {
        GL11.glCallList(displayList);
    }
}
 
开发者ID:jd-lang,项目名称:betaexpansion,代码行数:44,代码来源:ModelRenderer.java

示例12: glCallList

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

示例13: callList

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

示例14: onRender

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@Override
public void onRender(float partialTicks)
{
	// GL settings
	GL11.glEnable(GL11.GL_BLEND);
	GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
	GL11.glEnable(GL11.GL_LINE_SMOOTH);
	GL11.glLineWidth(2);
	GL11.glDisable(GL11.GL_TEXTURE_2D);
	GL11.glEnable(GL11.GL_CULL_FACE);
	GL11.glDisable(GL11.GL_DEPTH_TEST);
	
	GL11.glPushMatrix();
	GL11.glTranslated(-mc.getRenderManager().renderPosX,
		-mc.getRenderManager().renderPosY,
		-mc.getRenderManager().renderPosZ);
	
	// minecart interpolation
	ArrayList<AxisAlignedBB> minecartBoxes =
		new ArrayList<>(minecarts.size());
	minecarts.forEach(e -> {
		double offsetX = -(e.posX - e.lastTickPosX)
			+ (e.posX - e.lastTickPosX) * partialTicks;
		double offsetY = -(e.posY - e.lastTickPosY)
			+ (e.posY - e.lastTickPosY) * partialTicks;
		double offsetZ = -(e.posZ - e.lastTickPosZ)
			+ (e.posZ - e.lastTickPosZ) * partialTicks;
		minecartBoxes.add(e.boundingBox.offset(offsetX, offsetY, offsetZ));
	});
	
	GL11.glCallList(normalChests);
	
	GL11.glColor4f(0, 1, 0, 0.25F);
	renderBoxes(minecartBoxes, solidBox);
	GL11.glColor4f(0, 1, 0, 0.5F);
	renderBoxes(minecartBoxes, outlinedBox);
	
	GL11.glPopMatrix();
	
	// GL resets
	GL11.glColor4f(1, 1, 1, 1);
	GL11.glEnable(GL11.GL_DEPTH_TEST);
	GL11.glEnable(GL11.GL_TEXTURE_2D);
	GL11.glDisable(GL11.GL_BLEND);
	GL11.glDisable(GL11.GL_LINE_SMOOTH);
}
 
开发者ID:Wurst-Imperium,项目名称:Wurst-MC-1.12,代码行数:47,代码来源:ChestEspMod.java


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