List of usage examples for org.lwjgl.opengl GL11 glEnable
public static void glEnable(@NativeType("GLenum") int target)
From source file:boilerplate.client.renderers.block.BlockTESRRenderer.java
License:Minecraft Mod Public
@Override public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); GL11.glTranslatef(-0.5F, -0.5F, -0.5F); TileEntityRendererDispatcher.instance.renderTileEntityAt(this.tile, 0.0D, 0.0D, 0.0D, 0.0F); GL11.glEnable(32826); }
From source file:boilerplate.client.renderers.block.RenderMinedBlock.java
License:Minecraft Mod Public
public void doRender(EntityMinedBlock entBlock, double posX, double posY, double posZ, float f, float renderTick) { World world = entBlock.getWorldObj(); Block block = entBlock.getBlock();//from w w w .ja v a 2 s . c o m MathHelper.floor_double(entBlock.posX); MathHelper.floor_double(entBlock.posY); MathHelper.floor_double(entBlock.posZ); GL11.glDisable(GL11.GL_LIGHTING); GL11.glPushMatrix(); GL11.glTranslatef((float) posX, (float) posY, (float) posZ); this.bindEntityTexture(entBlock); float scale = entBlock.scale; float rot = world.getWorldTime() * 17.6F; GL11.glScalef(scale, scale, scale); if (entBlock.doesRotate) GL11.glRotatef(rot, 0 - world.rand.nextFloat(), 0 - world.rand.nextFloat(), 0 - world.rand.nextFloat()); this.blockRenderer.blockAccess = entBlock.worldObj; this.blockRenderer.useInventoryTint = true; this.blockRenderer.setRenderBoundsFromBlock(block); this.blockRenderer.renderBlockAsItem(block, entBlock.metadata, 1.0F); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); }
From source file:br.org.archimedes.gui.opengl.OpenGLWrapper.java
License:Open Source License
/** * Sets the line style/*from w ww . j a va 2s .c o m*/ * * @param lineStyle * The line style */ public void setLineStyle(int lineStyle) { if (lineStyle == CONTINUOUS_LINE) { GL11.glDisable(GL11.GL_LINE_STIPPLE); } else { GL11.glEnable(GL11.GL_LINE_STIPPLE); GL11.glLineStipple(2, (short) 0xAAAA); } }
From source file:buildcraft.builders.render.RenderArchitect.java
License:Minecraft Mod Public
@Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { super.renderTileEntityAt(tileentity, x, y, z, f); TileArchitect architect = (TileArchitect) tileentity; GL11.glPushMatrix();//ww w . j a va2 s . c o m GL11.glPushAttrib(GL11.GL_ENABLE_BIT); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glTranslated(x, y, z); GL11.glTranslated(-tileentity.xCoord, -tileentity.yCoord, -tileentity.zCoord); for (LaserData laser : architect.subLasers) { if (laser != null) { GL11.glPushMatrix(); RenderLaser.doRenderLaserWave(TileEntityRendererDispatcher.instance.field_147553_e, laser, EntityLaser.LASER_TEXTURES[3]); GL11.glPopMatrix(); } } GL11.glPopAttrib(); GL11.glPopMatrix(); }
From source file:buildcraft.builders.render.RenderConstructionMarker.java
License:Minecraft Mod Public
@Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { super.renderTileEntityAt(tileentity, x, y, z, f); TileConstructionMarker marker = (TileConstructionMarker) tileentity; GL11.glPushMatrix();/*from w w w . j a va2 s .com*/ GL11.glPushAttrib(GL11.GL_ENABLE_BIT); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glTranslated(x, y, z); GL11.glTranslated(-tileentity.xCoord, -tileentity.yCoord, -tileentity.zCoord); if (marker.laser != null) { GL11.glPushMatrix(); RenderLaser.doRenderLaser(TileEntityRendererDispatcher.instance.field_147553_e, marker.laser, EntityLaser.LASER_TEXTURES[4]); GL11.glPopMatrix(); } if (marker.itemBlueprint != null) { doRenderItem(marker.itemBlueprint, marker.xCoord + 0.5F, marker.yCoord + 0.2F, marker.zCoord + 0.5F); } //GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopAttrib(); GL11.glPopMatrix(); renderItems.render(tileentity, x, y, z); }
From source file:buildcraft.builders.RenderArchitect.java
License:Minecraft Mod Public
@Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { super.renderTileEntityAt(tileentity, x, y, z, f); TileArchitect architect = (TileArchitect) tileentity; if (architect != null) { GL11.glPushMatrix();//from www . j a va 2 s.c om GL11.glPushAttrib(GL11.GL_ENABLE_BIT); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glTranslated(x, y, z); GL11.glTranslated(-tileentity.xCoord, -tileentity.yCoord, -tileentity.zCoord); for (LaserData laser : architect.subLasers) { if (laser != null) { GL11.glPushMatrix(); RenderLaser.doRenderLaserWave(TileEntityRendererDispatcher.instance.field_147553_e, laser, EntityLaser.LASER_TEXTURES[3]); GL11.glPopMatrix(); } } GL11.glPopAttrib(); GL11.glPopMatrix(); } }
From source file:buildcraft.builders.RenderBuilder.java
License:Minecraft Mod Public
@Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { super.renderTileEntityAt(tileentity, x, y, z, f); TileAbstractBuilder builder = (TileAbstractBuilder) tileentity; if (builder != null) { GL11.glPushMatrix();/*from w w w. j a v a2 s . c o m*/ GL11.glPushAttrib(GL11.GL_ENABLE_BIT); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glTranslated(x, y, z); GL11.glTranslated(-tileentity.xCoord, -tileentity.yCoord, -tileentity.zCoord); if (builder.getPathLaser() != null) { for (LaserData laser : builder.getPathLaser()) { if (laser != null) { GL11.glPushMatrix(); RenderLaser.doRenderLaser(TileEntityRendererDispatcher.instance.field_147553_e, laser, EntityLaser.LASER_TEXTURES[4]); GL11.glPopMatrix(); } } } //GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopAttrib(); GL11.glPopMatrix(); } GL11.glPushMatrix(); GL11.glTranslated(x, y, z); GL11.glTranslated(-tileentity.xCoord, -tileentity.yCoord, -tileentity.zCoord); if (builder.getBuilders() != null) { for (BuildingItem i : builder.getBuilders()) { doRenderItem(i, 1.0F); } } GL11.glPopMatrix(); }
From source file:buildcraft.builders.RenderConstructionMarker.java
License:Minecraft Mod Public
@Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { super.renderTileEntityAt(tileentity, x, y, z, f); TileConstructionMarker marker = (TileConstructionMarker) tileentity; if (marker != null) { GL11.glPushMatrix();// w w w.j a v a 2 s. c o m GL11.glPushAttrib(GL11.GL_ENABLE_BIT); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glTranslated(x, y, z); GL11.glTranslated(-tileentity.xCoord, -tileentity.yCoord, -tileentity.zCoord); if (marker.laser != null) { GL11.glPushMatrix(); RenderLaser.doRenderLaser(TileEntityRendererDispatcher.instance.field_147553_e, marker.laser, EntityLaser.LASER_TEXTURES[4]); GL11.glPopMatrix(); } if (marker.itemBlueprint != null) { doRenderItem(marker.itemBlueprint, marker.xCoord + 0.5F, marker.yCoord + 0.2F, marker.zCoord + 0.5F); } //GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopAttrib(); GL11.glPopMatrix(); renderItems.render(tileentity, x, y, z); } }
From source file:buildcraft.builders.RenderPathMarker.java
License:Minecraft Mod Public
@Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { TilePathMarker marker = (TilePathMarker) tileentity; if (marker != null) { GL11.glPushMatrix();/*from w w w .ja va 2 s . co m*/ GL11.glPushAttrib(GL11.GL_ENABLE_BIT); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glTranslated(x, y, z); GL11.glTranslated(-tileentity.xCoord, -tileentity.yCoord, -tileentity.zCoord); for (LaserData laser : marker.lasers) { if (laser != null) { GL11.glPushMatrix(); RenderLaser.doRenderLaser(TileEntityRendererDispatcher.instance.field_147553_e, laser, EntityLaser.LASER_TEXTURES[3]); GL11.glPopMatrix(); } } //GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopAttrib(); GL11.glPopMatrix(); } }
From source file:buildcraft.builders.urbanism.RenderBoxProvider.java
License:Minecraft Mod Public
@Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { GL11.glPushMatrix();//from w w w. j a va2 s .com GL11.glPushAttrib(GL11.GL_ENABLE_BIT); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glPushMatrix(); GL11.glTranslated(-tileentity.xCoord, -tileentity.yCoord, -tileentity.zCoord); GL11.glTranslated(x, y, z); if (tileentity instanceof IBoxesProvider) { for (Box b : ((IBoxesProvider) tileentity).getBoxes()) { if (b.isVisible) { RenderBox.doRender(TileEntityRendererDispatcher.instance.field_147553_e, getTexture(b.kind), b); } } } else if (tileentity instanceof IBoxProvider) { Box b = ((IBoxProvider) tileentity).getBox(); if (b.isVisible) { RenderBox.doRender(TileEntityRendererDispatcher.instance.field_147553_e, getTexture(b.kind), b); } } GL11.glPopMatrix(); GL11.glPopAttrib(); GL11.glPopMatrix(); }