本文整理汇总了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);
}
示例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();
}
示例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();
}
}
}
示例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();
}
示例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);
}
示例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();
}
}
示例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();
}
}
示例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);
}
示例9: render
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void render() {
GL11.glCallList(renderList);
}
示例10: callOcclusionQueryList
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void callOcclusionQueryList()
{
GL11.glCallList(glRenderList + renderPasses);
}
示例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);
}
}
示例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);
}
示例13: callList
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void callList(int list)
{
GL11.glCallList(list);
}
示例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);
}