Converted gl2 path.
Converted gl3 unbuffered version.