[GRASS5] NVIZ updates

Bob Covill bcovill at tekmap.ns.ca
Fri Nov 21 09:04:14 EST 2003


Markus,

I am no configure expert but this could be a route to follow.

I assume with configure you can build and execute a small program?
If so a program could be built that executes glXQueryVersion which 
returns the major and minor versions of the GLX server. The outcome of 
this would then be used to set the appropriate #ifdef flag.

This method should be much more accurate because it does not rely 
potentially misleading header files.

If this can be built into configure it will first have to check that 
OpenGL and GLX (and X) are installed. This may already be done?

--
Bob

Markus Neteler wrote:
> On Tue, Nov 18, 2003 at 05:49:21PM +0000, Glynn Clements wrote:
> 
>>Paul Kelly wrote:
>>
>>
>>>Before the 5.3.0 release it will be good to get NVIZ back so that it
>>>compiles under Cygwin. There are some glX functions used that appear to be
>>>non-standard. I mentioned this before I think but here are the actual
>>>compile errors:
>>
>>>OBJ.i686-pc-cygwin/do_zoom.o: In function `Create_OS_Ctx':
>>>/cygdrive/g/release/530/grass/src.contrib/GMSL/NVIZ2.2/src/do_zoom.c:275: undefined reference to `glXChooseFBConfig'
>>>/cygdrive/g/release/530/grass/src.contrib/GMSL/NVIZ2.2/src/do_zoom.c:287: undefined reference to `glXCreatePbuffer'
>>>/cygdrive/g/release/530/grass/src.contrib/GMSL/NVIZ2.2/src/do_zoom.c:288: undefined reference to `glXMakeContextCurrent'
>>>OBJ.i686-pc-cygwin/do_zoom.o: In function `Destroy_OS_Ctx':
>>>/cygdrive/g/release/530/grass/src.contrib/GMSL/NVIZ2.2/src/do_zoom.c:351: undefined reference to `glXDestroyPbuffer'
>>
>>In my copy of GL/glx.h, those functions are preceded by the comment:
>>
>>	/* New for GLX 1.3 */
>>
>>So, any code which uses those functions should probably be
>>conditionalised upon GLX_VERSION_1_3.
>>
>>However, all of the lines which produce errors *are* conditionalised
>>upon GLX_PBUFFER_WIDTH. That macro is also specific to GLX 1.3.
>>
>>This suggests that the GL headers don't match the GL libraries (GLX
>>1.3 headers with pre-1.3 libraries). In which case, even if the code
>>was conditionalised upon the correct macro, it would probably still
>>fail for you.
> 
> 
> Instead of checking the GL version, couldn't we check if
>  glXDestroyPbuffer()
> exists in the library with 'configure' (no idea how to do that, though)?
> 
> Markus
> 




More information about the grass-dev mailing list