Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    How to anti-alias in QtOpenGL program?

    General and Desktop
    2
    3
    967
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jiangcaiyang last edited by

      I really don't know the procedure, so all my program using Qt and OpenGL have jagged edges. Could anybody help me out?

      1 Reply Last reply Reply Quote 0
      • T
        tucnak last edited by

        @
        glEnable(GL_MULTISAMPLE);
        glEnable(GL_LINE_SMOOTH);
        @

        or for entire widget:
        @
        QGLWidget::setFormat(QGLFormat(QGL::SampleBuffers));
        @

        1 Reply Last reply Reply Quote 0
        • J
          jiangcaiyang last edited by

          Thank you for you advice. I've tested that the former solution didn't make sense, whereas the latter took effect.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post