functions for accessing texture