Click to See Complete Forum and Search --> : Urgent!! Text in OpenGL


Hardeep Singh
April 3rd, 1999, 12:00 AM
I'm having trouble with OpenGL text - I can't position it where I want. I tried using glSetRasterPos but it didn't work. Please tell me what I could be missing.

Maikeru
April 16th, 1999, 01:34 AM
what do u mean u can't position the text to where u want? do u get the text shown on the wrong position or that the text is not shown at all? If it's first case, note that "SetRasterPos" is like "glVertex", meaning it is also multiplied with the current transformation matrix before arriving at a "final" raster position for u to insert your text/bitmap. Also note that if the raster position lies outside the viewing volume, the bitmap will not be shown clipped, no matter how big or how much the bitmap overlaps into the viewing volume.

Don't know whether it is of much help to you...

(^_^)
Maikeru Shimu

jteagle@home
April 16th, 1999, 03:03 PM
If you're using wglUseFontBitmaps() then you should use glRasterPos2f(x, y).
If you're using wglUseFontOutlines() then you should use glTranslated(x, y, 0.0f).

Bear in mind that this affects the current matrix; if unsure, use glLoadIdentity() before the commands above.

Does this help?



_ _
o o Jason Teagle
<
v jteagle@geocities.com