aconstlink / natus

[Discontinued] Software Framework for Audio/Visual/Interactive Real-Time Applications
https://aconstlink.de
MIT License
0 stars 0 forks source link

text_render_2d glyph size scales with glyph image size #269

Closed aconstlink closed 3 years ago

aconstlink commented 3 years ago

Here the glyph image size does not seem to be calculated out of the scaling. It seems the glyph image aspect ratio need to be added to the scaling. See images.

Screenshot 2021-03-08 105821 Glyph image size 128x512

Screenshot 2021-03-08 105903 Glyph image size 512x512

aconstlink commented 3 years ago

Yet another bug. Here the glyph image is 512x512 but the text is rendered into a framebuffer of 800x600. So the target resolution is also missing in the equation of the glyphs' quad scaling computation. Screenshot 2021-03-08 110940

This is due to the usage of a non quadratic viewport. The viewport needs to be ruled out with the projection matrix.