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

Texture unit mismatch between QOpenGLPaintEngine::drawTextureRect and QGLContextPrivate::bindTextureFromNativePixmap

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.7.0
    • 4.6.2
    • GUI: OpenGL
    • None
    • Linux, kernel 2.6.33, gcc 4.4, Intel 945 graphics stack
    • 7558db24cea4912b8082275821ea390527d2a911

    Description

      I've been testing with the DUI "helloworld" example (libdui/examples/helloworld).

      With the default graphics driver and DUI settings, the application will come up with just a background and white buttons or just all white. After some debugging, I found that Qt doesn't seem to match texture from pixmap binding with the texture unit it uses in QOpenGLPaintEngine::drawTextureRect. That is, in QGLContextPrivate::bindTextureFromNativePixmap textures are bound to GL_TEXTURE_2D, but subsequent copies come from GL_TEXTURE_RECTANGLE_NV, causing them to be empty.

      So either bindTextureFromNativePixmap should be disabled in configurations requiring GL_TEXTURE_RECTANGLE_NV or the texture unit should be tracked for each texture so that drawTextureRect can do the right thing, or Qt should just move unconditionally to GL_TEXTURE_2D; I think it's supported everwhere TFP is.

      Attachments

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

        Activity

          People

            tcooksey Tom Cooksey
            jbarnes Jesse Barnes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes