Jump to content


Texture arrays and framebuffer objects


  • You cannot reply to this topic
No replies to this topic

#1 vexator

    New Member

  • Members
  • Pip
  • 6 posts

Posted 26 May 2012 - 09:00 AM

I'm switching from regular 2D textures to 2D texture arrays. Texture creation and look-up in shaders works fine but I can't seem to get them working with fbo's.

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?

Thank you!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users