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 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Render to texture using FBO on ATI Radeon 9550

  1. #11
    Advanced Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    655

    Re: Render to texture using FBO on ATI Radeon 9550

    Ilian,

    What does it mean? You gave up FBO? and what are you using to get bitmap from OpenGL scenes?

    Thanks,

    Alberto

  2. #12
    Senior Member OpenGL Pro sqrt[-1]'s Avatar
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    1,000

    Re: Render to texture using FBO on ATI Radeon 9550

    devdept

    What is the point of FBO offscreen rendering? Unless you somehow do a CPU read back (via ReadPixels) or copy it into a texture (CopyTex) you are going to have to use a texture to see the result of your rendering.

    Anyway, I use FBO textures in my deferred rendering - I render light indices into a RGBA8 surface and look it up as a texture in a later pass.

    See the demo and full source here:
    http://code.google.com/p/lightindexed-deferredrender/

    I create the render buffer on this line -
    if ((lightIndexBuffer = renderer->addRenderTarget(width, height, FORMAT_RGBA8, pointClamp)) == TEXTURE_NONE) return false;

    Search for usage of lightIndexBuffer and step through the code.

  3. #13
    Senior Member OpenGL Pro Ilian Dinev's Avatar
    Join Date
    Jan 2008
    Location
    Watford, UK
    Posts
    1,290

    Re: Render to texture using FBO on ATI Radeon 9550

    devdept, I simply had decided to not use RTT initially. That app is 2D GUI, and I could easily get away with drawing the complex (necessary to cache) stuff with a fast asm software rasterizer of mine, and display that stuff via GDI DIBs.

    Uhm guys, it seems like half the time you refer to PBuffers as offscreen FBO. If that's the case, let's get the terminology right .

  4. #14
    Advanced Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    655

    Re: Render to texture using FBO on ATI Radeon 9550

    sqrt[-1],

    I gave a look to the code, it is using some different parameters for FBO like GL_DEPTH_COMPONENT24, etc. while we are using only color buffer.

    At this point I think that it is a bug in the driver with only the parameters we are using only becuase the sample is working fine on the machine where our code fails.

    Thanks so much again,

    Alberto

  5. #15
    Advanced Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    655

    Re: Render to texture using FBO on ATI Radeon 9550

    Ilian,

    I thought PBuffers were something completely different from FBO, please send me a couple of links to improve my knowledge.

    Thanks,

    Alberto

  6. #16
    Senior Member OpenGL Pro Ilian Dinev's Avatar
    Join Date
    Jan 2008
    Location
    Watford, UK
    Posts
    1,290

    Re: Render to texture using FBO on ATI Radeon 9550

    Quote Originally Posted by devdept
    I gave a look to the code, it is using some different parameters for FBO like GL_DEPTH_COMPONENT24, etc. while we are using only color buffer.
    Ah! This may be the problem! I recall vaguely that some hardware or ATi or maybe even the FBO spec _required_ a depth texture. And some posts here that whether you specify gl_depth_component, gl_depth_component16 or gl_depth_component24 did matter whether the FBO will work/become_complete. There's also an ATi requirement the depth be the first attached object to a FBO.
    Though my brain is fuzzy these days, so don't rely much on my recollections.

    PBuffer != FBO != PBO . "Offscreen FBO" is wtf... FBOs are all offscreen afaik... as they're the real RTT solution. So, I thought maybe the terminology in this thread isn't right.

  7. #17
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,264

    Re: Render to texture using FBO on ATI Radeon 9550

    I believe it is the opposite. You need to attach texture first.
    Ogre had the same problem on ATI until they changed their code.
    That's why I gave the example of the Wiki, because it always works
    http://www.opengl.org/wiki/index.php...ebuffer_object

    I thought PBuffers were something completely different from FBO, please send me a couple of links to improve my knowledge.
    You would have to be insane to use p-buffers. That extension should never have been created in the first place.
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

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

    Re: Render to texture using FBO on ATI Radeon 9550

    That extension should never have been created in the first place.
    No, PBuffers is a perfectly valid extension. Basically, it's about creating a GL context that doesn't render to the screen. Even using FBOs still requires that you have a real HWND, while PBuffers doesn't. The problem is not with the pbuffer extension, but with the corresponding WGL_ARB_render_texture extension, which is equal parts useless and stupid.

  9. #19
    Senior Member OpenGL Pro sqrt[-1]'s Avatar
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    1,000

    Re: Render to texture using FBO on ATI Radeon 9550

    Perhaps if you are not attaching a depth buffer, try setting glDisable(GL_DEPTH_TEST) just before you call to glCheckFramebufferStatus?

    Edit: also add a glDepthMask(GL_FALSE) in there as well

  10. #20
    Advanced Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    655

    Re: Render to texture using FBO on ATI Radeon 9550

    This code doesn't work on the machine with ATI Radeon 9550, it always returns a GL_INVALID_VALUE.

    Maybe this super recent driver has some bugs (ATI Technologies Inc. 8.522.0.0 dated 7/31/2008), to make it work I need to remove the FBO depth buffer lines.

    I'm quite confused.

    Even disabling GL_DEPTH test doesn't help.

    Thanks so much to all of you for your help, I will give up strugglying with this machine for a while.

    Alberto

Posting Permissions

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