Example usage for org.lwjgl.opengl GL11 glLineWidth

List of usage examples for org.lwjgl.opengl GL11 glLineWidth

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL11 glLineWidth.

Prototype

public static void glLineWidth(@NativeType("GLfloat") float width) 

Source Link

Document

Sets the width of rasterized line segments.

Usage

From source file:com.darkcart.xdolf.util.RenderUtils.java

License:Open Source License

public static void drawESP(double d, double d1, double d2, double r, double b, double g) {
    GL11.glPushMatrix();/* www.  j  ava2s  . c om*/
    GL11.glEnable(3042);
    GL11.glBlendFunc(770, 771);
    GL11.glLineWidth(1.5F);
    GL11.glDisable(GL11.GL_LIGHTING);
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    GL11.glLineWidth(1.0F);
    GL11.glEnable(GL11.GL_LINE_SMOOTH);
    GL11.glDisable(2929);
    GL11.glDepthMask(false);
    GL11.glColor4d(r, g, b, 0.1825F);
    drawColorBox(new AxisAlignedBB(d, d1, d2, d + 1.0, d1 + 1.0, d2 + 1.0), 0F, 0F, 0F, 0F);
    GL11.glColor4d(0, 0, 0, 0.5);
    drawSelectionBoundingBox(new AxisAlignedBB(d, d1, d2, d + 1.0, d1 + 1.0, d2 + 1.0));
    GL11.glLineWidth(2.0F);
    GL11.glDisable(GL11.GL_LINE_SMOOTH);
    GL11.glEnable(GL11.GL_TEXTURE_2D);
    GL11.glEnable(GL11.GL_LIGHTING);
    GL11.glEnable(2929);
    GL11.glDepthMask(true);
    GL11.glDisable(3042);
    GL11.glPopMatrix();
}

From source file:com.darkcart.xdolf.util.RenderUtils.java

License:Open Source License

public static void drawChestESP(double d, double d1, double d2, double r, double b, double g, double length,
        double length2) {
    GL11.glPushMatrix();/*from w  w  w .j  a v a  2 s .  c  om*/
    GL11.glEnable(3042);
    GL11.glBlendFunc(770, 771);
    GL11.glLineWidth(1.5F);
    GL11.glDisable(GL11.GL_LIGHTING);
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    GL11.glLineWidth(1.0F);
    GL11.glEnable(GL11.GL_LINE_SMOOTH);
    GL11.glDisable(2929);
    GL11.glDepthMask(false);
    GL11.glColor4d(r, g, b, 0.15);
    drawColorBox(new AxisAlignedBB(d, d1, d2, d + length2, d1 + 1.0, d2 + length), 0F, 0F, 0F, 0F);
    GL11.glColor4d(0, 0, 0, 0.5);
    drawSelectionBoundingBox(new AxisAlignedBB(d, d1, d2, d + length2, d1 + 1.0, d2 + length));
    GL11.glLineWidth(2.0F);
    GL11.glDisable(GL11.GL_LINE_SMOOTH);
    GL11.glEnable(GL11.GL_TEXTURE_2D);
    GL11.glEnable(GL11.GL_LIGHTING);
    GL11.glEnable(2929);
    GL11.glDepthMask(true);
    GL11.glDisable(3042);
    GL11.glPopMatrix();
}

From source file:com.darkcart.xdolf.util.RenderUtils.java

License:Open Source License

