   FTGL several problems
  Hi there!This is my first post in this forum, though I red a lot of its post and found many useful info to most of my problems, so first of all, thank you!I'm having trouble using FTGL (I'm using it, well, dunno, I read of it and gave it a try, and also read that SDL is too slow to render text into OpenGL applications) to render text for a 2D HUD - gluOrtho2D, (in an OpenGL with SDL application) but I've found various problems:I'm actually using FTGLPixmapFont to render text, I know there's something strange with changing the text color ( http://www.gamedev.net/community/forums/topic.asp?topic_id=503844 ), and moving it. However, moving the text around was fairly easy with a call to:font->render("text", -1, FTPoint(start_x, start_y));Pretty simple though, and was useful until I wanted to give the text multiline rendering.For that, FTGL provides FTSimpleLayout in which you define a maximum line lenght and the text is rendered accordingly with aligmnent an so. But, with that, I can no longer set the starting position of the rendered text, and since I'm using Pixmap fonts or bitmap, can't move them either with glTranslatef (). The code goes like this:FTGLPixmapFont* font = new FTGLPixmapFont (font_path);font->FaceSize(size);FTSimpleLayout* layout = new FTSimpleLayout();layout->SetLineLenght(line_length);layout->SetFont(font);layout->Render(text, -1, FTPoint(start_x, start_y));And it's rendered always in the same position, multiline but in the same position, can't move it. So I'm asking help with this.Anyway, FTSimpleLayout does never render the text at a given position (at least with my  setup, don't know why) But if I switch font types, like a Polygon font, I can translate it with glTranslatef, change colors normally, instead of glPixelTransferf() and so.Though switching fonts would be fastest, to think about at least, and pretty straightforward, I think it would be a little slowlier than Pixmap fonts, since I would need multisampling to give the text the definition I get with pixmap fonts. Oh, and also, since my gluOrtho perspective is set in a way that gets top left corner to be 0,0 (done like this to be like in SDL) polygon and texture fonts are displayed upside down, and if I change this I would have to recalculate the coords at I draw OpenGL primitives in the HUD.So, finally, if you have read this long, thank you! and for the final questionGiven the need to render MultiLine texts:Is there anyway to render FTGLPixmapFont at a given point (not glTranslatef)? orWould you recommend switching to another type of font provided by FTGL despite the downsides explained above? or maybeThere's another way, unknown to me of drawing multiline texts with FTGL?Time is, more or less, of essence, so I cannot switch the font engine at this point.Thank you![Edited by - kirosvds on May 12, 2010 5:06:45 AM]
  Forgot to mention, though you may already noticed, that I'm pretty new at this. Two months ago, some students and me were assigned a project of making a game / simulator, and though world navigation and models is almost done (well, it's going to be a little lousy, but it works!) 2D, the hud, and the text on screen were more like a headache, and well, has been keeping me and a mate kinda frustrated for a week.Anyway, as FTGLPixmapFont and FTGLBitmapFonts are rasted fonts, it's as easy as calling glRasterPos[234][d f i s] to give the starting point of the text, which is, by the way, the baseline of the glyphs in the first line.So text is displaying correctly, and it serves for our purpouses of the text in a hud (always on top of everything) and multiline if needed.Don't know, though, why the FTSimpleLayout did not set it properly.