Before, I've used glFramebufferTexture2D to attach a texture to a framebuffer:
glFramebufferTexture2D( GL_FRAMEBUFFER, attachmentIndex, GL_TEXTURE_2D, texture->id, 0 );
Now I'm using glFramebufferTextureLayer to attach a 2D texture array's first slice to a framebuffer:
glFramebufferTextureLayer( GL_FRAMEBUFFER, attachmentIndex, texture->id, 0, 0 );
The framebuffer is reported as being complete but the textures remain black. I've tested this on both ati and nvidia cards (latest drivers) with the same result. Am I missing something?