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

Thread: Fastest and Easiest Render-to-Texture method?

  1. #1
    Intern Newbie
    Join Date
    Jul 2004
    Posts
    31

    Fastest and Easiest Render-to-Texture method?

    The first method is using glCopyTex(Sub)Image?D, easy but slow.
    Another: WGL_ARB_render_texture, need multiple render context.
    GL_EXT_frame_buffer_object, not widely supported currently.

    Are there any other good methods?

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

    Re: Fastest and Easiest Render-to-Texture method?

    Are you sure glCopyTexSubImage is slow? I use it all the time and a lot of games use it (Doom3/ Call of Duty) You have any stats to quote on relative speeds?

  3. #3
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,609

    Re: Fastest and Easiest Render-to-Texture method?

    slow? to backup sqrt-1 from memory testing im getting something like 3billion pixels a second! with copytexsubimage, perhaps youre not using it with the correct path

  4. #4
    Junior Member Regular Contributor
    Join Date
    Feb 2005
    Location
    South Tyrol, Italy
    Posts
    105

    Re: Fastest and Easiest Render-to-Texture method?

    I did not do any testing but I think glCopyTexSubimage must be slower than using GL_EXT_framebuffer_object because it has to copy the pixel data from the framebuffer instead of rendering directly into the texture in the first place.

    If using a p-buffer or GL_EXT_framebuffer_object would not be faster, why would I use them for anything else than rendering to floating point textures, or textures which are larger than the framebuffer?

  5. #5
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Fastest and Easiest Render-to-Texture method?

    A pbuffer is faster because there is less data transfert, but there is the cost of switching rendering context.
    My small tests gave pbuffer about 20% faster for 512x512 rgba textures.
    With GL_EXT_framebuffer_object it should be better.

    However to me the problem of simple glCopyTexSubimage is not really performance but generality : no way to handle textures bigger than viewport, and undefined behaviour when other windows overlap part of the copied window.

Posting Permissions

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