added some debugging capabilities to look for texture bugs