Java Code Examples for net.minecraft.client.renderer.GlStateManager#glLineWidth()

The following examples show how to use net.minecraft.client.renderer.GlStateManager#glLineWidth() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RenderUtil.java    From seppuku with GNU General Public License v3.0 6 votes vote down vote up
public static void drawPlane(AxisAlignedBB axisalignedbb, float width, int color) {
    GlStateManager.pushMatrix();
    GlStateManager.glLineWidth(width);
    GlStateManager.enableBlend();
    GlStateManager.disableDepth();
    GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE);
    GlStateManager.disableTexture2D();
    GlStateManager.depthMask(false);
    glEnable(GL_LINE_SMOOTH);
    glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
    drawPlane(axisalignedbb, color);
    glDisable(GL_LINE_SMOOTH);
    GlStateManager.depthMask(true);
    GlStateManager.enableDepth();
    GlStateManager.enableTexture2D();
    GlStateManager.disableBlend();
    GlStateManager.popMatrix();
}
 
Example 2
Source File: BuildersWandRenderer.java    From enderutilities with GNU Lesser General Public License v3.0 6 votes vote down vote up
private void renderBlockOutlines(Mode mode, EntityPlayer player, BlockPosEU posStart, BlockPosEU posEnd, float partialTicks)
{
    GlStateManager.glLineWidth(2.0f);
    float expand = mode == Mode.REPLACE ? 0.001f : 0f;

    for (int i = 0; i < this.positions.size(); i++)
    {
        BlockPosEU pos = this.positions.get(i);

        if (pos.equals(posStart) == false && pos.equals(posEnd) == false)
        {
            AxisAlignedBB aabb = createAABB(pos.getX(), pos.getY(), pos.getZ(), expand, partialTicks, player);
            RenderGlobal.drawSelectionBoundingBox(aabb, 1.0f, 1.0f, 1.0f, 1.0f);
        }
    }
}
 
Example 3
Source File: RulerRenderer.java    From enderutilities with GNU Lesser General Public License v3.0 6 votes vote down vote up
private void renderPositions(EntityPlayer clientPlayer, BlockPosEU posStart, BlockPosEU posEnd, int color, float partialTicks)
{
    GlStateManager.glLineWidth(2.0f);

    for (int a = 0; a < 3; a++)
    {
        List<BlockPosEU> column = this.positions.get(a);

        if (column != null)
        {
            final int size = column.size();

            for (int i = 0; i < size; i++)
            {
                BlockPosEU pos = column.get(i);
                //if (pos.equals(posStart) == false && (posEnd == null || posEnd.equals(pos) == false))
                {
                    AxisAlignedBB aabb = BuildersWandRenderer.createAABB(pos.getX(), pos.getY(), pos.getZ(), 0, partialTicks, clientPlayer);
                    RenderGlobal.drawSelectionBoundingBox(aabb, ((color >>> 16) & 0xFF) / 255f, ((color >>> 8) & 0xFF) / 255f, (color & 0xFF) / 255f, 1.0f);
                }
            }
        }
    }
}
 
Example 4
Source File: WrenchOverlayRenderer.java    From GregTech with GNU Lesser General Public License v3.0 5 votes vote down vote up
@SubscribeEvent
public static void onDrawBlockHighlight(DrawBlockHighlightEvent event) {
    EntityPlayer player = event.getPlayer();
    World world = player.world;
    RayTraceResult target = event.getTarget();

    if (target.typeOfHit != RayTraceResult.Type.BLOCK) {
        return; //magically, draw block highlight is called not only for blocks (see forge issues)
    }

    BlockPos pos = target.getBlockPos();
    IBlockState blockState = world.getBlockState(pos);
    TileEntity tileEntity = world.getTileEntity(pos);
    ItemStack heldItem = player.getHeldItem(EnumHand.MAIN_HAND);

    if (tileEntity != null && shouldDrawOverlayForItem(heldItem, tileEntity) && useGridForRayTraceResult(target)) {
        EnumFacing facing = target.sideHit;
        GlStateManager.enableBlend();
        GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
        GlStateManager.glLineWidth(2.0F);
        GlStateManager.disableTexture2D();
        GlStateManager.depthMask(false);

        if (world.getWorldBorder().contains(pos)) {
            double d3 = player.lastTickPosX + (player.posX - player.lastTickPosX) * (double) event.getPartialTicks();
            double d4 = player.lastTickPosY + (player.posY - player.lastTickPosY) * (double) event.getPartialTicks();
            double d5 = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * (double) event.getPartialTicks();
            AxisAlignedBB box = blockState.getSelectedBoundingBox(world, pos).grow(0.002D).offset(-d3, -d4, -d5);
            RenderGlobal.drawSelectionBoundingBox(box, 0.0F, 0.0F, 0.0F, 0.4F);
            drawOverlayLines(facing, box);
        }

        GlStateManager.depthMask(true);
        GlStateManager.enableTexture2D();
        GlStateManager.disableBlend();

        event.setCanceled(true);
    }
}
 
Example 5
Source File: RenderUtils.java    From litematica with GNU Lesser General Public License v3.0 5 votes vote down vote up
public static void renderBlockOutline(BlockPos pos, float expand, float lineWidth,
        Color4f color, Entity renderViewEntity, float partialTicks)
{
    GlStateManager.glLineWidth(lineWidth);

    AxisAlignedBB aabb = createAABB(pos.getX(), pos.getY(), pos.getZ(), expand, partialTicks, renderViewEntity);
    RenderGlobal.drawSelectionBoundingBox(aabb, color.r, color.g, color.b, color.a);
}
 
Example 6
Source File: RenderUtils.java    From litematica with GNU Lesser General Public License v3.0 5 votes vote down vote up
public static void renderAreaOutline(BlockPos pos1, BlockPos pos2, float lineWidth,
        Color4f colorX, Color4f colorY, Color4f colorZ, Entity renderViewEntity, float partialTicks)
{
    GlStateManager.glLineWidth(lineWidth);

    AxisAlignedBB aabb = createEnclosingAABB(pos1, pos2, renderViewEntity, partialTicks);
    drawBoundingBoxEdges(aabb, colorX, colorY, colorZ);
}
 
Example 7
Source File: LitematicaRenderer.java    From litematica with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void renderSchematicOverlay()
{
    boolean invert = Hotkeys.INVERT_OVERLAY_RENDER_STATE.getKeybind().isKeybindHeld();

    if (Configs.Visuals.ENABLE_SCHEMATIC_OVERLAY.getBooleanValue() != invert)
    {
        boolean renderThrough = Configs.Visuals.SCHEMATIC_OVERLAY_RENDER_THROUGH.getBooleanValue() || Hotkeys.RENDER_OVERLAY_THROUGH_BLOCKS.getKeybind().isKeybindHeld();
        float lineWidth = (float) (renderThrough ? Configs.Visuals.SCHEMATIC_OVERLAY_OUTLINE_WIDTH_THROUGH.getDoubleValue() : Configs.Visuals.SCHEMATIC_OVERLAY_OUTLINE_WIDTH.getDoubleValue());

        GlStateManager.pushMatrix();
        GlStateManager.disableTexture2D();
        GlStateManager.disableCull();
        GlStateManager.alphaFunc(GL11.GL_GREATER, 0.001F);
        GlStateManager.enablePolygonOffset();
        GlStateManager.doPolygonOffset(-0.4f, -0.8f);
        fi.dy.masa.malilib.render.RenderUtils.setupBlend();
        GlStateManager.glLineWidth(lineWidth);
        fi.dy.masa.malilib.render.RenderUtils.color(1f, 1f, 1f, 1f);
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240, 240);

        if (renderThrough)
        {
            GlStateManager.disableDepth();
        }

        this.getWorldRenderer().renderBlockOverlays();

        GlStateManager.enableDepth();
        GlStateManager.doPolygonOffset(0f, 0f);
        GlStateManager.disablePolygonOffset();
        GlStateManager.enableTexture2D();
        GlStateManager.popMatrix();
    }
}
 
Example 8
Source File: BlockHighlightMod.java    From ForgeHax with MIT License 5 votes vote down vote up
@SubscribeEvent
public void onRenderBoxPre(DrawBlockBoundingBoxEvent.Pre event) {
  GlStateManager.disableDepth();
  GlStateManager.glLineWidth(width.get());
  event.alpha = toFloat(alpha.get());
  event.red = toFloat(red.get());
  event.green = toFloat(green.get());
  event.blue = toFloat(blue.get());
}
 
Example 9
Source File: RenderEventService.java    From ForgeHax with MIT License 5 votes vote down vote up
@SubscribeEvent
public void onRenderWorld(RenderWorldLastEvent event) {
  GlStateManager.pushMatrix();
  GlStateManager.disableTexture2D();
  GlStateManager.enableBlend();
  GlStateManager.disableAlpha();
  GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
  GlStateManager.shadeModel(GL11.GL_SMOOTH);
  GlStateManager.disableDepth();
  
  GlStateManager.glLineWidth(1.f);
  
  Vec3d renderPos = EntityUtils.getInterpolatedPos(getRenderEntity(), event.getPartialTicks());
  
  RenderEvent e = new RenderEvent(TESSELLATOR, renderPos, event.getPartialTicks());
  e.resetTranslation();
  MinecraftForge.EVENT_BUS.post(e);
  
  GlStateManager.glLineWidth(1.f);
  
  GlStateManager.shadeModel(GL11.GL_FLAT);
  GlStateManager.disableBlend();
  GlStateManager.enableAlpha();
  GlStateManager.enableTexture2D();
  GlStateManager.enableDepth();
  GlStateManager.enableCull();
  GlStateManager.popMatrix();
}
 
Example 10
Source File: MixinRenderGlobal.java    From Valkyrien-Skies with Apache License 2.0 5 votes vote down vote up
private void drawSelectionBoxOriginal(EntityPlayer player,
    RayTraceResult movingObjectPositionIn,
    int execute, float partialTicks) {
    if (execute == 0 && movingObjectPositionIn.typeOfHit == RayTraceResult.Type.BLOCK) {
        GlStateManager.enableBlend();
        GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA,
            GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE,
            GlStateManager.DestFactor.ZERO);
        GlStateManager.glLineWidth(2.0F);
        GlStateManager.disableTexture2D();
        GlStateManager.depthMask(false);
        BlockPos blockpos = movingObjectPositionIn.getBlockPos();
        IBlockState iblockstate = this.world.getBlockState(blockpos);

        if (iblockstate.getMaterial() != Material.AIR && this.world.getWorldBorder()
            .contains(blockpos)) {
            double d0 =
                player.lastTickPosX + (player.posX - player.lastTickPosX) * partialTicks;
            double d1 =
                player.lastTickPosY + (player.posY - player.lastTickPosY) * partialTicks;
            double d2 =
                player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * partialTicks;
            drawSelectionBoundingBox(iblockstate.getSelectedBoundingBox(this.world, blockpos)
                .grow(0.0020000000949949026D).offset(-d0, -d1, -d2), 0.0F, 0.0F, 0.0F, 0.4F);
        }

        GlStateManager.depthMask(true);
        GlStateManager.enableTexture2D();
        GlStateManager.disableBlend();
    }
}
 
Example 11
Source File: RenderUtils.java    From litematica with GNU Lesser General Public License v3.0 4 votes vote down vote up
public static void renderBlockOutlineOverlapping(BlockPos pos, float expand, float lineWidth,
        Color4f color1, Color4f color2, Color4f color3, Entity renderViewEntity, float partialTicks)
{
    final double dx = renderViewEntity.lastTickPosX + (renderViewEntity.posX - renderViewEntity.lastTickPosX) * partialTicks;
    final double dy = renderViewEntity.lastTickPosY + (renderViewEntity.posY - renderViewEntity.lastTickPosY) * partialTicks;
    final double dz = renderViewEntity.lastTickPosZ + (renderViewEntity.posZ - renderViewEntity.lastTickPosZ) * partialTicks;

    final double minX = pos.getX() - dx - expand;
    final double minY = pos.getY() - dy - expand;
    final double minZ = pos.getZ() - dz - expand;
    final double maxX = pos.getX() - dx + expand + 1;
    final double maxY = pos.getY() - dy + expand + 1;
    final double maxZ = pos.getZ() - dz + expand + 1;

    GlStateManager.glLineWidth(lineWidth);

    Tessellator tessellator = Tessellator.getInstance();
    BufferBuilder buffer = tessellator.getBuffer();
    buffer.begin(GL11.GL_LINES, DefaultVertexFormats.POSITION_COLOR);

    // Min corner
    buffer.pos(minX, minY, minZ).color(color1.r, color1.g, color1.b, color1.a).endVertex();
    buffer.pos(maxX, minY, minZ).color(color1.r, color1.g, color1.b, color1.a).endVertex();

    buffer.pos(minX, minY, minZ).color(color1.r, color1.g, color1.b, color1.a).endVertex();
    buffer.pos(minX, maxY, minZ).color(color1.r, color1.g, color1.b, color1.a).endVertex();

    buffer.pos(minX, minY, minZ).color(color1.r, color1.g, color1.b, color1.a).endVertex();
    buffer.pos(minX, minY, maxZ).color(color1.r, color1.g, color1.b, color1.a).endVertex();

    // Max corner
    buffer.pos(minX, maxY, maxZ).color(color2.r, color2.g, color2.b, color2.a).endVertex();
    buffer.pos(maxX, maxY, maxZ).color(color2.r, color2.g, color2.b, color2.a).endVertex();

    buffer.pos(maxX, minY, maxZ).color(color2.r, color2.g, color2.b, color2.a).endVertex();
    buffer.pos(maxX, maxY, maxZ).color(color2.r, color2.g, color2.b, color2.a).endVertex();

    buffer.pos(maxX, maxY, minZ).color(color2.r, color2.g, color2.b, color2.a).endVertex();
    buffer.pos(maxX, maxY, maxZ).color(color2.r, color2.g, color2.b, color2.a).endVertex();

    // The rest of the edges
    buffer.pos(minX, maxY, minZ).color(color3.r, color3.g, color3.b, color3.a).endVertex();
    buffer.pos(maxX, maxY, minZ).color(color3.r, color3.g, color3.b, color3.a).endVertex();

    buffer.pos(minX, minY, maxZ).color(color3.r, color3.g, color3.b, color3.a).endVertex();
    buffer.pos(maxX, minY, maxZ).color(color3.r, color3.g, color3.b, color3.a).endVertex();

    buffer.pos(maxX, minY, minZ).color(color3.r, color3.g, color3.b, color3.a).endVertex();
    buffer.pos(maxX, maxY, minZ).color(color3.r, color3.g, color3.b, color3.a).endVertex();

    buffer.pos(minX, minY, maxZ).color(color3.r, color3.g, color3.b, color3.a).endVertex();
    buffer.pos(minX, maxY, maxZ).color(color3.r, color3.g, color3.b, color3.a).endVertex();

    buffer.pos(maxX, minY, minZ).color(color3.r, color3.g, color3.b, color3.a).endVertex();
    buffer.pos(maxX, minY, maxZ).color(color3.r, color3.g, color3.b, color3.a).endVertex();

    buffer.pos(minX, maxY, minZ).color(color3.r, color3.g, color3.b, color3.a).endVertex();
    buffer.pos(minX, maxY, maxZ).color(color3.r, color3.g, color3.b, color3.a).endVertex();

    tessellator.draw();
}
 
Example 12
Source File: RenderUtils.java    From ForgeHax with MIT License 4 votes vote down vote up
public static void drawBox(
    Vec3d startPos, Vec3d endPos, int color, float width, boolean ignoreZ) {
  Tessellator tessellator = Tessellator.getInstance();
  BufferBuilder buffer = tessellator.getBuffer();
  
  Vec3d renderPos = EntityUtils.getInterpolatedPos(getLocalPlayer(), MC.getRenderPartialTicks());
  
  Vec3d min = startPos.subtract(renderPos);
  Vec3d max = endPos.subtract(renderPos);
  
  double minX = min.x, minY = min.y, minZ = min.z;
  double maxX = max.x, maxY = max.y, maxZ = max.z;
  
  float r = (float) (color >> 16 & 255) / 255.0F;
  float g = (float) (color >> 8 & 255) / 255.0F;
  float b = (float) (color & 255) / 255.0F;
  float a = (float) (color >> 24 & 255) / 255.0F;
  
  GlStateManager.pushMatrix();
  GlStateManager.disableTexture2D();
  GlStateManager.enableBlend();
  GlStateManager.disableAlpha();
  GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
  GlStateManager.shadeModel(GL11.GL_SMOOTH);
  GlStateManager.glLineWidth(width);
  
  if (ignoreZ) {
    GlStateManager.disableDepth();
  }
  
  GlStateManager.color(r, g, b, a);
  
  // GlStateManager.translate(startPos.xCoord, startPos.yCoord, startPos.zCoord);
  
  buffer.begin(GL11.GL_LINE_STRIP, DefaultVertexFormats.POSITION);
  buffer.pos(minX, minY, minZ).endVertex();
  buffer.pos(maxX, minY, minZ).endVertex();
  buffer.pos(maxX, minY, maxZ).endVertex();
  buffer.pos(minX, minY, maxZ).endVertex();
  buffer.pos(minX, minY, minZ).endVertex();
  tessellator.draw();
  buffer.begin(GL11.GL_LINE_STRIP, DefaultVertexFormats.POSITION);
  buffer.pos(minX, maxY, minZ).endVertex();
  buffer.pos(maxX, maxY, minZ).endVertex();
  buffer.pos(maxX, maxY, maxZ).endVertex();
  buffer.pos(minX, maxY, maxZ).endVertex();
  buffer.pos(minX, maxY, minZ).endVertex();
  tessellator.draw();
  buffer.begin(GL11.GL_LINES, DefaultVertexFormats.POSITION);
  buffer.pos(minX, minY, minZ).endVertex();
  buffer.pos(minX, maxY, minZ).endVertex();
  buffer.pos(maxX, minY, minZ).endVertex();
  buffer.pos(maxX, maxY, minZ).endVertex();
  buffer.pos(maxX, minY, maxZ).endVertex();
  buffer.pos(maxX, maxY, maxZ).endVertex();
  buffer.pos(minX, minY, maxZ).endVertex();
  buffer.pos(minX, maxY, maxZ).endVertex();
  tessellator.draw();
  
  GlStateManager.shadeModel(GL11.GL_FLAT);
  GlStateManager.disableBlend();
  GlStateManager.enableAlpha();
  GlStateManager.enableTexture2D();
  GlStateManager.enableDepth();
  GlStateManager.enableCull();
  GlStateManager.popMatrix();
}
 
Example 13
Source File: BuildersWandRenderer.java    From enderutilities with GNU Lesser General Public License v3.0 4 votes vote down vote up
private void renderStackedArea(Area3D area, EntityPlayer player, BlockPosEU posStart, BlockPosEU posEnd, float partialTicks)
{
    if (posStart == null || posEnd == null)
    {
        return;
    }

    int xp = area.getXPos();
    int yp = area.getYPos();
    int zp = area.getZPos();
    int xn = area.getXNeg();
    int yn = area.getYNeg();
    int zn = area.getZNeg();
    int sx = Math.abs(posEnd.getX() - posStart.getX()) + 1;
    int sy = Math.abs(posEnd.getY() - posStart.getY()) + 1;
    int sz = Math.abs(posEnd.getZ() - posStart.getZ()) + 1;
    AxisAlignedBB originalBox = createEnclosingAABB(posStart, posEnd, player, partialTicks);

    GlStateManager.glLineWidth(2.0f);

    // Non-empty area on at least one axis
    if ((xp + xn + yp + yn + zp + zn) != 0)
    {
        for (int y = -yn; y <= yp; y++)
        {
            for (int x = -xn; x <= xp; x++)
            {
                for (int z = -zn; z <= zp; z++)
                {
                    AxisAlignedBB aabb = originalBox.offset(x * sx, y * sy, z * sz);

                    if (x != 0 || y != 0 || z != 0)
                    {
                        RenderGlobal.drawSelectionBoundingBox(aabb, 1f, 1f, 1f, 0xCC / 255f);
                    }
                    else
                    {
                        RenderGlobal.drawSelectionBoundingBox(aabb, 0.5f, 1f, 0.5f, 0xCC / 255f);
                    }
                }
            }
        }
    }
}
 
Example 14
Source File: RenderUtils.java    From enderutilities with GNU Lesser General Public License v3.0 4 votes vote down vote up
public static void renderEntityDebugBoundingBox(Entity entityIn, float partialTicks, boolean renderLook, boolean renderEyeHeight)
{
    Entity renderViewEntity = Minecraft.getMinecraft().getRenderViewEntity();
    double x = entityIn.lastTickPosX + (entityIn.posX - entityIn.lastTickPosX) * (double)partialTicks;
    double y = entityIn.lastTickPosY + (entityIn.posY - entityIn.lastTickPosY) * (double)partialTicks;
    double z = entityIn.lastTickPosZ + (entityIn.posZ - entityIn.lastTickPosZ) * (double)partialTicks;
    x -= renderViewEntity.lastTickPosX + (renderViewEntity.posX - renderViewEntity.lastTickPosX) * (double)partialTicks;
    y -= renderViewEntity.lastTickPosY + (renderViewEntity.posY - renderViewEntity.lastTickPosY) * (double)partialTicks;
    z -= renderViewEntity.lastTickPosZ + (renderViewEntity.posZ - renderViewEntity.lastTickPosZ) * (double)partialTicks;

    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    GlStateManager.depthMask(false);
    GlStateManager.disableTexture2D();
    GlStateManager.disableLighting();
    GlStateManager.disableCull();
    GlStateManager.disableBlend();
    GlStateManager.glLineWidth(1.0F);

    double entityRadius = entityIn.width / 2.0D;
    AxisAlignedBB bb = entityIn.getEntityBoundingBox();

    RenderGlobal.drawBoundingBox(bb.minX - entityIn.posX + x,
                                 bb.minY - entityIn.posY + y,
                                 bb.minZ - entityIn.posZ + z,
                                 bb.maxX - entityIn.posX + x,
                                 bb.maxY - entityIn.posY + y,
                                 bb.maxZ - entityIn.posZ + z,
                                 1.0F, 1.0F, 1.0F, 1.0F);

    if (renderEyeHeight && entityIn instanceof EntityLivingBase)
    {
        RenderGlobal.drawBoundingBox(x - entityRadius,
                                     y + entityIn.getEyeHeight() - 0.01D,
                                     z - entityRadius,
                                     x + entityRadius,
                                     y + entityIn.getEyeHeight() + 0.01D,
                                     z + entityRadius, 1.0F, 0.0F, 0.0F, 1.0F);
    }

    if (renderLook)
    {
        Tessellator tessellator = Tessellator.getInstance();
        BufferBuilder vertexbuffer = tessellator.getBuffer();
        Vec3d look = entityIn.getLook(partialTicks);
        vertexbuffer.begin(3, DefaultVertexFormats.POSITION_COLOR);
        vertexbuffer.pos(x, y + entityIn.getEyeHeight(), z).color(0, 0, 255, 255).endVertex();
        vertexbuffer.pos(x + look.x * 2.0D, y + entityIn.getEyeHeight() + look.y * 2.0D, z + look.z * 2.0D).color(0, 0, 255, 255).endVertex();
        tessellator.draw();
    }

    GlStateManager.enableTexture2D();
    GlStateManager.enableLighting();
    GlStateManager.enableCull();
    GlStateManager.disableBlend();
    GlStateManager.depthMask(true);
}