Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

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

$
0
0

@tsin wrote:

//----------------------------------------------------------
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();

}


Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Latest Images

Trending Articles



Latest Images