jit.gl.sketch drawobject command is broken in max 6

    Nov 11 2011 | 8:26 am
    Both drawobject 0 and drawobject 1 have some big problems in Max6.
    While I'd love to leave jit.gl.sketch behind and move on to all the new jit.gl objects in Max6, for now I need to be able to run my existing patches, and almost all of them are deeply dependent on the nested structure facilitated by the drawobject command in jit.gl.sketch.
    Until this gets fixed, I'm stuck.
    Compare how the attached patch runs in 5 vs 6.

    • Nov 11 2011 | 1:05 pm
      +1 All my drawing structures relies on drawobject in jit.gl.sketch.
      And could we get a frustum parameter in jit.gl.camera?
    • Nov 11 2011 | 3:49 pm
      curses! Apologies for not having this fixed in 6.0.1. I'm on it.
    • Nov 11 2011 | 4:22 pm
      Incremental Object Update?
    • Nov 11 2011 | 4:30 pm
      It's a Jitter thing, not a sketch thing so any updates will have to wait for 6.0.2. Thanks for your patience.
    • Nov 11 2011 | 9:30 pm
      One thing to note Perry is that the redness of the box when lighting is turned on is a bit of a fluke. This behavior is dependent on GL_COLOR_MATERIAL being enabled. In Max6 jit.gl.gridshape uses a jit.gl.mesh internally, which calls glEnable/glDisable on GL_COLOR_MATERIAL, causing your glcolor 1 0 0 1 not to set the diffuse material component. The fact that this is on in Max5 is by a fluke of the default state of the OpenGL context. To get this behavior in a more robust manner, set 'glenable color_material' as one of the command to sketch. In any case, I've set Max6 gridshape to follow what Max5 gridshape does now, so this will be in 6.0.2.
    • Nov 11 2011 | 11:15 pm
      jit.gl.camera @colormask and @frustum are in the next release, so hopefully you will be free to move from jit.gl.sketch if you want
    • Nov 12 2011 | 12:41 pm
      :) for frustum
      is there an existing (planed) jit.gl.sketch command for jit.gl.material and jit.gl.light? like: glbindtexture tex_name ... drawobject obj_name ...
      working with stereoscopy, I bind a different texture to the same object in 2 parallel command list. I don't think it's possible with 2 cameras ... no? or i will need to have 2 identical objects with 2 materials... So, usind jit.gl.sketch, I've got to maintain a long dynamic sublist command for each lights. Calling a jit.gl.material or jit.gl.light will be great..
    • Nov 12 2011 | 10:03 pm
      Thanks Wesley - can't wait for 6.0.2
      Something's definitely wrong with glcolor inside sketch whenever drawobject is used - I think I understand what you're saying about color_material, but setting 'glenable color_material' (or 'gldisable color_material') doesn't seem to change anything -
      Here's a clearer example of the problem:
    • Nov 12 2011 | 11:33 pm
      It has an effect for me. You have to be careful where you put it in the list. It has to come after drawobject:
      reset, glclear, glcolor 1 0 0 1, gltranslate -3 0 -5, cube 1 1, glcolor 0 1 0 1, gltranslate 3 0 0, drawobject cronk $1, glenable color_material, glcolor 0 0 1 1, gltranslate 3 0 0, cube 1 1
      Incidentally, everything looks good for 6.0.2 following what your comments say should be happening. You have the best patches BTW. very clear!
    • Nov 13 2011 | 12:18 am
      OK, I see now.
      So since 'glenable color_material' doesn't have any effect if it's put before the drawobject command, it's almost as if drawobject includes a implicit 'gldisable color_material' command. This seems a little counterintuitive, or maybe I'm missing something?
    • Nov 13 2011 | 12:32 am
      " it's almost as if drawobject includes a implicit 'gldisable color_material' command."
      That's exactly the difference between Max5 and Max6 because of the change with the gridshape using a mesh internally.