Added OpenGL error checking

Added OpenGL error checking based on on SFML's error checking code.