Fill a GL_TEXTURE_2D_ARRAY with textures already loaded

Hi!

As the title states, I have a set of textures (specifically render targets textures) that I need to combine somehow. This are already loaded on GPU, is there a way to fill a GL_TEXTURE_2D_ARRAY with such textures or I have to retrieve the images from them first?

Thanks

If you render the images, the most efficient way would be to render directly into the 2d array. You just need a very simple geometry shader that sets gl_Layer​ via uniform value.
Or you can use ARB_copy_image, but this feature is kind of new and not available everywhere.

[QUOTE=Osbios;1259942]If you render the images, the most efficient way would be to render directly into the 2d array. You just need a very simple geometry shader that sets gl_Layer​ via uniform value.
Or you can use ARB_copy_image, but this feature is kind of new and not available everywhere.[/QUOTE]

The problem is that my system infrastructure doesn’t allow me to do the render directly onto the layer easily. Also, I was curious if that was possible in general, but I’m afraid is not, right?

OpenGL 3.2 brings everything you need to use layered rendering. The geometry shader is core in 3.2. The rest you need is core in 3.0.
You also could bind the layers separately onto the FBO. But changing the FBO bindings is expensive on the CPU side.