Modified the place texture update happens (not in the main loop anymore)