1

I am currently working on an engine that involves creating 3D objects such as boxes and spheres. My next task is to create 3D Text inside as an object. I am using Visual Studio 2012, OpenGL, Qt, FreeType2, and FTGL in C++ on a Windows 7 computer.

I have been able to import everything fine and get some things to render, but not the way I would like. If I create a box, the text jumps to the box I created. If I create another one, it jumps to that. If I move the camera, it jumps to the center of the scene. On top of that, all the letters in my string appear right on top of each other and I cannot position them.

What I want is for the text to be at whatever 3D location I tell it and for it to stay on the screen (so have multiple strings rendering) and for the letters to actually be able to make words. I have tried using glRasterPos3f as well to move it but it still stays latched onto whatever object it is. I have tried a lot to get a decent result but I keep running into the same thing. Please give me an idea of what the problem could be. Here is a sample of how I am rendering it to give an example:

glPushMatrix();
FTExtrudeFont* font = new FTExtrudeFont("Arial.ttf");
font->Depth(.5);
font->FaceSize(10);
glRasterPos3f(10,10,10);
font->Render("Text");
glPopMatrix();
Matt
  • 11
  • 2

0 Answers0