List of usage examples for org.lwjgl.opengl GL11 glCallList
public static native void glCallList(@NativeType("GLuint") int list);
From source file:com.blogspot.jabelarminecraft.magicbeans.renderers.RenderMysteriousStranger.java
License:Open Source License
@Override public void passSpecialRender(EntityLivingBase parEntity, double parX, double parY, double parZ) { super.passSpecialRender(parEntity, parX, parY, parZ); if (parEntity.ticksExisted < 20 * 2) { GL11.glPushMatrix();/*from w w w. j a v a 2 s . c o m*/ GL11.glTranslated(parX, parY + parEntity.height / 2, parZ); GL11.glScalef(3.0F, 3.0F, 3.0F); GL11.glEnable(GL11.GL_BLEND); GL11.glDepthMask(false); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glColor4f(1.0F, 1.0F, 1.0F, (40.0F - parEntity.ticksExisted) / 40.0F); GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glCallList(ClientProxy.sphereIdOutside); GL11.glCallList(ClientProxy.sphereIdInside); GL11.glPopMatrix(); } }
From source file:com.blogspot.jabelarminecraft.wildanimals.models.ModelRendererWildAnimals.java
License:Open Source License
@SideOnly(Side.CLIENT) public void render(float par1) { if (!this.isHidden) { if (this.showModel) { if (!this.compiled) { this.compileDisplayList(par1); }// w w w .j av a2 s .co m GL11.glTranslatef(this.offsetX, this.offsetY, this.offsetZ); int i; if (this.rotateAngleX == 0.0F && this.rotateAngleY == 0.0F && this.rotateAngleZ == 0.0F) { if (this.rotationPointX == 0.0F && this.rotationPointY == 0.0F && this.rotationPointZ == 0.0F) { GL11.glCallList(this.displayList); if (this.childModels != null) { for (i = 0; i < this.childModels.size(); ++i) { ((ModelRendererWildAnimals) this.childModels.get(i)).render(par1); } } } else { GL11.glTranslatef(this.rotationPointX * par1, this.rotationPointY * par1, this.rotationPointZ * par1); GL11.glCallList(this.displayList); if (this.childModels != null) { for (i = 0; i < this.childModels.size(); ++i) { ((ModelRendererWildAnimals) this.childModels.get(i)).render(par1); } } GL11.glTranslatef(-this.rotationPointX * par1, -this.rotationPointY * par1, -this.rotationPointZ * par1); } } else { GL11.glPushMatrix(); GL11.glTranslatef(this.rotationPointX * par1, this.rotationPointY * par1, this.rotationPointZ * par1); if (this.rotateAngleZ != 0.0F) { GL11.glRotatef(this.rotateAngleZ * (180F / (float) Math.PI), 0.0F, 0.0F, 1.0F); } if (this.rotateAngleY != 0.0F) { GL11.glRotatef(this.rotateAngleY * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F); } if (this.rotateAngleX != 0.0F) { GL11.glRotatef(this.rotateAngleX * (180F / (float) Math.PI), 1.0F, 0.0F, 0.0F); } GL11.glCallList(this.displayList); if (this.childModels != null) { for (i = 0; i < this.childModels.size(); ++i) { ((ModelRendererWildAnimals) this.childModels.get(i)).render(par1); } } GL11.glPopMatrix(); } GL11.glTranslatef(-this.offsetX, -this.offsetY, -this.offsetZ); } } }
From source file:com.blogspot.jabelarminecraft.wildanimals.models.ModelRendererWildAnimals.java
License:Open Source License
@SideOnly(Side.CLIENT) public void renderWithRotation(float par1) { if (!this.isHidden) { if (this.showModel) { if (!this.compiled) { this.compileDisplayList(par1); }// w w w. ja va 2s. c om GL11.glPushMatrix(); GL11.glTranslatef(this.rotationPointX * par1, this.rotationPointY * par1, this.rotationPointZ * par1); if (this.rotateAngleY != 0.0F) { GL11.glRotatef(this.rotateAngleY * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F); } if (this.rotateAngleX != 0.0F) { GL11.glRotatef(this.rotateAngleX * (180F / (float) Math.PI), 1.0F, 0.0F, 0.0F); } if (this.rotateAngleZ != 0.0F) { GL11.glRotatef(this.rotateAngleZ * (180F / (float) Math.PI), 0.0F, 0.0F, 1.0F); } GL11.glCallList(this.displayList); GL11.glPopMatrix(); } } }
From source file:com.github.begla.blockmania.game.blueprints.BlockGrid.java
License:Apache License
public void render() { glEnable(GL_BLEND);/* www . j ava 2 s . c om*/ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); for (int i = 0; i < 2; i++) { if (i == 0) { glColorMask(false, false, false, false); } else { glColorMask(true, true, true, true); } for (BlockPosition gp : _gridPositions) { GL11.glPushMatrix(); Vector3f r = _parent.getWorldProvider().getRenderingReferencePoint(); GL11.glTranslatef(gp.x - r.x, gp.y - r.y, gp.z - r.z); GL11.glCallList(_blockDisplayList); GL11.glPopMatrix(); } } glDisable(GL11.GL_BLEND); }
From source file:com.kegare.frozenland.client.renderer.FrozenlandSkyRenderer.java
License:Minecraft Mod Public
@Override public void render(float ticks, WorldClient world, Minecraft mc) { GL11.glPushMatrix();// w w w . java 2s . c o m GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(world.getCelestialAngle(ticks) * 360.0F, 1.0F, 0.0F, 0.0F); float color = world.getStarBrightness(ticks) * (1.0F - world.getRainStrength(ticks)); if (color > 0.0F) { GL11.glColor4f(color, color, color, color); GL11.glCallList(starGLCallList); } GL11.glPopMatrix(); }
From source file:com.minestellar.moon.world.SkyRendererMoon.java
License:Open Source License
@Override public void render(float partialTicks, WorldClient world, Minecraft mc) { WorldProviderMoon gcProvider = null; if (world.provider instanceof WorldProviderMoon) { gcProvider = (WorldProviderMoon) world.provider; }// w w w .j av a 2 s .c o m GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glColor3f(1, 1, 1); final Tessellator var23 = Tessellator.instance; GL11.glDepthMask(false); GL11.glEnable(GL11.GL_FOG); GL11.glColor3f(0, 0, 0); GL11.glCallList(this.glSkyList); GL11.glDisable(GL11.GL_FOG); GL11.glDisable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); RenderHelper.disableStandardItemLighting(); float var10; float var11; float var12; float var20 = 0; if (gcProvider != null) { var20 = gcProvider.getStarBrightness(partialTicks); } if (var20 > 0.0F) { GL11.glColor4f(1.0F, 1.0F, 1.0F, var20); GL11.glCallList(this.starGLCallList); } GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); GL11.glPushMatrix(); GL11.glPopMatrix(); GL11.glPushMatrix(); // SUN: GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 5F); GL11.glRotatef(world.getCelestialAngle(partialTicks) * 360.0F, 1.0F, 0.0F, 0.0F); var12 = 30.0F; FMLClientHandler.instance().getClient().renderEngine.bindTexture(SkyRendererMoon.sunTexture); var23.startDrawingQuads(); var23.addVertexWithUV(-var12, 150.0D, -var12, 0.0D, 0.0D); var23.addVertexWithUV(var12, 150.0D, -var12, 1.0D, 0.0D); var23.addVertexWithUV(var12, 150.0D, var12, 1.0D, 1.0D); var23.addVertexWithUV(-var12, 150.0D, var12, 0.0D, 1.0D); var23.draw(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glDisable(GL11.GL_BLEND); // EARTH: var12 = 50.0F; final float earthRotation = (float) (world.getSpawnPoint().posZ - mc.thePlayer.posZ) * 0.01F; GL11.glScalef(0.6F, 0.6F, 0.6F); GL11.glRotatef(earthRotation, 1.0F, 0.0F, 0.0F); GL11.glRotatef(200F, 1.0F, 0.0F, 0.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1F); FMLClientHandler.instance().getClient().renderEngine.bindTexture(SkyRendererMoon.earthTexture); world.getMoonPhase(); var23.startDrawingQuads(); var23.addVertexWithUV(-var12, -400.0D, var12, 0, 1); var23.addVertexWithUV(var12, -400.0D, var12, 1, 1); var23.addVertexWithUV(var12, -400.0D, -var12, 1, 0); var23.addVertexWithUV(-var12, -400.0D, -var12, 0, 0); var23.draw(); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_FOG); GL11.glPopMatrix(); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glColor3f(0.0F, 0.0F, 0.0F); final double var25 = mc.thePlayer.getPosition(partialTicks).yCoord - world.getHorizon(); if (var25 < 0.0D) { GL11.glPushMatrix(); GL11.glTranslatef(0.0F, 12.0F, 0.0F); GL11.glCallList(this.glSkyList2); GL11.glPopMatrix(); var10 = 1.0F; var11 = -((float) (var25 + 65.0D)); var12 = -var10; var23.startDrawingQuads(); var23.setColorRGBA_I(0, 255); var23.addVertex(-var10, var11, var10); var23.addVertex(var10, var11, var10); var23.addVertex(var10, var12, var10); var23.addVertex(-var10, var12, var10); var23.addVertex(-var10, var12, -var10); var23.addVertex(var10, var12, -var10); var23.addVertex(var10, var11, -var10); var23.addVertex(-var10, var11, -var10); var23.addVertex(var10, var12, -var10); var23.addVertex(var10, var12, var10); var23.addVertex(var10, var11, var10); var23.addVertex(var10, var11, -var10); var23.addVertex(-var10, var11, -var10); var23.addVertex(-var10, var11, var10); var23.addVertex(-var10, var12, var10); var23.addVertex(-var10, var12, -var10); var23.addVertex(-var10, var12, -var10); var23.addVertex(-var10, var12, var10); var23.addVertex(var10, var12, var10); var23.addVertex(var10, var12, -var10); var23.draw(); } GL11.glColor3f(70F / 256F, 70F / 256F, 70F / 256F); GL11.glPushMatrix(); GL11.glTranslatef(0.0F, -((float) (var25 - 16.0D)), 0.0F); GL11.glCallList(this.glSkyList2); GL11.glPopMatrix(); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glDepthMask(true); }
From source file:com.rvantwisk.cnctools.controls.opengl.BeadActor.java
License:Open Source License
@Override public void draw() { GL11.glCallList(display_list); }
From source file:com.sriramramani.droid.inspector.ui.InspectorCanvas.java
License:Mozilla Public License
private void drawHierarchy(Node node) { if (node == null || node.bounds.width == 0 || node.bounds.height == 0 || !node.isShowing() || !node.isVisible()) {//from ww w . j a va 2 s . co m return; } // Give a 3d depth. GL11.glPushMatrix(); final float depth = node.depth * mDepth; // Node's translation. GL11.glTranslatef(node.bounds.x, -node.bounds.y, depth); final Drawable background = node.getBackground(); final Drawable content = node.getContent(); final boolean hasBackground = node.isBackgroundShown && (background.displayListId != -1); final boolean hasContent = node.isContentShown && (content.displayListId != -1); if (mIsPicking) { GL11.glColor4f(node.pickColor[0], node.pickColor[1], node.pickColor[2], node.pickColor[3]); drawFrontFace(node, 0.0f, GL11.GL_FILL); // Draw the depth, only if we show in actual mode. // If not, if we are splitting content, draw a layer for it. if (mShowDepth) { drawDepth(node, -mDepth, GL11.GL_FILL); } else if (mSplitContent && hasBackground && hasContent) { drawFrontFace(node, -mDepth / 2.0f, GL11.GL_FILL); } } else { if (!mIsOrtho && mShowDepth) { GL11.glPushAttrib(GL11.GL_STENCIL_BUFFER_BIT); GL11.glStencilOp(GL11.GL_KEEP, GL11.GL_KEEP, GL11.GL_KEEP); drawDepthCube(node, depth); GL11.glPopAttrib(); } if (hasBackground && hasContent) { // Both background and content are available. // Draw background at a depth if needed. if (mSplitContent) GL11.glTranslatef(0.0f, 0.0f, -mDepth / 2.0f); GL11.glCallList(background.displayListId); if (mSplitContent) GL11.glTranslatef(0.0f, 0.0f, mDepth / 2.0f); GL11.glCallList(content.displayListId); } else if (hasBackground) { GL11.glCallList(background.displayListId); } else if (hasContent) { GL11.glCallList(content.displayListId); } // Stencil shouldn't know about bounds. GL11.glPushAttrib(GL11.GL_STENCIL_BUFFER_BIT | GL11.GL_LINE_BIT); GL11.glStencilOp(GL11.GL_KEEP, GL11.GL_KEEP, GL11.GL_KEEP); // Show bounds. if (!mIsOrtho && mShowDepth) { loadColor(ColorType.BOUNDS_NORMAL); } else { if (node.isSelected) { GL11.glLineWidth(2.0f); loadColor(ColorType.BOUNDS_SELECTION); } else { loadColor(ColorType.BOUNDS_NORMAL); } } if (node.isSelected || !mIsOrtho || mShowBounds) { drawFrontFace(node, 0.0f, GL11.GL_LINE); } // Show a bounding box for split content in perspective mode. if (!mIsOrtho && !mShowDepth && mSplitContent && hasBackground && hasContent) { drawFrontFace(node, -mDepth / 2.0f, GL11.GL_LINE); } GL11.glPopAttrib(); } for (Node child : node.children) { drawHierarchy(child); } GL11.glPopMatrix(); }
From source file:com.yogpc.qp.client.RenderRefinery.java
License:Open Source License
private void renderFluid(final FluidStack liquid, final float tx, final float ty, final float tz, final float buf) { if (liquid != null && liquid.amount > 0) { final int[] list = getFluidDisplayLists(liquid); if (list != null) { if (tx != 0 || ty != 0 || tz != 0) { GL11.glPushMatrix();//from w ww.ja v a2 s . c om GL11.glTranslatef(tx, ty, tz); } bindTexture(TextureMap.locationBlocksTexture); setColor(liquid.getFluid().getColor(liquid)); GL11.glCallList(list[(int) (liquid.amount / buf * 99)]); if (tx != 0 || ty != 0 || tz != 0) GL11.glPopMatrix(); } } }
From source file:de.kitsunealex.projectx.client.render.RenderTruncatedIcosahedron.java
License:Open Source License
public void render(double size, Colour colourPent, Colour colourHex, EnumHedronTexture type) { GlStateManager.pushMatrix();/*from w ww . j a va 2s . c o m*/ GlStateManager.pushAttrib(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_LIGHT0); GL11.glDisable(GL11.GL_LIGHT1); Minecraft.getMinecraft().getTextureManager().bindTexture(type.getTexture()); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glScaled(size * 0.1D, size * 0.1D, size * 0.1D); colourPent.glColour(); GL11.glCallList(LIST_INDEX); colourHex.glColour(); GL11.glCallList(LIST_INDEX + 1); GL11.glScaled(1D / (size * 0.1D), 1D / (size * 0.1D), 1D / (size * 0.1D)); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHT1); GL11.glEnable(GL11.GL_LIGHT0); GL11.glDisable(GL11.GL_BLEND); GL11.glColor4f(1F, 1F, 1F, 1F); GlStateManager.popAttrib(); GlStateManager.popMatrix(); }