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

QGLShaderProgramm::setAttributeArray() behaviour changes when using QGLBuffer::VertexBuffer

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P2: Important
    • None
    • 4.7.0, 5.1.1
    • Documentation
    • None

    Description

      affects OpenGL 2.1 Contexts:
      The behaviour of the underlying glVertexAttribPointer call changes when using QGLBuffer::VertexBuffer.
      It binds data to a GL_ARRAY_BUFFER. glVertexAttribPointer then searches for generic vertex attributes in the buffer currently bound to that target, and treats the given pointer (the pointer given to setAttributeAray) as an offset in that buffer. As a result the expected result changes (usually nothing is drawn as the shaderprogram doesn't find useful data)
      setAttributeArray works as expected when zero is bound to GL_ARRAY_BUFFER.

      in OpenGL 3.x core profiles it appears glVertexAttribPointer always expects a buffer bound to GL_ARRAY_BUFFER, and so treats the pointer always as an offset in that buffer.

      see also OpenGL documentation for glVertexAttribPointer for 3.x: http://www.opengl.org/sdk/docs/man3/
      and 2.1: http://www.opengl.org/sdk/docs/man/

      Attachments

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

        Activity

          People

            seanharmer Sean Harmer
            nade Daniel Löber
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes