(Fwd) (Fwd) Re: OpenGL on SGI?

Valery Fine (fine@mail.cern.ch)
Fri, 1 Aug 1997 15:30:24 +0100


------- Forwarded Message Follows -------
> Hello!
>
> Has anyone figured out if it is possible to use SGIs OpenGL libraries with
> root? I tried it on an Indy, but the library names are different from the
> Mesa examples and all I got was "OpenGL library not loaded"...
>

This message is generated with TPad::x3d() method when one calls it
indirectly (via Canvas menu) or directly (either from the CINT command
line prompt or from the context Popup menu or from one's code).

void TPad::x3d(Option_t *option) {
//*-*-*-*-*-*Invokes the x3d package to view the content of a

if (!strcasecmp(option, "OPENGL"))
{
// Disconnect the previous 3D context
if (fPadView3D) fPadView3D->SetPad(0);
fPadView3D = gGLKernel->CreatePadGLView(this);
if (!fPadView3D) {
Error("x3d", "OpenGL shared libraries not loaded.");
}
if (fPadView3D) {
Modified();
Update();
}
return;
}

where gGLKernel is a global pointer to the current "3D view"
I'mplementation.

The gGLKernel->CreatePadGLView(this) of the "default" implementation
returns "0" always.

But the libRGL.so share library contains a global object to
re-assign gGLKernel pointer to the "real local" GL implemenation.

> Which libraries are really needed and what does root check on (giving the
> libraries not loaded message).

This means ROOT checks whether the gGLKernel = new TGLKernel()
object was created (Usually it is done when user loads the libRGL
library "by hand"). If it fails one sees the message above.

This means for some system one must create libRGL library and make
sure that he loaded that library AND all libraries needed to support
libRGL share library (this means to support TMotifGLKernel and
TMotifGLViewer classes).

> Or does it run only with Mesa?

It works under Windows with Windows OpenGL implementation.

To check whether it suits your local GL library check whether your
local GL does supply all functions MotifGLViewer calls. I hope they
are OK for SGI too.

>
> All hints are welcome
>

Likely the only thing you need is to build RGL share lib from the
source and then load it with (or just load RGL only)

gSystem.Load("libRGL.so");

I think it will complain and present you a list of other
"native" SGI OpenGL libs you need to load in advance too. (Sorry I can
not provide more assistance with a UNIX specific part. There is no
such kind of problem under Windows).

Hope this helps.
Valery
=================================================================
Dr. Valery Fine Telex : 911621 dubna su
-----------
LCTA/Joint Inst.for NuclearRes Phone : +7 09621 6 40 80
141980 Dubna, Moscow region Fax : +7 09621 6 51 45
Russia mailto:fine@main1.jinr.dubna.su

Dr. Valeri Faine
------------ Phone: +41 22 767 6468
CERN FAX : +41 22 767 7910
CH-1211 Geneva, 23 mailto:fine@mail.cern.ch
Switzerland http://nicewww.cern.ch/~fine