Home

GLintptr

GLintptr is a data type defined by the OpenGL specification that represents a signed integer large enough to hold a pointer. It is used to express memory offsets within buffer objects and, when no buffer object is bound, to pass client-side pointers. The type provides a pointer-sized integer representation to accommodate different architectures and address spaces.

In practice, GLintptr is defined as a platform-dependent integral type, commonly corresponding to intptr_t. On 64-bit

Usage examples include functions such as glBufferSubData(target, GLintptr offset, GLsizeiptr size, const void* data) and glMapBufferRange(target,

GLintptr is one of the core GL type definitions used to ensure compatibility of pointer-sized values in

systems
it
is
64
bits,
and
on
32-bit
systems
it
is
32
bits.
It
is
paired
with
GLsizeiptr,
a
signed
integer
type
that
holds
a
size
in
bytes.
This
pairing
allows
OpenGL
to
specify
both
an
offset
and
a
length
for
data
transfers
and
buffer
operations
in
a
way
that
matches
pointer
arithmetic
across
platforms.
GLintptr
offset,
GLsizeiptr
length,
GLbitfield
access).
In
addition,
when
a
buffer
object
is
bound
to
an
appropriate
target
(for
example,
an
element
array
buffer),
parameters
that
would
otherwise
be
a
client
memory
pointer
are
treated
as
byte
offsets
into
the
buffer.
This
applies
to
index
data
passed
to
functions
like
glDrawElements,
where
the
indices
can
be
supplied
as
an
offset
within
the
bound
buffer.
the
API,
alongside
GLsizeiptr
and
other
size-related
types.