Home

GLSTREAMDRAW

GL_STREAM_DRAW is a usage hint used with OpenGL buffer objects. It is one of the practice patterns passed to glBufferData and glBufferSubData to describe how the application intends to use the buffer’s contents. The GL_STREAM_DRAW value indicates that the data store will be modified once and used at most a few times for drawing.

In practice, GL_STREAM_DRAW is chosen for buffers whose contents are updated frequently and then used a limited

Performance considerations for GL_STREAM_DRAW depend on the hardware and driver implementation. It does not guarantee avoiding

GL_STREAM_DRAW is part of a family of usage hints that also includes GL_STATIC_DRAW and GL_DYNAMIC_DRAW, each

number
of
times,
such
as
streaming
vertex
data
or
transient
buffers
that
change
each
frame.
The
specification
suggests
that
such
data
may
be
stored
in
memory
optimized
for
streaming
access,
and
that
the
data
may
not
be
retained
in
GPU
caches
for
extended
periods.
stalls
or
that
data
will
remain
resident
in
GPU
memory.
A
common
technique
after
updating
a
buffer
is
to
orphan
its
previous
storage
by
calling
glBufferData
with
a
NULL
pointer
and
then
uploading
new
data,
which
can
reduce
or
avoid
synchronization
delays.
describing
different
expected
patterns
of
modification
and
use.
The
choice
of
hint
guides
the
driver
in
memory
placement
and
caching
decisions
and
should
reflect
the
intended
data
update
frequency
and
draw
usage.