Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Texture arrays and framebuffer objects

  1. #1
    Member Regular Contributor
    Join Date
    Jul 2005
    Location
    Germany
    Posts
    306

    Texture arrays and framebuffer objects

    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:

    Code :
    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:

    Code :
    glFramebufferTextureLayer( GL_FRAMEBUFFER, attachmentIndex, texture->id, 0, 0 );

    The framebuffer is reported as being complete but the textures remain black. Am I missing something?

    Thank you!


    edit: tested on both ati and nvidia (latest drivers) with the same result.
    Last edited by Vexator; 05-26-2012 at 12:49 AM.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,135
    Shaders please.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •