List of usage examples for org.lwjgl.opengl GL11 glColor3d
public static native void glColor3d(@NativeType("GLdouble") double red, @NativeType("GLdouble") double green, @NativeType("GLdouble") double blue);
From source file:br.org.archimedes.gui.opengl.OpenGLWrapper.java
License:Open Source License
/** * Changes the current color used to draw. * //from w w w . ja va2 s.co m * @param color * The color. */ public void setColor(Color color) { GL11.glColor3d(color.getR(), color.getG(), color.getB()); }
From source file:ccm.pay2spawn.util.Helper.java
License:Open Source License
public static void renderPoint(PointI p, Tessellator tess, double r, double g, double b) { GL11.glColor3d(r, g, b); renderPoint(p, tess);// w ww .jav a 2 s . c o m }
From source file:cn.liutils.util.RenderUtils.java
License:Open Source License
public static void bindColor(Vec3 cv) { GL11.glColor3d(cv.xCoord, cv.yCoord, cv.zCoord); }
From source file:cn.liutils.util.RenderUtils.java
License:Open Source License
public static void bindGray(double s) { GL11.glColor3d(s, s, s); }
From source file:com.darkcart.xdolf.util.RenderUtils.java
License:Open Source License
public static void drawLogoutSpotTracer(LogoutSpot l) { try {/*from w ww . ja v a 2s . co m*/ 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 w ww . j a va2s. co m 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.farincorporated.frameutils.client.rendering.FrameTranslaterRenderer.java
@Override public void renderTileEntityAt(TileEntity ti, double x, double y, double z, float timesincelasttick) { TileFrameTranslater tile = (TileFrameTranslater) ti; ResourceLocation framemap = super.getFrame(tile.getMaterialType()); GL11.glDisable(GL11.GL_CULL_FACE);/*from w w w . ja v a 2s .c o m*/ GL11.glColor3d(1.0, 1.0, 1.0); GL11.glPushMatrix(); GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5); GL11.glScaled(scale, scale, scale); double[] dir = this.directionRotate(tile.getFace()); GL11.glRotated(dir[0], dir[1], dir[2], dir[3]); this.renderTranslater(framemap); GL11.glPopMatrix(); }
From source file:com.lukke100.sbdi.Draw.java
License:Open Source License
static public void drawCircle(double xCoord, double yCoord, double radius) { GL11.glColor3d(red, green, blue); drawCircle(xCoord, yCoord, radius, 20); }
From source file:com.lukke100.sbdi.Draw.java
License:Open Source License
static public void drawCircle(double xCoord, double yCoord, double radius, int segments) { GL11.glColor3d(red, green, blue); GL11.glBegin(GL11.GL_TRIANGLE_FAN);/*from w w w. j a v a 2s .c o m*/ // GL11.glVertex2d(xCoord, yCoord); double deltaAngle = (2 * Math.PI) / segments; for (double angle = 0; angle < Math.PI * 2; angle += deltaAngle) { GL11.glVertex2d(xCoord + Math.cos(angle) * radius, yCoord + Math.sin(angle) * radius); } GL11.glEnd(); }
From source file:com.lukke100.sbdi.Draw.java
License:Open Source License
static public void drawHollowCircle(double xCoord, double yCoord, double radius) { GL11.glColor3d(red, green, blue); drawHollowCircle(xCoord, yCoord, radius, 20); }