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

QOpenGLBuffer::allocate/write uses int instead of a 64-bit type

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 6.6.1
    • GUI: OpenGL
    • None
    • All

    Description

      src/opengl/qopenglbuffer.h says

          bool read(int offset, void *data, int count);
          void write(int offset, const void *data, int count);
      
          void allocate(const void *data, int count);
          inline void allocate(int count) { allocate(nullptr, count); }
      

      which limits all this to 32 bits. However the underlying API does use a 64-bit aware type:

      void glBufferData(GLenum target, qopengl_GLsizeiptr size, const void* data, GLenum usage);
      

      This would be trivial to fix if it were not for SC/BC constraints
      Changing the type in the existing methods would be BIC.
      Adding overloads with the same name but different types would 1) have to be skipped on 32-bit platforms, 2) maybe create ambiguity in some cases? I tried calling `foo(int)` and `foo(long)` with a `short` and it wasn't ambiguous though, so maybe this would actually work?

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            dfaure_kdab David Faure
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes