gl.glReadPixels(0, 0, width, height, type, intType, IntBuffer.wrap((int[]) data));
/* Restore Alpha scale and bias */
if(forceAlphaToOne) {
gl.glPixelTransferf(GL2.GL_ALPHA_SCALE, 1.0f);
gl.glPixelTransferf(GL2.GL_ALPHA_BIAS, 0.0f);
}
}
else {
throw new AssertionError("illegal image data type " + dataType);