removing more gl dependencies and added error checking to glprovider