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 7 of 7

Thread: ATI rendering to TBO and integer textures

  1. #1
    Member Regular Contributor DmitryM's Avatar
    Join Date
    Mar 2009
    Location
    Toronto
    Posts
    435

    ATI rendering to TBO and integer textures

    Hi,

    I'd like to render into a buffer object, containing a sequence of integers, under GL-3 pure context. I've tried 2 different ways - both failed for unknown (for me) reason.

    First approach - TBO.
    I'm linking a texture of type R32i with this buffer as TBO. Then I create an FBO and attach the texture into it. It gives me FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT error. Digging up the spec, I found no reason why TBO can't be attached as a render target.

    Second approach - PBO.
    I'm creating a 2D texture (could be 1D, but doesn't matter here) in order to render into it and then read the values into my buffer bound as PBO. Surprisingly, TexImage2D fails with INVALID_OPERATION if the internal format is one of the R32i,R32ui or supposedly any other integer format. It's 2011, haven't ATI got integer texture support yet?

    Platform:
    WinXP, Catalyst 11.2, Radeon 2400HD

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Apr 2003
    Posts
    669

    Re: ATI rendering to TBO and integer textures

    For a) GL_TEXTURE_BUFFER is not a valid texture target for glFramebufferTexture.

    For b) You may have specified an invalid combination of 'format' and 'type'. For integer texture internal formats, special new source format and type specifiers were introduced.

  3. #3
    Member Regular Contributor DmitryM's Avatar
    Join Date
    Mar 2009
    Location
    Toronto
    Posts
    435

    Re: ATI rendering to TBO and integer textures

    Thanks for the answer, skynet!

    a) Can you point me to the exact specification page mentioning this?

    b) You are correct. I tried to use RedInteger instead of Red and it passed. I wonder how I missed that...

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Apr 2003
    Posts
    669

    Re: ATI rendering to TBO and integer textures

    If you look through the paragraphs of FramebufferTextureXYZ(), you won't find TEXTURE_BUFFER mentioned anywhere. So I concluded, it is probably not a valid texture target there.

  5. #5
    Member Regular Contributor DmitryM's Avatar
    Join Date
    Mar 2009
    Location
    Toronto
    Posts
    435

    Re: ATI rendering to TBO and integer textures

    For all other values of textarget, level must be greater than or equal to zero and no larger than log2 of the value of MAX_TEXTURE_SIZE. Otherwise, an INVALID_VALUE error is generated.
    The spec doesn't specify TextureBuffer as an exclusion, so it implicitly falls under "all other values of textarget".

  6. #6
    Advanced Member Frequent Contributor
    Join Date
    Apr 2003
    Posts
    669

    Re: ATI rendering to TBO and integer textures

    GL 3.2 core specs, p. 227

    FramebufferTexture( enum target, enum attachment,
    uint texture, int level );
    ...
    An INVALID_OPERATION error is generated if texture is the name
    of a buffer texture.

  7. #7
    Member Regular Contributor DmitryM's Avatar
    Join Date
    Mar 2009
    Location
    Toronto
    Posts
    435

    Re: ATI rendering to TBO and integer textures

    Thanks again. Perfect answer!

Posting Permissions

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