Problem rendering into a Texture Array

I have been trying for a couple of days to render simultaneously into multiple (2) layers of a 2D Texture Array without success. I am binding each layer to a color buffer of a FBO via “glFramebufferTextureLayerEXT”, I well activate each render buffer via “glDrawBuffers” and I am writing values within a fragment shader (gl_FragData[n]) in GLSL.
In fact I am getting the deprecated “GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT” framebuffer status and I wonder if rendering simultaneously into multiple layers is possible since the texture array specs is unclear on that point.

I am working on a 8800GTS with 97.92 windows drivers.

Hi Cyril,

Texture arrays are separate targets, so you can’t bind them to different MRT elements.

Also, you cannot choose on a per-fragment basis which target is written. You can choose on a per-primitive basis from within the geometry program.

Thanks -
Cass

Hi Cass,
Thank you for your response.
But I don’t very well understand while the fact that each layer of a texture array is part of the same target prevent them to be bound simultaneously to different MRT element ? I didn’t read this restriction anywhere. Is this an hardware limitation or will this be possible with drivers update ?
This possibility would be very useful particularly since we have 8 render targets allowing to write data to 8 layers of a texture array within a shader.

With a texture array render target you can select which layer each primitive is drawn to by using a geometry shader. You aren’t limited by the max render targets in this case - you can write to any of the layers.

Yes I have seen this within the spec, but my goal is to write into multiple layers simultaneously from a fragment shader.