refine texture resources management.