Copying buffer to/from texture

Trying to come up to speed with DSA and more recent OpenGL changes. Was wondering if there’s a way to copy buffer to/from texture in similar fashion to how Vulkan’s vkCmdCopyBufferToImage and vkCmdCopyImageToBuffer?

glTex(Sub)Image/glTextureSubImage with a buffer bound to GL_PIXEL_UNPACK_BUFFER or glGetTexImage/glGetTexture(Sub)Image with a buffer bound to GL_PIXEL_PACK_BUFFER.

The DSA versions let you specify the texture directly (rather than using the texture bound to a specific target of the active texture unit), but for anything which can use either a buffer or client memory, you have to bind the buffer to the appropriate target.

1 Like

Thanks, GClements. Exactly what I was looking for.