From 9e8ddb6558901cd4c8270960f8049ea451ea479a Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Mon, 27 Mar 2023 18:55:47 +0200 Subject: [PATCH] do not flip glyphs anymore --- src/Layer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Layer.cpp b/src/Layer.cpp index 6c3021c..7bf2ccc 100644 --- a/src/Layer.cpp +++ b/src/Layer.cpp @@ -39,12 +39,13 @@ void MsdfLayer::draw(glm::vec3 position) const { shader->end(); ofPushMatrix(); + atlas->getAtlasImage().draw(0, 0); //cout << "drawing letters (" << ofToString(propsBuffer.size()) << ")" << endl; for(const char c : propsBuffer[0].text){ ofxMsdfgen::GlyphGeometry gg = atlas->getGlyphGeometry(c); int x, y, w, h; gg.getBoxRect(x, y, w, h); - y = atlas_h - (y + h); + //y = atlas_h - (y + h); if(y < 0){ // FIXME: make sure this does not happen ofLogError("MsdfLayer::draw") << "y smaller 0, this is not good" << endl; @@ -59,7 +60,7 @@ void MsdfLayer::draw(glm::vec3 position) const { ofPushMatrix(); float magic = ofMap(sin(ofGetElapsedTimeMicros() * 0.000001), -1, 1, 1, 1000); - ofTranslate(pr * magic, pt * magic, 0); + ofTranslate(pl * magic, pt * magic, 0); //if(ofGetFrameNum() % 30 == 0){ //cout << "drawing letter " << c << endl //<< "\tpl: " << ofToString(pl)