[GRASS5] Re: NVIZ compile problem

Bob Covill bcovill at tekmap.ns.ca
Fri May 2 20:26:51 EDT 2003


Paul,

I think you are on the right track. My only worry is that 
glXGetCurrentDisplayEXT() may not be the standard function for pre GLX 
1.2. Unfortunately all of my machinces are post 1.2 so it is difficult 
to test.

Out of curiousity I replaced my
dpy = glXGetCurrentDisplay();
with
dpy = XOpenDisplay(0);
and it worked. You should close the XOpenDisplay at the end of the 
function (before return fontbase).

Could you see if this works for you. It may be a more generic display 
query that is not subject to library versions.

Thanks for looking into this.


Paul Kelly wrote:
> Hello again Bob
> 
> On Fri, 2 May 2003, Bob Covill wrote:
> 
> 
>>Hi Paul,
>>
>>It looks like you are right. The glXGetCurrentDisplay is a newer
>>function and requires GLX version 1.2 or greater. This is the same
> 
> 
> Looks like it became standardised with GLX 1.2 but was already existing as
> an experimental extension in GLX 1.1. I've just realised there are 3 machines
> in my lab with GLX versions 1.1 and 1.2 (SGI Irix 6.2 and 6.4
> respectively) and 1.3 (Redhat Linux 7.2) so maybe I am in a good position
> to test this.
> 
> On the 1.1 system the function is there and called
> glXGetCurrentDisplayEXT()
> On the 1.2 system both
> glXGetCurrentDisplayEXT() *and* glXGetCurrentDisplay()
> are present and on the 1.3 system only
> glXGetCurrentDisplay()
> is there.
> 
> So is the following patch OK by you?
> 
> Index: gsd_fonts.c
> ===================================================================
> RCS file: /grassrepository/grass/src/libes/ogsf/gsd_fonts.c,v
> retrieving revision 1.6
> diff -u -r1.6 gsd_fonts.c
> --- gsd_fonts.c 22 Apr 2003 17:23:35 -0000      1.6
> +++ gsd_fonts.c 2 May 2003 20:31:27 -0000
> @@ -59,7 +59,11 @@
> 
>     assert( name );
> 
> +#ifdef GLX_VERSION_1_2
>     dpy = glXGetCurrentDisplay();
> +#else
> +   dpy = glXGetCurrentDisplayEXT();
> +#endif
>     fontinfo = XLoadQueryFont( dpy, name );
>     if (!fontinfo) {
>       fprintf(stderr, "Error -- unable to load font\n");
> 
> It works for me so if it works for you you should submit it. Maybe we
> could do something similar for the off-screen rendering. I will look at it
> when I have time and test the other new features. I see already the slider
> for positioning the vector above the surface. It is really good as the
> same feature in SG3d doesn't have a numerical value beside it (for most of
> my work I need it dead on the surface) and I just had to guess if it was
> on the surface when parts of it started to slightly disappear. So it is a
> good improvement.
> 
> Paul
> 
> 
> 
> 
> 


-- 
Bob Covill

Tekmap Consulting
P.O. Box 2016
Fall River, N.S.
B2T 1K6
Canada

E-Mail: bcovill at tekmap.ns.ca
Phone: 902-860-1496
Fax: 902-860-1498




More information about the grass-dev mailing list