[GRASS-dev] suggested temporary feature freeze for wxGUI

William Kyngesburye woklist at kyngchaos.com
Sun Sep 7 14:14:20 EDT 2008


On Sep 7, 2008, at 11:23 AM, William Kyngesburye wrote:

> I haven't tried compiling GRASS in a while, busy with other stuff.   
> I thought vdigit compiled - the makefile has the correct compile  
> flags to handle libgdi.
>
> Yes, nviz has the problem where you need to disable render.c (and  
> lose nviz_cmd).  The OpenGL programming is too deep for me.
>

Ah.  libnviz has a problem, in nviz.h, for the AGL types.  This should  
fix it (and gets a step closer to fixing the direct rendering problem):

--- include/nviz.h.orig	2008-08-12 22:19:32.000000000 -0500
+++ include/nviz.h	2008-08-12 13:03:31.000000000 -0500
@@ -128,9 +128,9 @@
      GLXPixmap windowId;
      Pixmap pixmap;
  #elif defined(OPENGL_AQUA)
-    AGLPixelFmtID pixelFmtId;
+    AGLPixelFormat pixelFmtId;
      AGLContext contextId;
-    AGLPixmap windowId;
+    AGLPbuffer windowId;
      GWorldPtr pixmap;
  #elif defined(OPENGL_WINDOWS)
      HDC displayId;		/* display context */


Now there is another error to deal with in wxpython/nviz - gstypes.h  
defines X, Y and Z for (internal use only), but this causes problems  
for one of the OSX application services headers.  The fix I figured  
out was to include ApplicationServices.h and agl.h before the grass  
headers.  This is done in include/nviz.h, but not in wxpython/nviz/ 
nviz.h.  Change the #include order to:

#include <grass/gis.h>
#include <grass/nviz.h>
#include <grass/gsurf.h>
#include <grass/gstypes.h>

And in nviz.i change to:

#include "nviz.h"
#include <grass/gsurf.h>
#include <grass/gstypes.h>


Now we're left with some errors in grass6_wxnviz_wrap.cpp:

grass6_wxnviz_wrap.cpp:3165: error: expected unqualified-id before ‘{’  
token
grass6_wxnviz_wrap.cpp:3173: error: expected unqualified-id before ‘{’  
token
grass6_wxnviz_wrap.cpp:3180: error: expected unqualified-id before ‘{’  
token
...
...

These are all

static bool check(PyObject *obj) {

I seem to recall seeing this before somewhere with swig-generated  
code, and I don't remember what the solution was.


-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

[Trillian]  What are you supposed to do WITH a maniacally depressed  
robot?

[Marvin]  You think you have problems?  What are you supposed to do if  
you ARE a maniacally depressed robot?  No, don't try and answer, I'm  
50,000 times more intelligent than you and even I don't know the  
answer...

- HitchHiker's Guide to the Galaxy




More information about the grass-dev mailing list