1
vote
0answers
71 views

Text alignment in OpenGL with FreeType2

I'm trying to implement font rendering and have got into some trouble with glyph metrics. Here's the code where I get the metrics: Glyph gl; gl.width = face->glyph->metrics.width / 64; ...
1
vote
1answer
92 views

Is there a way to use other fonts, besides the default ones in OpenGLUT?

I'm using OpenGLUT functions like glutBitmapString to render sentences and words in a game. However, there is a limited set of fonts to use and I need some bigger size fonts. Is there a way to add new ...
8
votes
3answers
2k views

Font outline in OpenGL, FTGL

I'm using FTGL library to render fonts in my game, but I have completely no idea how to create an outline around text. Achieving a shadow could be easy, because I can simply do it like this: (pseudo ...
4
votes
1answer
232 views

Rendering only a part of text FTGL, OpenGL

I'm using FTGL library to render text in my C++ project. I can easily render text by using: CFontManager::Instance().renderWrappedText(font, lineLength, position, text); Unfortunately there is a ...
1
vote
0answers
96 views

Rendering text with stb_font results in glitches

I'm trying to render text with OpenGL and an "inline"-font taken from the stb_fonts The relevant code for initializing the font & rendering: LabelFactory::LabelFactory() { static unsigned ...
9
votes
5answers
4k views

OpenGL's matrix stack vs Hand multiplying

Which is more efficient using OpenGL's transformation stack or applying the transformations by hand. I've often heard that you should minimize the number of state transitions in your graphics ...