List of usage examples for org.lwjgl.opengl GL11 glColor3b
public static native void glColor3b(@NativeType("GLbyte") byte red, @NativeType("GLbyte") byte green, @NativeType("GLbyte") byte blue);
From source file:net.shadowmage.ancientwarfare.core.model.ModelPiece.java
License:Open Source License
public void renderForSelection(float tw, float th, ModelBaseAW model) { GL11.glPushMatrix();/*w w w . j a v a 2s . c o m*/ if (x != 0 || y != 0 || z != 0) { GL11.glTranslatef(x, y, z); } if (rx != 0) { GL11.glRotatef(rx, 1, 0, 0); } if (ry != 0) { GL11.glRotatef(ry, 0, 1, 0); } if (rz != 0) { GL11.glRotatef(rz, 0, 0, 1); } for (Primitive primitive : this.primitives) { int r, g, b; r = ((model.iterationNum >> 16) & 0xff); g = ((model.iterationNum >> 8) & 0xff); b = ((model.iterationNum >> 0) & 0xff); // AWLog.logDebug("rendering for selection: "+model.iterationNum+" :: "+r+","+g+","+b); GL11.glColor3b((byte) r, (byte) g, (byte) b); GL11.glPushMatrix(); primitive.render(tw, th); GL11.glPopMatrix(); model.iterationNum++; } for (ModelPiece child : this.children) { child.renderForSelection(tw, th, model); } GL11.glPopMatrix(); }
From source file:shadowmage.ancient_framework.client.model.ModelPiece.java
License:Open Source License
public void renderForSelection() { GL11.glPushMatrix();//from w w w . j a v a 2 s.c om if (x != 0 || y != 0 || z != 0) { GL11.glTranslatef(x, y, z); } if (rx != 0) { GL11.glRotatef(rx, 1, 0, 0); } if (ry != 0) { GL11.glRotatef(ry, 0, 1, 0); } if (rz != 0) { GL11.glRotatef(rz, 0, 0, 1); } for (Primitive primitive : this.primitives) { byte r, g, b; r = (byte) ((primitive.primitiveNumber >> 16) & 0xff); g = (byte) ((primitive.primitiveNumber >> 8) & 0xff); b = (byte) ((primitive.primitiveNumber >> 0) & 0xff); AWLog.logDebug("rendering primitive by color: " + r + "," + g + "," + b); GL11.glColor3b(r, g, b); AWLog.logDebug("rendering primitive for selection as number: " + primitive.primitiveNumber); GL11.glPushMatrix(); primitive.render(); GL11.glPopMatrix(); } for (ModelPiece child : this.children) { child.renderForSelection(); } GL11.glPopMatrix(); }
From source file:tk.ivybits.engine.gl.GL.java
License:Open Source License
public static void glColor3b(byte a, byte b, byte c) { GL11.glColor3b(a, b, c); }