How can I copy a texture to another texture.

Google searches haven’t given me much for what I’m trying to do, which I thought would be pretty basic.

I’m trying to copy various opengl textures into 1 larger opengl texture (to create an atlas). Assuming the source textures have the same format as the atlas itself, how would I copy them over?

This doesn’t have to perform well as it’s only done once at application startup, but I am restricted to OpenGL 4.0.

ARB_copy_image / NV_copy_image. Or copy between textures with a PBO intermediary (see this). Or can bind to FBOs and use glBlitFramebuffer. And doubtless there are other ways.

Thanks, I’ll look into those some more.