SceneProcess


    Jan 13 2006 | 10:56 pm
    Hi List, If you are like me, then you probably get tired of the clean edges and sterility of the OpenGL view, but can't afford to render to a matrix because of frame rate loss. Well, this week's example offers a remedy to this bothersome conflict.
    Since Jitter 1.5, we have a nice collection of texture-processing tools (jit.gl.slab,jit.gl.texture,jit.gl.shader, and the jitter-shader library). This allows the clever jitter user to do most of her processing on the GPU, thus freeing up her CPU to do things like generating clicks and beeps. This example uses the capture attribute of jit.gl.objects to render the OpenGL scene to a texture (everything stays on the GPU), which is then processed using some jit.gl.slab objects with different shaders. For more excitement, I heartily recommend learning to write your own shaders (most consist of only about 5 lines of code).
    Enjoy the long weekend! Happy Patching. Andrew B. Cycling '74

    • Jan 13 2006 | 11:07 pm
      Sorry About That!
      I posted a non-working version
      This one will work(hopefully) ;)
      Andrew B.
    • Jan 16 2006 | 3:43 am
      Hi.
      Question:
      @capture only seems to work for one gl object. IE: if I have 2 gl objects with @capture 'destination', then the texture named destination seems to take the first gl object and render only that to the texture. ie: capture is 1 to 1, one GL object one texture. This makes sense to me, however:
      Id like to 'capture' the whole scene. I know jit.gl.render has to_texture, but I get this error when sending that message:
      warning: method screen_grab called on invalid object
      ive looked in the jitter examples, and in the html, and I see no example of using it to capture a full scene to a texture. Whats the best way to go about doing this? @caputure seems quite fast... Is there any chance someone could throw a simple multi jit.gl.* patch (say 3 jit.gl.models ) that are all captures to a texture which can be slabbed all day long?
      thanks for all the prior jitter example patches - they've been most enlightening.
      v a d e //
      www.vade.info abstrakt.vade.info