Results 1 to 5 of 5

Thread: realtime filter

  1. #1
    Guest

    realtime filter

    i try to write filter, which is doing some operations on correponding pixels of on my opengl window.

    it`s looking like:

    render_stuff
    glReadPixels(..)
    do_some_operations_on_readed_table
    glWritePixels(..)
    wglSwapBuffers(..)
    jump to render_stuff

    but it`s not working, and it`s slow like hell..
    maybe someone did it before me? i will be very grateful for any kind of help.

  2. #2
    Guest

    Re: realtime filter

    and.. i forgot: no shaders. i`ve got riva tnt2..

  3. #3
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Naarn, Austria
    Posts
    1,102

    Re: realtime filter

    Getting data back from the GPU is always extremely slow.

    If you can't use shaders, I'm afraid you are out of luck here. The normal procedure to do this kind of operation is:

    - render scene to a texture
    - render a fullscreen quad using the texture and a postprocessing shader

    If the operation is simple enough, perhaps you could use combiners and/or a multipass algorithm with blending to perform it.

  4. #4
    Guest

    Re: realtime filter

    but still i can:

    - render scene to a texture
    - do some operations on the texture, like xor or and
    - render a fullscreen quad using the texture

    and it still should be fast..?

  5. #5
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Naarn, Austria
    Posts
    1,102

    Re: realtime filter

    You can't directly modify a texture, the only thing you can do is render it. But of course you can render a fullscreen quad with the texture and use for example glLogicOp(GL_XOR).

    I don't know how fast glLogicOp is on a TNT2, but I think it's worth trying it out.

Similar Threads

  1. realtime mouse picking
    By akuda in forum OpenGL: Advanced Coding
    Replies: 30
    Last Post: 06-21-2006, 07:25 AM
  2. ARB unit 2 realtime updating
    By AIRmichael in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 07-03-2003, 12:12 AM
  3. realtime hatching
    By Arath in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 09-11-2002, 02:04 AM
  4. Realtime Skeletal Deformation
    By Asshen Shugar in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 01-20-2001, 01:06 AM
  5. Realtime Skeletal Deformation
    By Asshen Shugar in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 01-20-2001, 01:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean