issue #5057, refactor TextureResType to strong typed enum