Preview window in OpenGL

    May 07 2010 | 5:48 am
    So I'm trying to add a preview window to my massive video performance patch as per the instructions in Recipe 39 but I seem to be missing something, or maybe the recipe has a little more than what I need?
    My chain goes video-> slab chain -> 4 bpatchers for corner-pinning that terminate in's (each bpatcher goes to a seperate layer)
    I don't have any gl.videoplanes in use like the recipe demonstrates, except for the one that I'm trying to use to send to a jit.pwindow..everything is coming from my gl.mesh's
    I guess I'm asking where I need to capture the texture i need to add @capture sc_tex to my gl.mesh's and leave a [ @name sc_tex] in my master renderer, or would it be better to somehow capture the texture at the end of the slab chain and not worry about..I've tried a couple combinations with no success yet..

    • May 07 2010 | 5:44 pm
      instead of explaining, i've created a patch that might be easier to understand than the recipe. let me know if anything is still not clear:
    • May 07 2010 | 7:41 pm
      Thanks, that got me a lot closer than I was getting last night. I'm now getting something in both windows. I ended up putting a videoplane at the end of my slab chain and before it gets split out into my 4 individual cornerpin meshes.
      I tried adding @capture finalcap to the meshes (theyre the same patch repeated with '#1' arguments to determine their layers) but only the top layer was represented in both windows. If i just stop it with a videoplane, my fullscreen window can still see the quad-warped meshes, but my preview just sees the fullframe video that comes at the end of the slabchain. Is there something else I could be doing, or would it just be easier to leave my preview window simple without capturing 4 seperate textures from the meshes?
      One more question, what would be the best way to save FPS and turn the preview window off when I need to..where should I put my gates? I'm thinking before the gl.render preview and the gl.videoplane at the end of the slabchain. I just want to avoid unnecessary operations.
      Thanks again
    • May 10 2010 | 7:28 pm
      a gl.texture can only capture a single opengl object. this is why in the jitter recipe, the capturing is done from a you must name all your gl objects, and tell you sketch to draw them with the "drawobject" message, and set the @capture on your sketch.
      you can toggle the preview context simply by putting a gate on your drawbang and erase messages to the preview
    • May 12 2010 | 5:28 am
      Amazing..I can feel my gl powers growing! haha...I got it to work after messing with the drawobject gl.sketch order and double checking my blending modes and such. This is going to help a lot when I try to make that scenewarp patch into a slab chain effect...thanks for what you do for everyone here rob!