Fixed code in `gl_back_end`

Closes https://github.com/PistonDevelopers/piston/issues/311
Closes https://github.com/PistonDevelopers/piston/issues/315
Merge pull request #316 from bvssvni/master

Fixed code in `gl_back_end`