update textures on draw

textures in OF are being uploaded to the graphics card in update in most of the classes. As i understand the update/draw method, update should only do calculations (cpu) while draw should only do gpu operations. Also moving everything gpu related to the draw method will allow to use threads without needing to deactivate the textures

this sounds nice, but i think the idea has to be modified slightly.

in OF, you have two types of texture-using classes:

one is where the texture is the end result of something internally managed, like ofVideoPlayer and ofVideoGrabber. these classes know when it’s time to upload the texture because they’re the only ones accessing the pixels.

second, there’s ofImage. it’s pretty common to modify an ofImage via getPixels(), in which case we would still want to call update()… except all that should happen is a ‘dirty pixels’ flag should be set, and the texture won’t be uploaded until draw().

that would be pretty awesome, and not change the existing interface.