Open GL texture fix

It is a fix for following problem:

Texture attributes are set without saving and restoring previous values. This leads to corruption of other textures which use different settings.