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

QOpenGLWidget - Glitch when drawing an ellipse with OpenGL-based QPainter

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.14.2
    • GUI: OpenGL
    • None
    • Windows

    Description

      I am drawing an ellipse over some openGL render in a QOpenGLWidget.

      The ellipse is drawn in QOpenGLWidget::PaintGL(). I enclosed my OpenGL commands between QPainter::beginNativePainting() and QPainter::endNativePainting() and everything works fine.

      But when the ellipse is located in certain positions, with the center outside the viewport, an additional, unwanted ellipse is drawn at (0,0).

      I tried to reproduce the bug in a QWidget, drawing my ellipse in QWidget::paintEvent(). But I did not manage to reproduce it, so I guess it is specific to QOpenGLWidget. I may be wrong of course.

      Last thing worth mentioning (see attached example): the bug only occurs when using a QPen with a dash pattern after drawing my ellipse.

      Attachments

        1. ellipse.PNG
          ellipse.PNG
          7 kB
        2. minimal example.cpp
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            gruk Gruk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes