Ep. 19: Font Rendering - Sparky Engine (How To Make a Game Engine)
Why Stack Overflow recommends it
Stack Overflow users link it when they are implementing OpenGL text rendering with FreeType or FTGL and comparing their code, or debugging glyphs that come out as quads or upside down.
Recommended by 1 people across 1 different months, 2016 to 2018.
What it is
A 1h44m livestream from The Cherno's Sparky Engine series on building a game engine in C++ and OpenGL. This episode implements font rendering, using FreeType and the FTGL texture-atlas library to draw text with the engine's batch renderer.
What people said
Recommends Smile · 2018-06 · Stack Overflow · on “Text rendering not working correctly”
so I'm trying to render some text using FTGL, GLFW and GLEW libraries in my C++ engine following this tutorial: [this video] . But when I do so where the text should be instead of characters I get triangles of some kind (screenshot): [LINK] I wanted to use the same shader as when I'm rendering normal sprites, so I set the model matrix in shader to identity matrix and instead I'm passing character positions to the shader with VBO. Here's font class: class Font { private: /* Variables */ ftgl::texture_atlas_t* m_atlas; ftgl::texture_font_t* m_font; public: /* Constructors */ Font(const char* filename, const float size) : m_atlas(ftgl::texture_atlas_new(512, 512, 1)), m_font(ftgl::texture_font_new_f
Cites BinaryMatrix · 2016-12 · Stack Overflow · on “FreeType text upside down”
I could do this but it would be a very hacky, un-elegant way of achieving what i want. I an reluctant to do this method as in a video that i watched they also use the same technology as me (opengl, c+, freetype) and their gylphs were the correct way up. (video: [this video] )
Cites Tracz · 2018-05 · Stack Overflow · on “Why text is rendering as quads?”
texture ID is 1 (means that the textures is alright), but I am not sure that it's bound to the 0 unit. This: `texture(u_textureSampler[0], v_fragmentUV)` still returns black boxes. Do not think that there are problems with shader, because normal textures work fine. That may be a library problem, I've been following [this video] he put source code inside a project as if it would be his own. I am linking it. Tried his way and same result, though.