Results 1 to 4 of 4

Thread: QGLWIdget renderText() assertion...

  1. #1
    Join Date
    Sep 2007
    Posts
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QGLWIdget renderText() assertion...

    Hi guys,

    I have the following problem:

    Whenever i try to call the renderText() function of my QGlWidget, i get an:

    centaur: indirect_vertex_array.c:1359: __indirect_glTexCoordPointer: Assertion `a != ((void *)0)' failed.

    error!

    I am stuck up! Is this a problem with my opengl version or graphics driver??

    Thank you in regards!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QGLWIdget renderText() assertion...

    Can we see the code?

  3. #3
    Join Date
    Sep 2007
    Posts
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGLWIdget renderText() assertion...

    Here is a very small example of code that crashes...

    void OpenGLArea:aintGL()
    {
    renderText(0.0, 0.0, 0.0, "Test text");
    }

    void OpenGLArea::resizeGL(int width, int height)
    {
    glViewport(0, 0, width, height);
    glOrtho(-2, 2, -2, 2, -100, 100);
    }

  4. #4
    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

    Default Re: QGLWIdget renderText() assertion...

    Please in the future put your code into Code brackets so we get syntax highlighting.

    I doubt this is causing your crash, but you need to load your matrices with the viewport and ortho. You need to be in the GL_PROJECTION matrix before calling glOrtho and you need to be in the GL_MODELVIEW matrix when you call glViewport. See if getting your matrices set up correctly helps solve the problem.

Similar Threads

  1. QGLWidget renderText rotation
    By ToddAtWSU in forum Qt Programming
    Replies: 4
    Last Post: 19th September 2007, 20:52
  2. QGLWidget renderText()
    By ToddAtWSU in forum Qt Programming
    Replies: 8
    Last Post: 21st July 2006, 13:20
  3. QGLWidget renderText
    By Rayven in forum Qt Programming
    Replies: 2
    Last Post: 14th July 2006, 21:02
  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.