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

QSGTexture::Repeat doesn't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.10.0
    • Qt RHI, Quick: SceneGraph
    • None
    • Linux/Wayland

       

      QSGTexture *texture = window()->createTextureFromImage(QImage(urlToLocalFileOrQrc(m_source)));
      texture->setHorizontalWrapMode(QSGTexture::Repeat);
      texture->setVerticalWrapMode(QSGTexture::Repeat);
      
      node = window()->createImageNode();
      node->setTexture(texture);
      node->setRect(0, 0, width(), height());
      node->setSourceRect(0, 0, width(), height());

      the following code snippet doesn't work as expected. With the repeat wrap mode, it looks like the "clamp to edge" mode is still used.

      I've attached a simple application that demonstrates the issue. The expected result is that the gradient pattern is repeated.

        1. repeat.zip
          5 kB
          Vlad Zahorodnii
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            lagocs Laszlo Agocs
            zzag Vlad Zahorodnii
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes