Animation using opengl and gPad

Hi rooters

There is a small bug (or a missing feature) when using a pad in gl rendering mode. I tried to use the example found in tutorials/graphics/anim.C except that I wanted an openGL in-pad rendering. So I juste renammed the TCanvas “glc1” (instead of “c1”) and used the draw option “glsurf1” (instead of “surf1”)
When I run the modified script, the shape of the function is moving and is rendered in openGL: so this works fine. But the picture doesn’t rotate inside the canvas. It seems that the pad’s method SetPhi() doesn’t work when in openGL mode.

I am using a Linux box, ROOT version 5.19/04, gcc version 4. 3, Mesa 4.0.4



gl-in-pad did not use phi/theta from the pad.
This has been fixed in the svn-trunk. I’ve attached a patch that should in principle work also against 5.19/04.

glpad-rotate.txt (4.87 KB)