[GRASS-dev] Re: errors compiling nviz in GRASS 7

Glynn Clements glynn at gclements.plus.com
Mon Jul 7 14:15:50 EDT 2008


Martin Landa wrote:

> I have updated Makefile in lib/nviz based on lib/ogsf/Makefile, maybe
> it can help, I can compile on my Linux box without problems.

Note that lib/nviz/render.c contains unconditional references to glX
functions, so it won't compile with non-X11 versions of OpenGL.

To make it work on all platforms, each section of code which uses glX
functions will need equivalent agl and wgl versions. The commment at
the top of that file indicates that it was based upon Togl, which
should have all of the relevant code.

Also, the Mac version of OpenGL needs <OpenGL/gl.h> rather than
<GL/gl.h>, e.g.:

#include <grass/config.h>

#if defined(OPENGL_X11) || defined(OPENGL_WINDOWS)
#include <GL/gl.h>
#endif
#ifdef OPENGL_AQUA
#include <OpenGL/gl.h>
#endif

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list