refactoring of pixel.c
added glReadPixels with format and type conversion
fixed a bug in glDrawElement with type not GL_UNSIGNED_SHORT
Improved the downscaling
added some existing glX functions to the lookup table