TextureEngine class updated