TheCherno / Sparky

Cross-Platform High Performance 2D/3D game engine for people like me who like to write code.
Apache License 2.0
1.09k stars 222 forks source link

ep 19 no text is rendering but it draws the black blocks of the letters #140

Open LordVeggie opened 5 years ago

LordVeggie commented 5 years ago

can any one help my font draws black blocks they are the right shapes for each letter but there is no visible letter in them . link to discussion and some code

https://www.reddit.com/user/LordVeggie/comments/9eyd1l/freetype_gl_not_rendering_any_font_i_get_a_black/

LordVeggie commented 5 years ago

found the solution down load the code of cherno (freetype gl only and past it over the freetype code you down loaded from freerype gl website ) . then go to line 303 in texture-atlas.c and make the( #if 0 TO A #if 1) then you should have the text rendering

thangnhox commented 1 year ago

The reason probaly is in new version of freetype-gl font data wasn't bound when you call ftgl::texture_font_new_from_file. You have to bind it manually. (my english is bad, forgive me).