Unity-Technologies / NativeRenderingPlugin

C++ Rendering Plugin example for Unity
https://docs.unity3d.com/Manual/NativePluginInterface.html
MIT License
815 stars 163 forks source link

Prevent modifying vulkan resource that might still be used by GPU #28

Closed matas-tunkevicius closed 1 year ago

matas-tunkevicius commented 1 year ago

This PR fixes the Vertex Buffer mutation example for the Vulkan side. Since the original contents of the Plane's VB is stored in a container in this example, we only need to request a new buffer and return its mapped memory pointer.