Adjusting the camera of GL-in-pad

Dear ROOT users,
I wrote a test program to display the 3d objects with the GLViewer in the embedded canvas(not the external ones like the OGL).
when i used the command “gStyle->SetCanvasPreferGL(1)” the object will be shown in the default embedded canvas but the camera can not be adjusted.
I tried the method “v->SetCurrentCamera(TGLViewer::kCameraPerspXOY);” after “TGLViewer * v = (TGLViewer *)gPad->GetViewer3D()” but it turned to be error.
How can I adjust the camera of the canvas?
with my code here.

test.C (2.08 KB)

What’s more, I tried to change Draw(“gl”) into Draw(“ogl”) with the method mentioned in tutorials/gl/glViewerExercise.c, then it works.
Is there no way to meet the demand… :confused: