Rendering only a part of text FTGL, OpenGL
Posted
by
Mosquito
on Game Development
See other posts from Game Development
or by Mosquito
Published on 2012-11-26T12:48:28Z
Indexed on
2012/11/26
17:28 UTC
Read the original article
Hit count: 195
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 situation in which this Button which displays text, is partly hidden because of resizing container in which it is situated. I'm able without any problem to draw Button's background to fit the container, but I've got a problem with doing the same with a text. Is it possible to somehow draw only text for given width and the rest just ignore?
This is a screen which presents my problem:
As you can see, the Button "Click here" is being drawn properly, but I can't do the same with "Click here" text.
© Game Development or respective owner