[GRASS5] Re: NVIZ compile problem
Bob Covill
bcovill at tekmap.ns.ca
Sat May 3 11:15:03 EDT 2003
Glynn Clements wrote:
> Bob Covill wrote:
>
>
>>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.
>
>
> It would be better to just avoid the use of glXGetCurrentDisplay[EXT]
> altogether.
>
>
>>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.
>
>
> AFAICT, the OGSF library should not be using any glX functions, or
> even any X-specific functions.
>
> The version in 5.0.2 doesn't use a single Xlib or glX function; it
> uses functions from other GRASS libraries, TIFF, GL/GLU and ANSI
> functions from libc/libm, and so should be completely portable (i.e.
> the 5.0.2 OGSF library should work with a native Windows version).
>
Glynn,
I agree it would be nice to avoid any unnecessary dependancies. The font
stuff that I added in gsd_fonts.c is a modification of the code from
togl.c (Togl_LoadBitmapFont). I changed it a little bit.
Would it be better to have the font loading stuff in NVIZ2.2/src and
then pass the fontbase (OpenGL list) to whatever function is requesting
it (eg. gsd_put_legend)?
--
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