Example usage for org.lwjgl.opengl GL11 glRecti

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

Introduction

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

Prototype

public static native void glRecti(@NativeType("GLint") int x1, @NativeType("GLint") int y1,
        @NativeType("GLint") int x2, @NativeType("GLint") int y2);

Source Link

Document

Specifies a rectangle as two corner vertices.

Usage

From source file:org.evilco.emulator.core.graphic.matrix.MonochromeMatrixScreen.java

License:Apache License

/**
 * {@inheritDoc}//from  w  ww .j a v  a 2  s.c om
 */
@Override
public synchronized void draw() {
    // clear screen
    GL11.glClearColor(0, 0, 0, 1);
    GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);

    GL11.glColor3f(1f, 1f, 1f); // TODO: Make color adjustable

    // draw pixels
    for (short y = 0; y < this.height; y++) {
        for (short x = 0; x < this.width; x++) {
            // skip disabled pixels
            if (!this.getPixel(x, y))
                continue;

            // draw
            GL11.glRecti(x, y, (x + 1), (y + 1));
        }
    }
}

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

License:Open Source License

public static void glRecti(int a, int b, int c, int d) {
    GL11.glRecti(a, b, c, d);
}