mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2024-11-05 04:10:06 +00:00
Small addition to the documentation.
This commit is contained in:
parent
a2c411cc49
commit
9137407734
@ -133,6 +133,8 @@ memReq.usage = VMA_MEMORY_USAGE_GPU_ONLY;
|
||||
|
||||
VkBuffer buffer;
|
||||
vmaCreateBuffer(allocator, &bufferInfo, &memReq, &buffer, nullptr, nullptr);
|
||||
</pre><p>When no longer needed, destroy your buffer or image using <a class="el" href="group__layer3.html#ga967857c06b8232b2a54936daf36d1535">vmaDestroyBuffer()</a> / <a class="el" href="group__layer3.html#ga9377799736c4a1262b41ee441e5fc877">vmaDestroyImage()</a>. This function would also free memory bound to it.</p>
|
||||
<pre class="fragment">vmaDestroyBuffer(allocator, buffer);
|
||||
</pre><h1><a class="anchor" id="configuration"></a>
|
||||
Configuration</h1>
|
||||
<p>Set VMA_STATS_STRING_ENABLED macro in <a class="el" href="vk__mem__alloc_8h.html">vk_mem_alloc.h</a> to 0 or 1 to disable/enable compilation of code for dumping internal allocator state to string in JSON format.</p>
|
||||
|
File diff suppressed because one or more lines are too long
@ -122,6 +122,12 @@ When you want to create a buffer or image:
|
||||
VkBuffer buffer;
|
||||
vmaCreateBuffer(allocator, &bufferInfo, &memReq, &buffer, nullptr, nullptr);
|
||||
|
||||
When no longer needed, destroy your buffer or image using vmaDestroyBuffer() / vmaDestroyImage().
|
||||
This function would also free memory bound to it.
|
||||
|
||||
|
||||
vmaDestroyBuffer(allocator, buffer);
|
||||
|
||||
\section configuration Configuration
|
||||
|
||||
Set VMA_STATS_STRING_ENABLED macro in vk_mem_alloc.h to 0 or 1 to disable/enable
|
||||
|
Loading…
Reference in New Issue
Block a user