texture: fix repeating texture which is lost when GL reloading mechanism is used (like window resizing). closes #1393