Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: printing text

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    Austin, TX, USA
    Posts
    2

    printing text

    I have been unable to get any of the standard methods of rendering text to work when rendering to a memory context (DIB). I have tried wgl, texmapping the glyphs, and now GDI, all to limited success. I would refer to have the wgl methods functioning, as that is how all the other text is done in the display. Does anyone have advice for rendering text to a DIB? Have I set up something wrong (pfd?, header?). All other openGL prints fine...just text never shows up.

    Any help greatly appreciated.

    ~Paul
    -Cybercorp Development-
    ptidwell@cybercorp.com http://www.cybercorp.com

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    London
    Posts
    503

    Re: printing text

    Hang on - are you saying that normal texture mapped polys work fine, but magically break when the texture happens to contain glyphs?!

    One thing that catches me out embarrassingly often when using using texture fonts is that the normal text Y coordinate mapping mode - with 0 at the top and coords increasing down the screen - is the _reverse_ of the standard OpenGL coord space. Are your text quads maybe getting backface culled?

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    Austin, TX, USA
    Posts
    2

    Re: printing text

    actually, no. They worked fine with the glyphs on screen, but the lack of alpha blending support for DIBs left me with a solid quad on the printout (blitted from the memory context).

    I have fixed it, in me infantile knowledge of DCs and such I did not notice that the base class never associated a font with the DC, so when I made a compatible DC it had no font, and therefore no text.

    Thanks all.

Posting Permissions

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