mouse 2 sketch
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.
i do something like this, but may not work for everyone.
when math doesn't like you, trial and error is your friend.
Max Patch
Copy patch and select New From Clipboard in Max.
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
Max Patch
Copy patch and select New From Clipboard in Max.
Thank you Jasch.
Do you think you could post a patch for Max 4.6/1.6.3 ?
thank you.
here you are:
Max Patch
Copy patch and select New From Clipboard in Max.