Skip to content

[OpenGL] Binding an index buffer with offset #655

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)

Activity

  1. changed the title [-]Binding an index buffer with offset[/-] [+][OpenGL] Binding an index buffer with offset[/+] on Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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