Important notes about Mesa

I played a bit with OCC, but I couldn't make any sample work on my linux Sytem (running a Mandrake 7.1). It appears that the version of Mesa installed is very important :

- I have tried with 3.1 and 3.2, and there's always a SEGV in a GL function glGetIntegerv if I remember correctly.

-Then I installed Mesa 3.0, and EVERYTHING WORKS. So it's VERY IMPORTANT TO GET MESA 3.0.

BTW, I tried to use the Nvidia OpenGL drivers for the Geforce 256, and they don't work with OCC either.

* **************************** * * JANNIN Stephen * * DRIME * * 107 Quai du Docteur Dervaux * * 92600 ASNIERES-SUR-SEINE * * e-mail : janninst@drime.fr * * www : http://www.drime.fr/gc * * **************************** *

C R Johnson's picture

> I played a bit with OCC, but I couldn't make
> any sample work on my linux Sytem (running a
> Mandrake 7.1). It appears that the version
> of Mesa installed is very important :

> - I have tried with 3.1 and 3.2, and there's
> always a SEGV in a GL function glGetIntegerv
> if I remember correctly.

> -Then I installed Mesa 3.0, and EVERYTHING
> WORKS. So it's VERY IMPORTANT TO GET MESA
> 3.0.

You are correct. You will have to re-compile ( and to do this, make some minor changes to source and compile scripts) to work with Mesa 3.1 or 3.2.

> BTW, I tried to use the Nvidia OpenGL
> drivers for the Geforce 256, and they don't
> work with OCC either.

You will definitely have to re-compile to use any real OpenGL libraries on Linux.

I have XIG-accelerated 3D X and after recompiling everything is OK.

Robert Boehne's picture

> You are correct. You will have to re-compile
> ( and to do this, make some minor changes to
> source and compile scripts) to work with
> Mesa 3.1 or 3.2.

The changes to the source MAY be necessary, but they should not be. In fact, changes to the scripts should not be necessary either, but because Mesa decided to name their libraries in a non-standard way, i.e. libMesaGL.so instead of libGL.so, most implementations should work by using the treplace script to change libMesaGL to libGL in all the scripts.
I have re-compiled under Linux using Metro-X OpenGL and it only required changing the library names as outlined above.
If there are any changes to the source that are required for other OpenGL implementations, post their description to this forum, we should determine if the problem is with that particular OpenGL implementation, or Open CASCADE itself, and then add any changes to the CASCADE source that would allow it to be used with any OpenGL.   The differences in GL implemenation versions can be specifically checked for and fixed if and when these problems are identified.

Stephen Jannin's picture

> I have re-compiled
> under Linux using Metro-X OpenGL and it only
> required changing the library names as
> outlined above.

Well, I tried to link OCC with Mesa 3.2, but this doesn't work. I still have a bug in a gl call. I used the folowing options in OpenGL.comp, because some defines were'nt needed anymore with Mesa 3.2 : g++ -DNO_CXX_EXCEPTION -DLMC_COLOR -DSILGL -DSILGL_VRS=50 -DLIN -DLININTEL -DCSFDB -DNO_CXX_EXCEPTION -funsigned-char -MD -DNo_Exception -Wall -x c++ -I${CASROOT}/src/OpenGl -I${CASROOT}/drv/OpenGl -I${CASROOT}/inc -c ${CASROOT}/drv/OpenGl/OpenGl_Error_0.cxx -o OpenGl_Error_0.o

I discarded the following options : -DGLUtesselator=GLUtriangulatorObj -DGLU_TESS_WINDING_RULE=100140 -DGLU_TESS_WINDING_ODD=100130 -DGLU_TESS_TOLERANCE=100142 -DGLU_TESS_BEGIN=100100 -DGLU_TESS_VERTEX=100101 -DGLU_TESS_END=100102 -DGLU_TESS_ERROR=100103 -DGLU_TESS_COMBINE=100105

These options seems to be already defined in Mesa 3.2 glu.h