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 2 12 LastLast
Results 1 to 10 of 13

Thread: Render to texture, without FBO

  1. #1
    Junior Member Regular Contributor
    Join Date
    Mar 2009
    Location
    California
    Posts
    192

    Render to texture, without FBO

    I have an Intel GMA 3150 I am testing on that only supports OpenGL 1.4. I don't see the framebufferobject extension in the extensions string.

    Is there any other alternative to allow rendering to a texture? I don't care if it's slow, but it needs to be reliable on all cards. Is the pixel buffer thing usable? I have always used FBO in the past.

  2. #2
    Member Regular Contributor
    Join Date
    Nov 2003
    Location
    Czech Republic
    Posts
    317

    Re: Render to texture, without FBO

    You can use old PBuffer (see WGL_ARB_pbuffer) and then copy the content to the texture with glCopyTexSubImage2D.

    NVIDIA even has an extension to render directly to texture without FBO. It is called WGL_ARB_render_texture but I doubt this is supported by Intel.

  3. #3
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948

    Re: Render to texture, without FBO

    NVIDIA even has an extension to render directly to texture without FBO. It is called WGL_ARB_render_texture but I doubt this is supported by Intel.
    As the name suggests, it's not an NVIDIA-specific extension. But it is a really horrible extension to actually use. Avoid it under any circumstances; it's better to just copy the pixel data.

  4. #4
    Member Regular Contributor
    Join Date
    Dec 2007
    Posts
    253

    Re: Render to texture, without FBO

    just render to the back buffer then do glCopyTexSubImage2D
    done !

  5. #5
    Senior Member OpenGL Pro BionicBytes's Avatar
    Join Date
    Mar 2009
    Location
    UK, London
    Posts
    1,170

    Re: Render to texture, without FBO

    Quote Originally Posted by dukey
    just render to the back buffer then do glCopyTexSubImage2D
    done !
    ...remebering to set the view port size to the size of your texture (which can't be larger than your backbuffer dimensions)

  6. #6
    Member Regular Contributor
    Join Date
    Nov 2003
    Location
    Czech Republic
    Posts
    317

    Re: Render to texture, without FBO

    Quote Originally Posted by Alfonse Reinheart
    it is a really horrible extension to actually use. Avoid it under any circumstances;.
    I was using it before FBO with no major issues. Back then it was the only way. There is also NV specific extension for rectangle texture that works well.

  7. #7
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,215

    Re: Render to texture, without FBO

    Quote Originally Posted by BionicBytes
    Quote Originally Posted by dukey
    just render to the back buffer then do glCopyTexSubImage2D
    done !
    ...remebering to set the view port size to the size of your texture (which can't be larger than your backbuffer dimensions)
    Your texture actually can be larger and you can glCopyTexSubImage2D to a portion of it; it works Just Fine, is very fast, and is probably eminently suitable for simpler use cases.

  8. #8
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948

    Re: Render to texture, without FBO

    I was using it before FBO with no major issues.
    That doesn't mean it isn't a terrible extension. It "functioned", but that doesn't mean that the extension isn't unintuitive.

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

    Re: Render to texture, without FBO

    Intel should implement GL_EXT_framebuffer_object. It is simpler than that p-buffer mess.
    p-buffer + rendertexture is an even bigger mess.
    And all the other crap extensions around p-buffers.

    You would get better performance with glCopyTexSubImage2D than p-buffer which is essentially a context switch.
    ------------------------------
    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);

  10. #10
    Junior Member Regular Contributor
    Join Date
    Mar 2009
    Location
    California
    Posts
    192

    Re: Render to texture, without FBO

    If pixel buffers are reliable, I don't care how hard it is to code. Performance is also irrelevant.

    Rendering to the back buffer is not an option because my engine API states that my "buffers" are separate rendering targets that do not interfere with the back buffer.

Posting Permissions

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