do not flip glyphs anymore
This commit is contained in:
parent
0f07dbfb64
commit
9e8ddb6558
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue