Example usage for org.lwjgl.opengl GL11 glColor4b

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

Introduction

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

Prototype

public static native void glColor4b(@NativeType("GLbyte") byte red, @NativeType("GLbyte") byte green,
        @NativeType("GLbyte") byte blue, @NativeType("GLbyte") byte alpha);

Source Link

Document

Sets the current color.

Usage

From source file:com.yogpc.qp.client.RenderRefinery.java

License:Open Source License

private static final void setColor(final int i) {
    GL11.glColor4b((byte) (i >> 16), (byte) (i >> 8), (byte) i, Byte.MAX_VALUE);
}

From source file:game.entities.Box.java

License:Open Source License

@Override
public void render(Render render) {
    switch (this.sides) {
    case 4:// w w  w.jav  a 2s  .c  om
        GL11.glColor4d(1, 0.2, 0.0, 0.001);
        render.drawSquare(this.position, max);
    case 1:
        byte[] b = { 61, 8, 122, 126 };
        GL11.glColor4b(b[0], b[1], b[2], b[3]);
        ArrayList<Point> p = new ArrayList<Point>();
        p.add(this.getMax());
        p.add(new Point(this.getMax().getX(), this.getPosition().getY()));
        p.add(this.getPosition());
        p.add(new Point(this.getPosition().getX(), this.getMax().getY()));
        render.drawLines(p);
    }

    this.liquid.render(this, render);
}

From source file:org.spout.api.gui.GuiRenderUtils.java

License:Open Source License

/**
 * sets a java.awt.Color to the GL color buffer
 * @param color the color to set//ww  w  .j  a  v  a 2 s. co  m
 */
public static void glColor(Color color) {
    GL11.glColor4b((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue(),
            (byte) color.getAlpha());
}

From source file:tk.ivybits.engine.gl.GL.java

License:Open Source License

public static void glColor4b(byte a, byte b, byte c, byte d) {
    GL11.glColor4b(a, b, c, d);
}