mouse 2 sketch


    Jun 25 2008 | 8:47 pm
    Hello,
    I need to give glvertex values to [jit.gl.sketch] from pwindow's mouse message, accurately as "left-top-right-bottom" values (see jit.lcd)
    My matrix is 320/240 size, but glvertex think different!
    Is there a way to do that?
    I had a look at screentoworld in another topic, but can't figure out how to use it for such a goal.
    thank you very much.

    • Jun 25 2008 | 10:30 pm
      i do something like this, but may not work for everyone.
      when math doesn't like you, trial and error is your friend.
    • Jun 26 2008 | 6:28 am
      jit.gl.render can tell you where your pixel is at:
      send the mouseposition as screentoworld to the render and it gives you
      OpenGL coords.
      hth
      /*j
    • Jun 26 2008 | 7:38 am
      Thank you Jasch.
      Do you think you could post a patch for Max 4.6/1.6.3 ?
      thank you.
    • Jun 26 2008 | 7:54 am
      here you are: