Advertisement
whillothewhisp

Read data from host-visible ssbo

Jan 5th, 2022 (edited)
2,202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1.         //Object to map data into
  2.         ssbo_object_picking p;
  3.        
  4.         //map gpu memory into data
  5.         void* data;
  6.         vkMapMemory(device, buffer_memory, 0, sizeof(ssbo_object_picking), 0, &data);
  7.        
  8.         //copy from data into p
  9.         memcpy(&p, data, sizeof(ssbo_object_picking));
  10.  
  11.         //unmap gpu memory
  12.         vkUnmapMemory(device, buffer_memory);
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement