Spinning OpenGL.Tk graphics

M

Michael Peuser

Python's OpenGL.Tk binding makes simple 3D drawing a snap! The default mouse
keys for panning and sizing is left and right, for rotation it seems to be
the middle key which is on just very few people's mouse nowadays.

Of course I tried obvious and not so obvious shift/alt/contrl/mouse
combinations- without any success.
Is there a work-around? The docu for the binding is somewhat obscure and one
has to guess a lot ;-) I haven't figured out yet how to use AutoSpin ....
I am using Windows2000

Thanks for suggestions and may be hints to more detailed documentation.

Michael
 
M

Michael Peuser

Maybe I found a work-around:

o = Opengl()

o.bind('<B1-Motion>', o.tkTranslate)
o.bind('<Button-3>', o.StartRotate)
o.bind('<B3-Motion>', o.tkRotate)
o.bind('<Shift-Button-1>', o.tkRecordMouse)
o.bind('<Shift-B1-Motion>', o.tkScale)

This was taken (but modified) from the OglSurface/Frame example - that demo
didn't run however before I changed
some glVertex3f to glVertex3fv .....

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top