CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 1999
    Posts
    69

    Urgent!! Text in OpenGL

    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.


  2. #2
    Join Date
    Apr 1999
    Posts
    4

    Re: Urgent!! Text in OpenGL

    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

  3. #3
    Join Date
    Apr 1999
    Posts
    68

    Re: Urgent!! Text in OpenGL

    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 [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured