- Code: Select all
public void getpixel(final Coord c, final Callback<Color> cb) {
gl.bglSubmit(new BGL.Request() {
public void run(GL2 gl) {
byte[] buf = new byte[4];
gl.glReadPixels(c.x + tx.x, root.sz.y - c.y - tx.y, 1, 1, GL.GL_RGBA, GL2.GL_UNSIGNED_BYTE, ByteBuffer.wrap(buf));
checkerr();
cb.done(new Color(((int)buf[0]) & 0xff, ((int)buf[1]) & 0xff, ((int)buf[2]) & 0xff));
}
});
}
says "get a pixel"
is void
if you remove it you won't be able to move
WHYYYYYY
And now seriously.
Anyone knows how to change screen coord in to map coord (old s2m)