Pass correct buffer sizes to readPixels

Take into account sizes of GL_FLOAT/GL_INT while calculating buffer sizes being passed to readPixels