Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2443

glVertexAttribPointer from QOpenGLFunctions cannot be used while the one from PyOpenGL can

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 6.5.2
    • PySide
    • None
    • macOS

    Description

      While using the triangle example from QWindow as base for another sample code, I faced the issue that the `glVertexAttribPointer`function from the QOpenGLFunctions was not usable as is. However, replacing the call with the one from the PyOpenGL package worked fine.

      Attached is an example that uses QOpenGLFunctions for everything but the two calls to glVertexAttribPointer.

      void glVertexAttribPointer(GLuint index, GLint size, GLenum type,
        	GLboolean normalized, GLsizei stride, const void * pointer);
      
      Python 3.10.12
      Qt 6.6.0 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 11.4.0)
      Traceback (most recent call last):
        File "pyside2443.py", line 134, in <module>
          widget.show()
        File "/pyside2443.py", line 98, in paintGL
          self.funcs.glVertexAttribPointer(self._posAttr, 2, GL.GL_FLOAT, GL.GL_FALSE, 0, vertices)
      TypeError: 'PySide6.QtGui.QOpenGLFunctions.glVertexAttribPointer' called with wrong argument types:
        PySide6.QtGui.QOpenGLFunctions.glVertexAttribPointer(int, int, IntConstant, IntConstant, int, list)
      Supported signatures:
        PySide6.QtGui.QOpenGLFunctions.glVertexAttribPointer(int, int, int, int, int, int)
      

      Attachments

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

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            sgaist Samuel Gaist
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes