PDA

View Full Version : how to put text at X,Y,Z position and resolution problem



siddu78
12-27-2002, 09:50 PM
hi all,
iam doing a 3D radar screen and i have ended in a problem.
1. the first problem is given
X,Y and Z values(positions) how to print a text at that position.
2. how to map the figure from window to viewport so that when i change the resolution of screen it should adjust itself with new resolution./

jirkamelich
12-28-2002, 02:44 AM
For the first problem use 2D font and glOrtho, about glOrtho you can find something in FAQ.

nexusone
12-29-2002, 05:14 AM
The best way would be to map all of your 2D images as texture maps, which can be resized to the window size.
Keep the glviewport relative to window size, but do not change glPerspective or ortho to match glviewport and window size.

Use texture map fonts for text not bitmap.



Originally posted by siddu78:
hi all,
iam doing a 3D radar screen and i have ended in a problem.
1. the first problem is given
X,Y and Z values(positions) how to print a text at that position.
2. how to map the figure from window to viewport so that when i change the resolution of screen it should adjust itself with new resolution./

siddu78
01-02-2003, 04:59 AM
thanx for the reply,
but can u eloaborate it bit more.

atimes
01-02-2003, 05:23 AM
try out this page. http://www.gametutorials.com/Tutorials/opengl/OpenGL_Pg4.htm

and this http://nehe.gamedev.net/tutorials/lesson.asp?l=17

This is a ling on gametutorials.com which have awesome tutorials for beginners. They don't just cover OpenGL but many other things like camera orientation, collision detection and even have stuff on quake model and bsp loading files.

The page above has 2 tutorials on 2d and 3d font. there is also a way described on nehe.gamedev.net

nexusone
01-02-2003, 05:44 AM
When you work with 2D bitmaps placed directly on the screen, one pixel to one pixel.

If you have a 320 x 200 image and use a ortho screen that is only say 300 x 200, some of the image will be cut off when you resize or area will be blank.

With a texture map image, the image will be rendered to fit the screen and not a pixel to pixel basis.


Originally posted by siddu78:
thanx for the reply,
but can u eloaborate it bit more.