Problem with OpenGL tutorials

Dear Rooters

I have just downloaded from cvs and compiled on my PowerBook with Mac OS X 10.4.4
the newest root version and tested a couple of tutorials.

It seems that all tutorials using OpenGL do not work correctly, i.e. in TCanvas
they are only drawing strange patterns if they draw something at all. The tutorials are:
shapes.C, gltf3.C, glsurfaces.C, glViewerExercise.C, ConfidenceInterval.C

For example, shapes.C works only if I select from the View menu either X3D or OpenGL,
but not in TCanvas.

In tutorial glViewerExercise.C I get the error:
Error: Symbol kWireFrame is not defined in current scope glViewerExercise.C:102

Interestingly, tutorial glViewerLOD.C does work.

Best regards
Christian

can you try to remove the line
gStyle->SetCanvasPreferGL(true);
in shapes.C and let me know if it works in that case ?

[quote=“couet”]can you try to remove the line
gStyle->SetCanvasPreferGL(true);
in shapes.C and let me know if it works in that case ?[/quote]

Hi, Olivier. I’m not cstrato, but I think, I can :slight_smile:
Shure, it’ll work ok. Only gl-in-pad has problems on MacOS X. GL standalone viewer is OK. If I hide a gl pad and raise it again I can see picture - but it’s still incorrect. If I try to rotate scene - nothing’s changing - though in my code (TGLHistPainter/TX11GL) I’m calling
XCopyArea to copy pixmap directly into the window (during rotation), I cannot see anything. May be some ROOT’s X11 guru (Fons) can help?
MacOS X supports X11, but it’s implementation AFAIK more complex and based on MacOS X native graphics.

Hi Timur,

We have investigated a bit further on Fons’ machine. It hangs in gLXMakeCurrent. May be that is something you can look at more closely during your visit.

[quote=“couet”]Hi Timur,

We have investigated a bit further on Fons’ machine. It hangs in gLXMakeCurrent. May be that is something you can look at more closely during your visit.[/quote]

Yes, shure.

But that’s strange. For me - it works (though first GL initialization takes about a minute, but after that it works - I mean it does not hang in glXMakeCurrent)

Dear Olivier

I can only agree with Timur, OpenGL Viewer works fine, only GL in TPad causes problems.

P.S.: Since there is another topic about root and Fedora:
I have compiled the identical root cvs version on FC4 and everything works fine.

Best regards
Christian

Christian,
We will look at this problem while Timur will be here.

Dear Rooters

This is only an update: Yesterday I have downloaded from cvs the newest root version and tested
the gl macros. As with earlier versions, the macros glViewerExercise.C, gltf3.C, glsurfaces.C do not
work properly on my Mac OS X 10.4.4.

I get the errors:
root [0] gSystem->Load(“libGeom”)
(int)0
root [1] .x glViewerExercise.C
Warning in : no dictionary for class TGLViewer is available
Warning in : no dictionary for class TGLBoundingBox is available
Error: TGLPlane() header declared but not defined _vector.h:80:
*** Interpreter error recovered ***
Error: Symbol null is not defined in current scope :0
root [2] .x gltf3.C
root [3] .x glsurfaces.C

Best regards
Christian

Christian,

glViewrerExercise works correctly on the MAC. Looking at the error
message, it indicates that you did not run
make map
Note that you do not need gSystem->Load(“libGeom”);
Autoloading from the shared lib is automatic once you have run “make map” (I assume that you run 5.11/02)

Concerning the two other tutorials (using “GL in the pad”), this does not work yet on the MAC due to a problem with pixmaps and X11 on this platform.
We are looking for a workaround waiting for a fix from Apple.

Rene

Dear Rene

Thank you for your reply, you are correct:
When compiling root for FC4 I realized that I forgot to run “make map” on the Mac.

Now the macro glViewerExercise.C works, but on both Mac and FC4 I get the
following error when trying to exit GLViewer:
Error: Symbol gPad is not defined in current scope glViewerExercise.C:47:
Error: Failed to evaluate gPad->GetViewer3D()
*** Interpreter error recovered ***

Best regards
Christian