Skip to content

[OpenGL] Binding an index buffer with offset #655

@georgeouzou

Description

@georgeouzou

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions