Browse Source

DebugTools: mention that buffer[Sub]Data() always uses a new allocation.

To avoid a false impression that the returned Array may contain a
mapped memory and thus needs special treatment.
gltestlib-symbol-duplication
Vladimír Vondruš 4 years ago
parent
commit
06dfb8e985
  1. 10
      src/Magnum/DebugTools/BufferData.h

10
src/Magnum/DebugTools/BufferData.h

@ -60,8 +60,9 @@ namespace Implementation {
@brief Buffer subdata @brief Buffer subdata
Emulates @ref GL::Buffer::subData() call on platforms that don't support it Emulates @ref GL::Buffer::subData() call on platforms that don't support it
(such as OpenGL ES) by using @ref GL::Buffer::mapRead(). On desktop GL and (such as OpenGL ES) by using @ref GL::Buffer::mapRead() and copying the memory
WebGL 2.0 it's just an alias to @ref GL::Buffer::subData(). to a newly-allocated array. On desktop GL and WebGL 2.0 it's just an alias to
@ref GL::Buffer::subData().
@note This function is available only if Magnum is compiled with @note This function is available only if Magnum is compiled with
@ref MAGNUM_TARGET_GL "TARGET_GL" enabled (done by default). See @ref MAGNUM_TARGET_GL "TARGET_GL" enabled (done by default). See
@ -98,8 +99,9 @@ template<class T> CORRADE_DEPRECATED("use non-templated bufferSubData() and Cont
@brief Buffer data @brief Buffer data
Emulates @ref GL::Buffer::data() call on platforms that don't support it (such Emulates @ref GL::Buffer::data() call on platforms that don't support it (such
as OpenGL ES) by using @ref GL::Buffer::mapRead(). On desktop GL and WebGL 2.0 as OpenGL ES) by using @ref GL::Buffer::mapRead() and copying the memory to a
it's just an alias to @ref GL::Buffer::data(). newly-allocated array. On desktop GL and WebGL 2.0 it's just an alias to
@ref GL::Buffer::data().
@note This function is available only if Magnum is compiled with @note This function is available only if Magnum is compiled with
@ref MAGNUM_TARGET_GL "TARGET_GL" enabled (done by default). See @ref MAGNUM_TARGET_GL "TARGET_GL" enabled (done by default). See

Loading…
Cancel
Save