Fixed another texture clamp issue
Added a load of error checking to gl calls, and removed some suspect matrix settings calls that seem unecessary