List of usage examples for org.lwjgl.opengl GL11 glColor4ub
public static native void glColor4ub(@NativeType("GLubyte") byte red, @NativeType("GLubyte") byte green, @NativeType("GLubyte") byte blue, @NativeType("GLubyte") byte alpha);
From source file:vazkii.tinkerer.client.helper.RenderHelper.java
License:Creative Commons License
/** Draws a circumference **/ public static void drawCircumference(Point origin, int z, int color, int radius) { GL11.glBegin(GL11.GL_LINE_STRIP);//from w w w . j a va 2s . c o m Color colorRGB = new Color(color); GL11.glColor4ub((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) (0.2 * 255)); for (int i = 0; i < 360; i++) { Point point = MathHelper.getPointInCircle(origin, i, radius); GL11.glVertex2i(point.x, point.y); } GL11.glEnd(); }
From source file:vazkii.tinkerer.client.helper.RenderHelper.java
License:Creative Commons License
/** Draws a line in the plane from point A to point B **/ public static void drawSimpleLine(Point pointA, Point pointB, int z, int color) { GL11.glBegin(GL11.GL_LINES);/*from w w w .j a v a 2s .c o m*/ Color colorRGB = new Color(color); GL11.glColor4ub((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) (0.2 * 255)); GL11.glVertex2i(pointA.x, pointA.y); GL11.glVertex2i(pointB.x, pointB.y); GL11.glEnd(); }