-
Notifications
You must be signed in to change notification settings - Fork 290
Description
I have the following use case:
I need to share resources between OpenGL and Vulkan. So from the Vulkan side i create a chunk of memory and a bind a VkBuffer on that memory with VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | VK_BUFFER_USAGE_INDEX_BUFFER_BIT. Then from the OpenGL side i import the chunk of memory and create GL buffers on various offsets of that memory that are then used as vertex and index buffers.
The thing is at least on one vendor driver, creating and deleting with glBufferStorageMemEXT and glDeleteBuffers is very slow (much slower that glBufferStorage/glDeleteBuffers), so if i could create only one GL buffer and bind offsets of it would solve the problem.
On the Vulkan side i can bind the vertex and index buffers with an offset.
On the OpenGL side i cannot bind the index buffers with an offset (whereas all other buffer types can be bound with offsets through glBindVertexBuffers / glBindBufferRange)