Skip to content

Commit

Permalink
avoid change of bUseTexture on setFromPixels. Closes openframeworks#206
Browse files Browse the repository at this point in the history
  • Loading branch information
arturoc committed Sep 24, 2010
1 parent 6b60cae commit 705a94d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/openFrameworks/graphics/ofImage.cpp
Expand Up @@ -185,7 +185,9 @@ void ofImage::setFromPixels(unsigned char * newPixels, int w, int h, int newTyp
}

if (!((width == w) && (height == h) && (type == newType))){
bool bCacheBUseTexture = bUseTexture;
clear();
bUseTexture = bCacheBUseTexture;
allocate(w,h, newType);
}

Expand Down

0 comments on commit 705a94d

Please sign in to comment.