Rendering OpenGL to Multiple Windows


    Jul 05 2006 | 5:47 pm
    Hi Andrew,
    You just have to send the drawto message to your jit.gl.model object
    as well. But switching the drawing destination for a bunch of
    objects and a renderer on every frame may get quite slow.
    It might help you to look at the render_node patch I made for dealing
    with this and some other common Jitter issues. The patch is at
    http://2uptech.com/archive . It implements a preview window using
    render-to-texture and slabs.
    best,
    Randy

    • Jul 05 2006 | 4:41 pm
      update your other gl objects context name. the jit.gl.model also must
      receive the drawto target message.
      v a d e //
      www.vade.info
      abstrakt.vade.info
      On Jul 5, 2006, at 12:22 PM, Andrew Walker wrote:
      > Hi,
      >
      > I'm trying to get an OpenGL scene (made up from a large number of
      > jit.gl.model instances) to display on multiple monitors.
      > Ultimately, I need to send this to a jit.pwindow (for previewing on
      > the user interface), and a jit.window (for fullscreen output) -
      > which I understand require two instances of jit.gl.render, but just
      > getting jit.gl.render to render to anywhere other than the name of
      > the window passed to it as an initial argument would be a start.
      >
      > The patch below demonstrates the problem I'm having. Rendering to
      > the window 'foo' is no problem, - but if you instruct it to 'drawto
      > bar' or 'drawto baz', it seems to attempt to render to the windows,
      > but nothing actually appears in them.
      >
      > I've also tried a number of variations on this theme, all with the
      > same results. Any pointers on where I'm going wrong would be
      > greatly appreciated!
      >
      > Many thanks in advance,
      >
      > Andrew Walker
      >
      > max v2;
      > #N vpatcher 31 90 541 417;
      > #P window setfont "Sans Serif" 9.;
      > #P window linecount 1;
      > #P comment 174 19 100 196617 Start rendering;
      > #P window linecount 4;
      > #P newex 34 226 115 196617 jit.window foo @depthbuffer 1 @rect 614
      > 76 934 316 @floating 1;
      > #P window linecount 1;
      > #P message 309 119 60 196617 drawto baz;
      > #P window linecount 4;
      > #P newex 158 226 110 196617 jit.window bar @depthbuffer 1 @rect 614
      > 330 934 570 @floating 1;
      > #P window linecount 1;
      > #P message 309 97 60 196617 drawto bar;
      > #P newex 175 98 105 196617 jit.qball @mode usurp;
      > #P toggle 175 48 15 0;
      > #P newex 175 75 55 196617 metro 20;
      > #P newex 175 122 55 196617 t b b erase;
      > #P message 31 49 109 196617 read mushrooms.obj;
      > #P window linecount 4;
      > #P newex 275 226 121 196617 jit.window baz @depthbuffer 1 @rect 614
      > 586 934 826 @floating 1;
      > #P window linecount 1;
      > #P newex 175 174 82 196617 jit.gl.render foo;
      > #P window linecount 4;
      > #P newex 31 74 105 196617 jit.gl.model foo @smooth_shading 1
      > @depth_enable 1 @lighting_enable 1;
      > #P window linecount 1;
      > #P comment 31 18 100 196617 Read a file;
      > #P window linecount 2;
      > #P comment 378 97 100 196617 << Draw to somewhere else;
      > #P connect 5 0 2 0;
      > #P connect 8 0 7 0;
      > #P connect 7 0 9 0;
      > #P connect 9 0 6 0;
      > #P connect 12 0 3 0;
      > #P connect 10 0 3 0;
      > #P connect 6 2 3 0;
      > #P connect 6 0 3 0;
      > #P pop;
      >
      >
      >
      > Want to be your own boss? Learn how on Yahoo! Small Business.
    • Jul 05 2006 | 5:02 pm
      On 7/5/06, Andrew Walker wrote:
      > Hi,
      >
      > I'm trying to get an OpenGL scene (made up from a large number of
      > jit.gl.model instances) to display on multiple monitors. Ultimately, I need
      > to send this to a jit.pwindow (for previewing on the user interface), and a
      > jit.window (for fullscreen output) - which I understand require two
      > instances of jit.gl.render, but just getting jit.gl.render to render to
      > anywhere other than the name of the window passed to it as an initial
      > argument would be a start.
      >
      > The patch below demonstrates the problem I'm having. Rendering to the window
      > 'foo' is no problem, - but if you instruct it to 'drawto bar' or 'drawto
      > baz', it seems to attempt to render to the windows, but nothing actually
      > appears in them.
      >
      > I've also tried a number of variations on this theme, all with the same
      > results. Any pointers on where I'm going wrong would be greatly appreciated!
      >
      > Many thanks in advance,
      >
      > Andrew Walker
      >
      > max v2;
      > #N vpatcher 31 90 541 417;
      > #P window setfont "Sans Serif" 9.;
      > #P window linecount 1;
      > #P comment 174 19 100 196617 Start rendering;
      > #P window linecount 4;
      > #P newex 34 226 115 196617 jit.window foo @depthbuffer 1 @rect 614 76 934
      > 316 @floating 1;
      > #P window linecount 1;
      > #P message 309 119 60 196617 drawto baz;
      > #P window linecount 4;
      > #P newex 158 226 110 196617 jit.window bar @depthbuffer 1 @rect 614 330 934
      > 570 @floating 1;
      > #P window linecount 1;
      > #P message 309 97 60 196617 drawto bar;
      > #P newex 175 98 105 196617 jit.qball @mode usurp;
      > #P toggle 175 48 15 0;
      > #P newex 175 75 55 196617 metro 20;
      > #P newex 175 122 55 196617 t b b erase;
      > #P message 31 49 109 196617 read mushrooms.obj;
      > #P window linecount 4;
      > #P newex 275 226 121 196617 jit.window baz @depthbuffer 1 @rect 614 586 934
      > 826 @floating 1;
      > #P window linecount 1;
      > #P newex 175 174 82 196617 jit.gl.render foo;
      > #P window linecount 4;
      > #P newex 31 74 105 196617 jit.gl.model foo @smooth_shading 1 @depth_enable 1
      > @lighting_enable 1;
      > #P window linecount 1;
      > #P comment 31 18 100 196617 Read a file;
      > #P window linecount 2;
      > #P comment 378 97 100 196617 << Draw to somewhere else;
      > #P connect 5 0 2 0;
      > #P connect 8 0 7 0;
      > #P connect 7 0 9 0;
      > #P connect 9 0 6 0;
      > #P connect 12 0 3 0;
      > #P connect 10 0 3 0;
      > #P connect 6 2 3 0;
      > #P connect 6 0 3 0;
      > #P pop;
      >
      >
      >
      >
      > ________________________________
      > Want to be your own boss? Learn how on Yahoo! Small Business.
      >
      >
      >
      >
      >