Adding basic Opengl error checking