« max serial fix | Main | patch »

February 27, 2004

gl slider - (for Tripp & Kurt)

Here's a patch that implements a horizontal slider inside of a jit.gl.render. It got a bit complicated because jitter doesn't provide any simple method to translate from screen to 3D space.

A few caveats: You can move the camera along the z axis, but it breaks if you change any other camera parameters. And it keeps working when you change the size of the window with a "size" message - but you have to keep to a 4 x 3 ratio. The esc key toggles "full screen" (keeping to the 4 x 3 ratio). If something doesn't update when you change it, just click on the window & it should pop into place.

There's a toggle to turn on and off the mouse y coordinates (default off), and when it's off you can change the y position of the slider. And there's a separate control for setting the active vertical region of the screen.

It should be (relatively) easy to add a second slider (by distinguishing between two different ranges of mouse y coordinates) - but if you're having trouble let me know. Likewise any questions.

Download file

Posted by Perry at February 27, 2004 02:21 AM

Comments

Post a comment

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Remember me?