Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

Can Any one tell me why ofImage call update two times?

$
0
0

//----------------------------------------------------------
template
ofImage_& ofImage_::operator=(const ofImage_& mom) {
if(&mom==this) return *this;
clone(mom);
update();

#if defined(TARGET_ANDROID)
ofAddListener(ofxAndroidEvents().unloadGL,this,&ofImage_<PixelType>::unloadTexture);
ofAddListener(ofxAndroidEvents().reloadGL,this,&ofImage_<PixelType>::update);
#endif
return *this;

}


in clone

//------------------------------------
template
template
void ofImage_::clone(const ofImage_ &mom){
pixels = mom.getPixels();

tex.clear();
bUseTexture = mom.isUsingTexture();
if (bUseTexture == true && mom.getTexture().isAllocated()){
    tex.allocate(pixels.getWidth(), pixels.getHeight(), ofGetGlInternalFormat(pixels));
}

update();

}



Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>