23 VertexBuffer = 0x8892,
25 PixelPackBuffer = 0x88EB,
26 PixelUnpackBuffer = 0x88EC
30 explicit QOpenGLBuffer(QOpenGLBuffer::Type type);
31 QOpenGLBuffer(
const QOpenGLBuffer &other);
32 QOpenGLBuffer(QOpenGLBuffer &&other)
noexcept
33 : d_ptr{std::exchange(other.d_ptr,
nullptr)} {}
36 QOpenGLBuffer &operator=(
const QOpenGLBuffer &other);
37 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QOpenGLBuffer)
39 void swap(QOpenGLBuffer &other)
noexcept
40 {
return qt_ptr_swap(d_ptr, other.d_ptr); }
66 RangeInvalidate = 0x0004,
67 RangeInvalidateBuffer = 0x0008,
68 RangeFlushExplicit = 0x0010,
69 RangeUnsynchronized = 0x0020
71 Q_DECLARE_FLAGS(RangeAccessFlags, RangeAccessFlag)
73 QOpenGLBuffer::Type type()
const;
75 QOpenGLBuffer::UsagePattern usagePattern()
const;
76 void setUsagePattern(QOpenGLBuffer::UsagePattern value);
79 bool isCreated()
const;
86 static void release(QOpenGLBuffer::Type type);
88 GLuint bufferId()
const;
92 bool read(
int offset,
void *data,
int count);
93 void write(
int offset,
const void *data,
int count);
95 void allocate(
const void *data,
int count);
96 inline void allocate(
int count) { allocate(
nullptr, count); }
98 void *map(QOpenGLBuffer::Access access);
99 void *mapRange(
int offset,
int count, QOpenGLBuffer::RangeAccessFlags access);
103 QOpenGLBufferPrivate *d_ptr;
105 Q_DECLARE_PRIVATE(QOpenGLBuffer)