24 VertexBuffer = 0x8892,
26 PixelPackBuffer = 0x88EB,
27 PixelUnpackBuffer = 0x88EC
31 explicit QOpenGLBuffer(QOpenGLBuffer::Type type);
32 QOpenGLBuffer(
const QOpenGLBuffer &other);
33 QOpenGLBuffer(QOpenGLBuffer &&other)
noexcept
34 : d_ptr{std::exchange(other.d_ptr,
nullptr)} {}
37 QOpenGLBuffer &operator=(
const QOpenGLBuffer &other);
38 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QOpenGLBuffer)
40 void swap(QOpenGLBuffer &other)
noexcept
41 {
return qt_ptr_swap(d_ptr, other.d_ptr); }
67 RangeInvalidate = 0x0004,
68 RangeInvalidateBuffer = 0x0008,
69 RangeFlushExplicit = 0x0010,
70 RangeUnsynchronized = 0x0020
72 Q_DECLARE_FLAGS(RangeAccessFlags, RangeAccessFlag)
74 QOpenGLBuffer::Type type()
const;
76 QOpenGLBuffer::UsagePattern usagePattern()
const;
77 void setUsagePattern(QOpenGLBuffer::UsagePattern value);
80 bool isCreated()
const;
87 static void release(QOpenGLBuffer::Type type);
89 GLuint bufferId()
const;
93 bool read(
int offset,
void *data,
int count);
94 void write(
int offset,
const void *data,
int count);
96 void allocate(
const void *data,
int count);
97 inline void allocate(
int count) { allocate(
nullptr, count); }
99 void *map(QOpenGLBuffer::Access access);
100 void *mapRange(
int offset,
int count, QOpenGLBuffer::RangeAccessFlags access);
104 QOpenGLBufferPrivate *d_ptr;
106 Q_DECLARE_PRIVATE(QOpenGLBuffer)