public static void drawLogoutESP(double d, double d1, double d2, double r, double b, double g) {
    GL11.glPushMatrix();/*  w  w w.  j av  a 2  s  .com*/
    GL11.glEnable(3042);
    GL11.glBlendFunc(770, 771);
    GL11.glLineWidth(1.5F);
    GL11.glDisable(GL11.GL_LIGHTING);
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    GL11.glLineWidth(1.0F);
    GL11.glEnable(GL11.GL_LINE_SMOOTH);
    GL11.glDisable(2929);
    GL11.glDepthMask(false);
    GL11.glColor4d(r, g, b, 0.1825F);
    drawBoundingBox(new AxisAlignedBB(d, d1, d2, d + 1.0, d1 + 2.0, d2 + 1.0));
    GL11.glColor4d(r, g, b, 1.0F);
    drawOutlinedBoundingBox(new AxisAlignedBB(d, d1, d2, d + 1.0, d1 + 2.0, d2 + 1.0));
    GL11.glLineWidth(2.0F);
    GL11.glDisable(GL11.GL_LINE_SMOOTH);
    GL11.glEnable(GL11.GL_TEXTURE_2D);
    GL11.glEnable(GL11.GL_LIGHTING);
    GL11.glEnable(2929);
    GL11.glDepthMask(true);
    GL11.glDisable(3042);
    GL11.glPopMatrix();
}

From source file:com.darkcart.xdolf.util.RenderUtils.java

License:Open Source License

public static void drawLogoutSpotTracer(LogoutSpot l) {
    try {//from   ww  w.  j av a  2  s.  c om
        GL11.glPushMatrix();
        GL11.glEnable(GL11.GL_LINE_SMOOTH);
        GL11.glDisable(GL11.GL_LIGHTING);
        GL11.glDisable(GL11.GL_DEPTH_TEST);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glDisable(GL11.GL_TEXTURE_2D);
        GL11.glDepthMask(false);
        GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
        GL11.glEnable(GL11.GL_BLEND);
        GL11.glLineWidth(1.5F);

        GL11.glColor3d(l.red, l.green, l.blue);
        GL11.glBegin(GL11.GL_LINE_LOOP);
        GL11.glVertex3d(0, 0, 0);
        GL11.glVertex3d(l.dX + 0.5, l.dY + 0.5, l.dZ + 0.5);
        GL11.glEnd();

        GL11.glDisable(GL11.GL_BLEND);
        GL11.glDepthMask(true);
        GL11.glEnable(GL11.GL_TEXTURE_2D);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        GL11.glEnable(GL11.GL_LIGHTING);
        GL11.glDisable(GL11.GL_LINE_SMOOTH);
        GL11.glPopMatrix();
    } catch (Exception e) {
    }
}

From source file:com.darkcart.xdolf.util.RenderUtils.java

License:Open Source License

public static void drawWayPointTracer(Waypoint w) {
    try {//from  www .  j ava 2s  . c om
        GL11.glPushMatrix();
        GL11.glEnable(GL11.GL_LINE_SMOOTH);
        GL11.glDisable(GL11.GL_LIGHTING);
        GL11.glDisable(GL11.GL_DEPTH_TEST);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glDisable(GL11.GL_TEXTURE_2D);
        GL11.glDepthMask(false);
        GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
        GL11.glEnable(GL11.GL_BLEND);
        GL11.glLineWidth(1.5F);
        GL11.glColor3d(w.red, w.green, w.blue);
        GL11.glBegin(GL11.GL_LINE_LOOP);
        Vec3d eyes = new Vec3d(0, 0, 1).rotatePitch(-(float) Math.toRadians(Wrapper.getPlayer().rotationPitch))
                .rotateYaw(-(float) Math.toRadians(Wrapper.getPlayer().rotationYaw));

        GL11.glVertex3d(eyes.xCoord, Wrapper.getPlayer().getEyeHeight() + eyes.yCoord, eyes.zCoord);
        GL11.glVertex3d(w.dX + 0.5, w.dY + 0.5, w.dZ + 0.5);
        GL11.glEnd();

        GL11.glDisable(GL11.GL_BLEND);
        GL11.glDepthMask(true);
        GL11.glEnable(GL11.GL_TEXTURE_2D);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        GL11.glEnable(GL11.GL_LIGHTING);
        GL11.glDisable(GL11.GL_LINE_SMOOTH);
        GL11.glPopMatrix();
    } catch (Exception e) {
    }
}

From source file:com.darkcart.xdolf.util.RenderUtils.java

License:Open Source License

public static void drawEntityESP(Entity entity, Color c) {
    GL11.glPushMatrix();/*from   w  ww  .j a va 2s  .  c  o m*/
    GL11.glBlendFunc(770, 771);
    GL11.glEnable(GL_BLEND);
    GL11.glLineWidth(1.0F);
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    GL11.glDisable(GL_DEPTH_TEST);
    GL11.glDepthMask(false);
    GL11.glColor4d(c.getRed() / 255f, c.getGreen() / 255f, c.getBlue() / 255f, 0.15F);
    RenderManager renderManager = Minecraft.getMinecraft().getRenderManager();
    drawColorBox(
            new AxisAlignedBB(
                    entity.boundingBox.minX - 0.05 - entity.posX + (entity.posX - renderManager.renderPosX),
                    entity.boundingBox.minY - entity.posY + (entity.posY - renderManager.renderPosY),
                    entity.boundingBox.minZ - 0.05 - entity.posZ + (entity.posZ - renderManager.renderPosZ),
                    entity.boundingBox.maxX + 0.05 - entity.posX + (entity.posX - renderManager.renderPosX),
                    entity.boundingBox.maxY + 0.1 - entity.posY + (entity.posY - renderManager.renderPosY),
                    entity.boundingBox.maxZ + 0.05 - entity.posZ + (entity.posZ - renderManager.renderPosZ)),
            0F, 0F, 0F, 0F);
    GL11.glColor4d(0, 0, 0, 0.5);
    drawSelectionBoundingBox(new AxisAlignedBB(
            entity.boundingBox.minX - 0.05 - entity.posX + (entity.posX - renderManager.renderPosX),
            entity.boundingBox.minY - entity.posY + (entity.posY - renderManager.renderPosY),
            entity.boundingBox.minZ - 0.05 - entity.posZ + (entity.posZ - renderManager.renderPosZ),
            entity.boundingBox.maxX + 0.05 - entity.posX + (entity.posX - renderManager.renderPosX),
            entity.boundingBox.maxY + 0.1 - entity.posY + (entity.posY - renderManager.renderPosY),
            entity.boundingBox.maxZ + 0.05 - entity.posZ + (entity.posZ - renderManager.renderPosZ)));
    GL11.glLineWidth(2.0F);
    GL11.glEnable(GL11.GL_TEXTURE_2D);
    GL11.glEnable(GL_DEPTH_TEST);
    GL11.glDepthMask(true);
    GL11.glDisable(GL_BLEND);
    GL11.glPopMatrix();
}

From source file:com.darkcart.xdolf.util.RenderUtils.java

License:Open Source License

public static void drawPlayerESP(double d, double d1, double d2, EntityPlayer ep, double e, double f) {
    if (!(ep instanceof EntityPlayerSP)) {
        GL11.glPushMatrix();/*from  w w  w. ja v a  2  s  .  c om*/
        GL11.glEnable(3042);
        if (Wrapper.getFriends().isFriend(ep.getName())) {
            GL11.glColor4f(0.0F, 1F, 0.0F, 0.15F);
        } else {
            GL11.glColor4f(0.7F, 0.0F, 0.0F, 0.15F);
        }
        GL11.glPushMatrix();
        GL11.glDisable(GL11.GL_TEXTURE_2D);
        GL11.glDisable(GL11.GL_LIGHTING);
        GL11.glDisable(GL11.GL_DEPTH_TEST);
        GL11.glDepthMask(false);
        GL11.glLineWidth(1.0F);
        GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
        GL11.glEnable(GL11.GL_LINE_SMOOTH);
        drawBoundingBox(new AxisAlignedBB(d - f, d1 + 0.1, d2 - f, d + f, d1 + e + 0.25, d2 + f));
        if (Wrapper.getFriends().isFriend(ep.getName())) {
            GL11.glColor4f(0.0F, 1F, 0.0F, 1F);
        } else {
            GL11.glColor4f(0.7F, 0.0F, 0.0F, 1F);
        }
        drawOutlinedBoundingBox(new AxisAlignedBB(d - f, d1 + 0.1, d2 - f, d + f, d1 + e + 0.25, d2 + f));
        GL11.glDepthMask(true);
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        GL11.glEnable(GL11.GL_TEXTURE_2D);
        GL11.glEnable(GL11.GL_LIGHTING);
        GL11.glDisable(GL11.GL_LINE_SMOOTH);
        GL11.glDisable(3042);
        GL11.glPopMatrix();
    }
}

From source file:com.golden.gamedev.engine.lwjgl.LWJGLGraphics.java

License:Open Source License

public void drawLine(int x1, int y1, int x2, int y2) {
    GL11.glDisable(GL11.GL_TEXTURE_2D);//from  ww  w.ja  v  a 2 s . co  m

    GL11.glColor4f((float) this.color.getRed() / 255f, (float) this.color.getGreen() / 255f,
            (float) this.color.getBlue() / 255f, (float) this.color.getAlpha() / 255f);
    GL11.glLineWidth(1.0f);

    GL11.glBegin(GL11.GL_LINES);
    GL11.glVertex2f(x1, y1);
    GL11.glVertex2f(x2, y2);
    GL11.glEnd();

    GL11.glColor3f(1.0f, 1.0f, 1.0f);

    GL11.glEnable(GL11.GL_TEXTURE_2D);
}

From source file:com.golden.gamedev.engine.lwjgl.LWJGLGraphics.java

License:Open Source License

private void drawRect(int x, int y, int width, int height, int type, Color col) {
    GL11.glDisable(GL11.GL_TEXTURE_2D);//  w w  w  .  j a v  a 2s  .  c  om

    GL11.glColor4f((float) col.getRed() / 255f, (float) col.getGreen() / 255f, (float) col.getBlue() / 255f,
            (float) col.getAlpha() / 255f);
    GL11.glLineWidth(1.0f);

    GL11.glBegin(type);
    GL11.glVertex2f(x, y);
    GL11.glVertex2f(x + width, y);
    GL11.glVertex2f(x + width, y + height);
    GL11.glVertex2f(x, y + height);
    GL11.glEnd();

    GL11.glColor3f(1.0f, 1.0f, 1.0f);

    GL11.glEnable(GL11.GL_TEXTURE_2D);
}

From source file:com.irr310.i3d.scene.I3dEye3DCamera.java

License:Open Source License

private void displayTarget() {

    GL11.glColor4f(1.0f, 0.5f, 0.5f, 0.8f);
    GL11.glLineWidth(1.2f);
    GL11.glBegin(GL11.GL_LINES);//ww w  .  j  av  a 2 s .c om
    {

        GL11.glColor4f(1.0f, 0.0f, 0.0f, 0.8f);
        GL11.glVertex3d(-1, 0, 0);
        GL11.glVertex3d(1, 0, 0);

        GL11.glVertex3d(0.9, 0.1, 0);
        GL11.glVertex3d(1, 0, 0);

        GL11.glVertex3d(0.9, -0.1, 0);
        GL11.glVertex3d(1, 0, 0);

        // y
        GL11.glColor4f(0.0f, 1.0f, 0.0f, 0.8f);
        GL11.glVertex3d(0, -1, 0);
        GL11.glVertex3d(0, 1, 0);

        GL11.glVertex3d(0.1, 0.9, 0);
        GL11.glVertex3d(0, 1, 0);

        GL11.glVertex3d(-0.1, 0.9, 0);
        GL11.glVertex3d(0, 1, 0);

        // z
        GL11.glColor4f(0.0f, 0.0f, 1.0f, 0.8f);
        GL11.glVertex3d(0, 0, -1);
        GL11.glVertex3d(0, 0, 1);

        GL11.glVertex3d(0.1, 0, 0.9);
        GL11.glVertex3d(0, 0, 1);

        GL11.glVertex3d(-0.1, 0, 0.9);
        GL11.glVertex3d(0, 0, 1);

    }
    GL11.glEnd();

    GL11.glPointSize(1.2f);
    GL11.glBegin(GL11.GL_POINTS);
    {
        GL11.glVertex3d(position.x, position.y, position.z);

    }
    GL11.glEnd();

}