[GRASS5] Re: NVIZ compile problem

Paul Kelly paul-grass at stjohnspoint.co.uk
Fri May 2 16:38:52 EDT 2003


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






More information about the grass-dev mailing list