was working intermittantly seems glReadPixels was getting the wrong size as on of the params was set to 4 and now changed to 1