jit.window depthbuffer/slab bug?


    Jan 30 2009 | 8:03 pm
    it seems like jit.window depthbuffer 1
    does not like jit.slab effects. see this patch adapted from the examples -- tp.slide has no effect with depthbuffer turned on. toggling on/off a few times sometimes gets it back to work, but it seems random when it does so. other shaders break too.
    my system max 5.0.5
    mbp 2.1ghz intel atix1600
    ///////////begin max match
    {
    "boxes" : [ {
    "box" : {
    "maxclass" : "newobj",
    "text" : "loadbang",
    "outlettype" : [ "bang" ],
    "id" : "obj-32",
    "fontname" : "Arial",
    "hidden" : 1,
    "patching_rect" : [ 30.0, 15.0, 58.0, 20.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 1,
    "numoutlets" : 1
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "loadmess 10.",
    "outlettype" : [ "" ],
    "id" : "obj-31",
    "fontname" : "Arial",
    "hidden" : 1,
    "patching_rect" : [ 465.0, 165.0, 79.0, 20.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 1,
    "numoutlets" : 1
    }
    }
    , {
    "box" : {
    "maxclass" : "flonum",
    "outlettype" : [ "float", "bang" ],
    "id" : "obj-30",
    "fontname" : "Arial",
    "patching_rect" : [ 420.0, 165.0, 50.0, 20.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 1,
    "numoutlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "toggle",
    "outlettype" : [ "int" ],
    "id" : "obj-26",
    "patching_rect" : [ 510.0, 30.0, 20.0, 20.0 ],
    "numinlets" : 1,
    "numoutlets" : 1
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "depthbuffer $1",
    "outlettype" : [ "" ],
    "id" : "obj-24",
    "fontname" : "Arial",
    "patching_rect" : [ 510.0, 75.0, 85.0, 18.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 2,
    "numoutlets" : 1
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "jit.window poof @depthbuffer 1",
    "outlettype" : [ "bang", "" ],
    "id" : "obj-22",
    "fontname" : "Arial",
    "patching_rect" : [ 358.0, 113.0, 170.0, 20.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 1,
    "numoutlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "fullscreen $1",
    "outlettype" : [ "" ],
    "id" : "obj-21",
    "fontname" : "Arial",
    "patching_rect" : [ 358.0, 93.0, 76.0, 18.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 2,
    "numoutlets" : 1
    }
    }
    , {
    "box" : {
    "maxclass" : "toggle",
    "outlettype" : [ "int" ],
    "id" : "obj-20",
    "patching_rect" : [ 305.0, 135.0, 20.0, 20.0 ],
    "numinlets" : 1,
    "numoutlets" : 1
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "sel 27",
    "outlettype" : [ "bang", "" ],
    "id" : "obj-19",
    "fontname" : "Arial",
    "patching_rect" : [ 305.0, 113.0, 41.0, 20.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 2,
    "numoutlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "key",
    "outlettype" : [ "int", "int", "int", "int" ],
    "id" : "obj-18",
    "fontname" : "Arial",
    "patching_rect" : [ 305.0, 91.0, 46.0, 20.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 0,
    "numoutlets" : 4
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "jit.gl.videoplane poof",
    "outlettype" : [ "jit_matrix", "" ],
    "id" : "obj-17",
    "fontname" : "Arial",
    "patching_rect" : [ 117.0, 322.0, 116.0, 20.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 1,
    "numoutlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "jit.gl.texture poof @defaultimage black",
    "outlettype" : [ "jit_gl_texture", "" ],
    "id" : "obj-16",
    "fontname" : "Arial",
    "patching_rect" : [ 139.0, 283.0, 207.0, 20.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 1,
    "numoutlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "flonum",
    "outlettype" : [ "float", "bang" ],
    "id" : "obj-15",
    "fontname" : "Arial",
    "patching_rect" : [ 364.0, 192.0, 50.0, 20.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 1,
    "numoutlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "param slide_down $1",
    "outlettype" : [ "" ],
    "id" : "obj-14",
    "fontname" : "Arial",
    "patching_rect" : [ 364.0, 215.0, 121.0, 18.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 2,
    "numoutlets" : 1
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "param slide_up $1",
    "outlettype" : [ "" ],
    "id" : "obj-13",
    "fontname" : "Arial",
    "patching_rect" : [ 256.0, 215.0, 106.0, 18.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 2,
    "numoutlets" : 1
    }
    }
    , {
    "box" : {
    "maxclass" : "flonum",
    "outlettype" : [ "float", "bang" ],
    "id" : "obj-12",
    "fontname" : "Arial",
    "patching_rect" : [ 256.0, 192.0, 50.0, 20.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 1,
    "numoutlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "jit.gl.slab poof @file tp.slide.jxs",
    "outlettype" : [ "jit_gl_texture", "" ],
    "id" : "obj-11",
    "fontname" : "Arial",
    "patching_rect" : [ 117.0, 246.0, 169.0, 20.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 2,
    "numoutlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "jit.fpsgui",
    "outlettype" : [ "", "" ],
    "id" : "obj-10",
    "fontname" : "Arial",
    "patching_rect" : [ 15.0, 231.0, 80.0, 35.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 1,
    "numoutlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "jit.gl.render poof @ortho 2",
    "linecount" : 2,
    "outlettype" : [ "bang", "" ],
    "id" : "obj-9",
    "fontname" : "Arial",
    "patching_rect" : [ 38.0, 187.0, 83.0, 33.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 1,
    "numoutlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "t b b erase",
    "outlettype" : [ "bang", "bang", "erase" ],
    "id" : "obj-8",
    "fontname" : "Arial",
    "patching_rect" : [ 15.0, 157.0, 65.0, 20.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 1,
    "numoutlets" : 3
    }
    }
    , {
    "box" : {
    "maxclass" : "jit.pwindow",
    "outlettype" : [ "", "" ],
    "id" : "obj-7",
    "patching_rect" : [ 138.0, 121.0, 80.0, 60.0 ],
    "numinlets" : 1,
    "numoutlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "jit.qt.movie @adapt 1",
    "outlettype" : [ "jit_matrix", "" ],
    "id" : "obj-6",
    "fontname" : "Arial",
    "patching_rect" : [ 117.0, 95.0, 120.0, 20.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 1,
    "numoutlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "read dozer.mov",
    "outlettype" : [ "" ],
    "id" : "obj-5",
    "fontname" : "Arial",
    "patching_rect" : [ 136.0, 68.0, 91.0, 18.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 2,
    "numoutlets" : 1
    }
    }
    , {
    "box" : {
    "maxclass" : "comment",
    "text" : "• PROBLEM: After togglng this, temporal effects do not workn",
    "linecount" : 2,
    "id" : "obj-4",
    "fontname" : "Arial",
    "patching_rect" : [ 540.0, 30.0, 201.0, 33.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 1,
    "numoutlets" : 0
    }
    }
    , {
    "box" : {
    "maxclass" : "number",
    "outlettype" : [ "int", "bang" ],
    "id" : "obj-3",
    "fontname" : "Arial",
    "patching_rect" : [ 161.0, 11.0, 50.0, 20.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 1,
    "numoutlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "qmetro 20",
    "outlettype" : [ "bang" ],
    "id" : "obj-2",
    "fontname" : "Arial",
    "patching_rect" : [ 117.0, 35.0, 63.0, 20.0 ],
    "fontsize" : 11.595187,
    "numinlets" : 2,
    "numoutlets" : 1
    }
    }
    , {
    "box" : {
    "maxclass" : "toggle",
    "outlettype" : [ "int" ],
    "id" : "obj-1",
    "patching_rect" : [ 117.0, 11.0, 20.0, 20.0 ],
    "numinlets" : 1,
    "numoutlets" : 1
    }
    }
    ],
    "lines" : [ {
    "patchline" : {
    "source" : [ "obj-32", 0 ],
    "destination" : [ "obj-5", 0 ],
    "hidden" : 1,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-32", 0 ],
    "destination" : [ "obj-1", 0 ],
    "hidden" : 1,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-31", 0 ],
    "destination" : [ "obj-30", 0 ],
    "hidden" : 1,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-30", 0 ],
    "destination" : [ "obj-12", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-30", 0 ],
    "destination" : [ "obj-15", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-26", 0 ],
    "destination" : [ "obj-24", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-1", 0 ],
    "destination" : [ "obj-2", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-3", 0 ],
    "destination" : [ "obj-2", 1 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-2", 0 ],
    "destination" : [ "obj-6", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-5", 0 ],
    "destination" : [ "obj-6", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-6", 0 ],
    "destination" : [ "obj-7", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-8", 1 ],
    "destination" : [ "obj-9", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-8", 2 ],
    "destination" : [ "obj-9", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-2", 0 ],
    "destination" : [ "obj-8", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-8", 0 ],
    "destination" : [ "obj-10", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-6", 0 ],
    "destination" : [ "obj-11", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-12", 0 ],
    "destination" : [ "obj-13", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-15", 0 ],
    "destination" : [ "obj-14", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-13", 0 ],
    "destination" : [ "obj-11", 0 ],
    "hidden" : 0,
    "midpoints" : [ 265.5, 240.0, 126.5, 240.0 ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-14", 0 ],
    "destination" : [ "obj-11", 0 ],
    "hidden" : 0,
    "midpoints" : [ 373.5, 237.0, 126.5, 237.0 ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-11", 0 ],
    "destination" : [ "obj-16", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-16", 0 ],
    "destination" : [ "obj-11", 1 ],
    "hidden" : 0,
    "midpoints" : [ 148.5, 308.0, 350.0, 308.0, 350.0, 242.0, 276.5, 242.0 ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-11", 0 ],
    "destination" : [ "obj-17", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-18", 0 ],
    "destination" : [ "obj-19", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-19", 0 ],
    "destination" : [ "obj-20", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-20", 0 ],
    "destination" : [ "obj-21", 0 ],
    "hidden" : 0,
    "midpoints" : [ 314.5, 157.0, 354.0, 157.0, 354.0, 91.0, 367.5, 91.0 ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-24", 0 ],
    "destination" : [ "obj-22", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-21", 0 ],
    "destination" : [ "obj-22", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    ]
    }
    //////////end max patch

    • Jan 30 2009 | 9:37 pm
      Hi Liubo,
      It works for me without a problem. Any error messages printing to Max window? It might be your graphics card.
      best,
      Zachary
      my system:
      Leopard 10.5.6
      max 5.0.5
      mbp 2.5ghz intel GeForce 8600M GT
      4 Gigs RAM
    • Jan 30 2009 | 10:04 pm
      i just tested on mpb - ATI X1600, max 5.05, OS 10.5.6.
      did not have any problems toggling the depth-buffer.
      any other info might be helpful.
      my advice in general is to not change these things that cause the context to be rebuilt.
    • Jan 31 2009 | 3:28 am
      thanks guys, this was actually really helpful. i reinstalled max and it worked. it must have been have been some third party library (i suspect maxtoolbox or taptools).
      i've been having bizarre depthbuffer errors for some time now, hopefully this will end it.