Sizes GL display for any grid of NxM inputs