Render Text in perspective Mode?

Hi,

I want to render text for my app. Normaly one would use glOrtho for pixel accurate quad rendering BUT in my app the textbox should move in the background (z).

Just imagine you have NPC´s (objects) in a video game and want to display their names above their heads. The names of the persons near to the camera should appear bigger and easier to read than the ones farther away.

What should I do? Where do I get an appropriate Projection Matrix? I can´t find anything regarding the problem online or in books.

Best regards, S.

Hi,

A good overview of setting up a projection view matrix can be found here:
http://www.songho.ca/opengl/gl_projectionmatrix.html

For a movable camera what you want to be doing is rendering the textured quad with a rotation inverse to any rotation in the in the camera view matrix, such that the quad plane is always perpendicular to the camera.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.