erasing ofTexture without clear()

Hi,

Having a bit of a block on how to erase the allocated pixels of an ofTexture instance without calling clear() and allocate() again… Essentially, I have a position on my screen where different images can be dragged, and if they are in the right place, the texture of them gets assigned to a larger texture… The issue that I am seeing is that once one image gets assigned to that texture, no other one can as well…

I have something like the following in update()

  
      
if(videoObjectIsDocked) {  
        if (allObjects[videoOutputID]->id == "IMG") {  
            mainTexture.loadData(imageFileObjects[numberOfImageFileObjects-1]->textureImage);  
        }  
        else if (allObjects[videoOutputID]->id == "VID") {  
            mainTexture.loadData(videoFileObjects[numberOfVideoFileObjects-1]->textureImage);  
        }  
        else if (allObjects[videoOutputID]->id == "AUD") {  
            mainTexture.loadData(audioFileObjects[numberOfAudioFileObjects-1]->textureImage);  
        }  
    }  
  

and the following in draw()

  
      
if(videoObjectIsDocked) {  
        ofPushStyle();  
        ofSetRectMode(OF_RECTMODE_CORNER);  
        ofSetHexColor(0xffffff);  
        mainTexture.draw(0, 0, mainTexture.getWidth(), mainTexture.getHeight());  
        ofPopStyle();  
    }  
    else {  
        // erase texture here  
    }  
  

How do I go about erasing that same texture so that is ready for a new loadData() call ?
I tried to call clear(), but that deletes the texture pixel container entirely, and I don’t want to recall allocate every time…

Thanks for any ideas…

~ J

NVM, realized that it was two unrelated bugs in my code, about a boolean resetting and the index count of the image I was trying to access… so it seems like loadData() works overtop of the previous data.