Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-47291

support for glPrimitiveRestartIndex in renderer

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P2: Important
    • 5.9.0 Beta 2
    • 5.7.0
    • Qt3D
    • None

    Description

      glPrimitiveRestartIndex allows more efficient rendering of Strip-based elements, e.g., LineStrip, TriangleStrip, so that you can include breaks in the lines without requiring multiple elements. Here is my quick hack to get this working:

      diff --git a/src/render/backend/qgraphicshelpergl3.cpp b/src/render/backend/qgraphicshelpergl3.cpp
      index 3fce362..c263103 100644
      — a/src/render/backend/qgraphicshelpergl3.cpp
      +++ b/src/render/backend/qgraphicshelpergl3.cpp
      @@ -67,6 +67,11 @@ void QGraphicsHelperGL3::initializeHelper(QOpenGLContext *context,
      m_tessFuncs.reset(new QOpenGLExtension_ARB_tessellation_shader);
      m_tessFuncs->initializeOpenGLFunctions();
      }
      +
      + // Randy's hack to support primitive reset index:
      + m_funcs->glPrimitiveRestartIndex(0xFFFF);
      + m_funcs->glEnable(GL_PRIMITIVE_RESTART);
      +
      }

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            whagen Wieland Hagen
            rcoreilly Randall O'Reilly
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes