Removed stuff that was incompatible with GL ES
Made it compile in VS2010