Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: FBO, ATI and rectangle textures

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

    FBO, ATI and rectangle textures

    Yesterday I tried FBO for the first time. I must say: straight forward and easy API!

    Standard RTT was implemented rather quickly, after that I tried some more "delicate" setups. Here are some findings and questions:

    1. NPOT
    NPOT worked out of the box. Just give your framebuffer npot-dimensions and it magically works. Downside: its so slow that you canīt use it. I obviously hit some software emulation path.
    I knew that ATI does not support ARB_npot _fully_, but AFAIR Humus stated that you can get some kind of npot on current ATI cards (I got a R9800). My question is: what precautions do I have to take in order to get hw-accerlerated NPOT textures on my ATI card?

    2. Rectangle Textures
    My card exposes "EXT_texture_rectangle". So I wanted to give it a try. Unfortunately FramebufferTexture2DEXT() returns GL_INVALID_OPERATION if I use GL_TEXTURE_RECTANGLE_EXT as texture target.

    3. Render-to-Depth Texture
    I just tried to setup a framebuffer and see what happens. So I created a texture with GL_DEPTH_COMPONENT as internal format and attached it to the DEPTH_ATTACHMENT point. No color-attachment was set. After setting the drawbuffer to GL_NONE, the framebuffer was considered 'complete'.
    Actually I did not try to use that buffer. I leave that as exercise for the reader ;-)

    4. Stencil Attachments.
    I tried to attach a stencil-renderbuffer to the STENCIL_ATTACHMENT point. Surprisingly I got 'unsupported' completness. Does that mean, one canīt use stencil buffers for offscreen rendering?

    5. Render-to-Float texture
    Worked as expected. Just set the internal format of the texture to one of the ARB_float_texture formats. Of course there are still the usual limitations like having no blending.

    Well, to sum it up: FBO is really nice, but how to get render-to-rectangle/npot working (and hw-accelerated!) on ATI cards?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    3,576

    Re: FBO, ATI and rectangle textures

    My question is: what precautions do I have to take in order to get hw-accerlerated NPOT textures on my ATI card?
    Don't use MipMaps.

    2. Rectangle Textures
    Rectangular textures are not 2D textures. They are their own texture type. So, until FBO gets extended with an entrypoint for them, you can't use them with FBO.

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Jan 2001
    Location
    NVIDIA, Austin, TX
    Posts
    555

    Re: FBO, ATI and rectangle textures

    Originally posted by Korval:
    Rectangular textures are not 2D textures. They are their own texture type. So, until FBO gets extended with an entrypoint for them, you can't use them with FBO.
    The EXT_framebuffer_object extension already supports rectangle textures.
    For FramebufferTexture2DEXT, if <texture> is not zero, then
    <textarget> must be one of: TEXTURE_2D, TEXTURE_RECTANGLE,
    TEXTURE_CUBE_MAP_POSITIVE_X, TEXTURE_CUBE_MAP_POSITIVE_Y,
    TEXTURE_CUBE_MAP_POSITIVE_Z, TEXTURE_CUBE_MAP_NEGATIVE_X,
    TEXTURE_CUBE_MAP_NEGATIVE_Y, or TEXTURE_CUBE_MAP_NEGATIVE_Z.

  4. #4
    Intern Newbie
    Join Date
    Jun 2005
    Posts
    30

    Re: FBO, ATI and rectangle textures

    Am I right in thinking you have OpenGL Framebuffer Objects working on an ATI card?

    I didnt think they had released drivers that supported them yet...

    Do the Cat 5.6 drivers enable them?

  5. #5
    Member Regular Contributor
    Join Date
    May 2001
    Location
    Beloit, Wisconsin
    Posts
    473

    Re: FBO, ATI and rectangle textures

    The 5.6 drivers have limited FBO support.

  6. #6
    Senior Member OpenGL Guru Humus's Avatar
    Join Date
    Mar 2000
    Location
    Stockholm, Sweden
    Posts
    2,345

    Re: FBO, ATI and rectangle textures

    Originally posted by skynet:
    what precautions do I have to take in order to get hw-accerlerated NPOT textures on my ATI card?
    Avoid mipmaps and GL_REPEAT.

    2. Rectangle Textures
    I'd suggest sticking to NPOT.

    4. Stencil Attachments.
    I tried to attach a stencil-renderbuffer to the STENCIL_ATTACHMENT point. Surprisingly I got 'unsupported' completness. Does that mean, one canīt use stencil buffers for offscreen rendering?
    Stencil is a bit tricky. The FBO spec is more flexible than the hardware. The hardware wants depth and stencil together in a D24S8 format. Since depth and stencil renderbuffers are created independently and you can freely swap depth and stencil attachments as you like this is hard to implement. There has been talks within the ARB to make special D24S8 renderbuffers, but I'm not sure what turned out of that.

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

    Re: FBO, ATI and rectangle textures

    Stencil is a bit tricky. The FBO spec is more flexible than the hardware. The hardware wants depth and stencil together in a D24S8 format. Since depth and stencil renderbuffers are created independently and you can freely swap depth and stencil attachments as you like this is hard to implement. There has been talks within the ARB to make special D24S8 renderbuffers, but I'm not sure what turned out of that.
    Thatīs what I was thinking when the FBO specs came out. But I expected that it would be solved "behind the scenes" somehow (I guess those 'intrinsic buffers' are related to this subject). Maybe the ARB should introduce a new attachment point, like "DEPTH_STENCIL_ATTACHMENT_EXT" and provide new internalformats for renderbuffers, like DEPTH24_STENCIL8_EXT. Would be easy to integrate and easy to use.

    Anyway, will the final ATI implementation of FBO also support TEXTURE_RECTANGLE_EXT as texture target for attached textures?

  8. #8
    Member Regular Contributor
    Join Date
    Apr 2004
    Location
    UK
    Posts
    420

    Re: FBO, ATI and rectangle textures

    Originally posted by NitroGL:
    The 5.6 drivers have limited FBO support.
    ah, that could be usefull, the entry points have been in for some time but lack of presence in the extension string didnt fill me with hope

    Any word on how limited they are? For example, any chance of being able to use them and GLSL for MRT output? (standard 32bit or floating point)

    I'd check myself but I'm kinda busy atm and dont have the time

  9. #9
    Member Regular Contributor
    Join Date
    May 2001
    Location
    Beloit, Wisconsin
    Posts
    473

    Re: FBO, ATI and rectangle textures

    Originally posted by bobvodka:
    ah, that could be usefull, the entry points have been in for some time but lack of presence in the extension string didnt fill me with hope

    Any word on how limited they are? For example, any chance of being able to use them and GLSL for MRT output? (standard 32bit or floating point)

    I'd check myself but I'm kinda busy atm and dont have the time
    Well, from my testing...
    No RGB[A]16 rendering
    No cube map textures
    No rectangle textures
    FSAA causes a system lock up (on my machine at least)

    Normal 2D textures work, as does floating point textures (all formats). I didn't try MRT, but it might work.

  10. #10
    Junior Member Regular Contributor fenris's Avatar
    Join Date
    Mar 2000
    Location
    Cincinnati, Ohio USA
    Posts
    129

    Re: FBO, ATI and rectangle textures

    I'd suggest sticking to NPOT.
    Here's my problem with that suggestion, and if I've missed something, by all means let me know I think ATI should just support ARB_texture_rectangle and add the rect sampling support to GLSL that this extension includes. It would make our lives, the developers, a HELL of a lot easier. As it is now with my current project, I target DX9 level HW. Using NPOT would be fine, except the NV3x line of cards fall in this category, and do not support them. They do support texture rects, as do all ATI cards (EXT_texture_rectangle). ATI can't sample rects in GLSL due to missing ARB_texture_rectangle support. So now I have to have 2 versions of any shader that does anything with framebuffer post-processing effects (which I have a lot of). One for NPOT (texture2D) and one for RECTs (texture2DRect). This is very frustrating, and it's even more frustrating to know that I could just use ARB_texture_rectangle if ATI would support it. My other problem with this is ATI doesn't even expose NPOT support through the extension strings. So detecting support for NPOT so that I can do a dual NPOT/Rect path is made difficult. I could parse the version string for 2.0, but on linux this is a no go. ATI linux drivers seem to be permenantly stuck at 1.3, with no signs of that ever chaning. So I'm completely screwed

Posting Permissions

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