Results 1 to 3 of 3

Thread: renderText

  1. #1
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Question renderText

    I am trying to use QGLWidget::renderText( ) to display text in my QGLWidgets. but everytime I try to make this call, I get an assertion error. I am using Solaris. It can draw my other OpenGL things correctly but with renderText it acts up. It appears renderText( ) is using a display list, is this correct? If so I am thinking it is not creating a valid display list thus causing the crash. So if anyone has any ideas how to fix this and if renderText( ) is using a display list, please let me know! Thanks!!!

  2. #2
    Join Date
    Aug 2006
    Posts
    163
    Thanks
    12
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: renderText

    Quote Originally Posted by ToddAtWSU
    I am trying to use QGLWidget::renderText( ) to display text in my QGLWidgets. but everytime I try to make this call, I get an assertion error. I am using Solaris. It can draw my other OpenGL things correctly but with renderText it acts up. It appears renderText( ) is using a display list, is this correct? If so I am thinking it is not creating a valid display list thus causing the crash. So if anyone has any ideas how to fix this and if renderText( ) is using a display list, please let me know! Thanks!!!
    Why do you think it is using a display list? As far as I can see, it just wants co-ordinates relative to the current projection and model matrix. So you can call it for every iteration that you use to draw a particular model, displaying text relative to it. I don't see any parameters thta would accept a display list - you jsut specify the co-ordinates and then the text you want displayed. And drawing will be done relative to the current projection and model matrices.

    /edit : After doing some reading, it appears that renderText is 8-bit and can only use "OpenGL compatible fonts", whatever those may be. Try asking on the www.gamedev.net forums, lots of helpful knowledgeable people there.
    renderText() appears to be slow and buggy on some OS/architechtures as well, this may be the cause of your problem.
    renderText() does generate a display list, but it does this internally to render the text.
    Last edited by Valheru; 22nd August 2006 at 09:34.

  3. #3
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Cool Re: renderText

    We got the render text to work. Our problem is we have to design this in 8-bit color so we looked into setting up a QColorMap and once getting this set up, we were able to render the text on the screen. So thanks for your help and I am glad it was nothing else that was causing these problems.

Similar Threads

  1. QGLWidget renderText()
    By ToddAtWSU in forum Qt Programming
    Replies: 8
    Last Post: 21st July 2006, 13:20
  2. QGLWidget renderText
    By Rayven in forum Qt Programming
    Replies: 2
    Last Post: 14th July 2006, 21:02
  3. Replies: 1
    Last Post: 8th May 2006, 07:07
  4. QGLWidget renderText problem
    By mbjerkne in forum Qt Programming
    Replies: 1
    Last Post: 7th April 2006, 21:35

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.