diff --git a/src/conversion.cpp b/src/conversion.cpp index cb9274c..5d6f46f 100644 --- a/src/conversion.cpp +++ b/src/conversion.cpp @@ -11,12 +11,9 @@ void ofxMsdfgen::toOfImage(const msdfgen::Bitmap bitmap, ofImage & image){ image.allocate(bitmap.width(), bitmap.height(), OF_IMAGE_COLOR); image.getTexture().getTextureData().bFlipTexture = true; - cout << - (image.getTexture().getTextureData().bFlipTexture ? "bFlipTexture is true" : "bFlipTexutre? never heard of it") << endl; ofPixels & pixels = image.getPixels(); int w = bitmap.width(); int h = bitmap.height(); - // TODO: why do we need to flip? for(int y = 0; y < h; y++){ for(int x = 0; x < w; x++){ const float * rgb = bitmap(x, y); @@ -36,6 +33,7 @@ void ofxMsdfgen::toOfImage(const msdfgen::Bitmap bitmap, void ofxMsdfgen::toOfImage(const msdfgen::Bitmap bitmap, ofImage & image){ image.allocate(bitmap.width(), bitmap.height(), OF_IMAGE_COLOR); + image.getTexture().getTextureData().bFlipTexture = true; memcpy(image.getPixels().getData(), static_cast (bitmap), bitmap.width() * bitmap.height() * 3 * sizeof(byte)); image.update();