[GRASS-SVN] r32068 - grass/trunk/lib/nviz

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 10 02:20:33 EDT 2008


Author: martinl
Date: 2008-07-10 02:20:32 -0400 (Thu, 10 Jul 2008)
New Revision: 32068

Modified:
   grass/trunk/lib/nviz/render.c
Log:
nvizlib: some mac-related fixes (off-screen rendering)

Modified: grass/trunk/lib/nviz/render.c
===================================================================
--- grass/trunk/lib/nviz/render.c	2008-07-10 02:54:47 UTC (rev 32067)
+++ grass/trunk/lib/nviz/render.c	2008-07-10 06:20:32 UTC (rev 32068)
@@ -103,7 +103,7 @@
 #if defined(OPENGL_X11)
     rwin->displayId = XOpenDisplay((char *) display);
 #elif defined(OPENGL_AQUA)
-    /* TODO */
+    /* TODO: open mac display */
 #elif defined(OPENGL_WINDOWS)
     /* TODO */
 #endif
@@ -121,10 +121,10 @@
     rwin->contextId = glXCreateContext(rwin->displayId,
 				       v, NULL, GL_FALSE);
 #elif defined(OPENGL_AQUA)
-    /* TODO */
-    rwin->displayId = aglChoosePixelFmt(GDHandle *dev, int ndev, attributeList);
+    /* TODO: dev = NULL, ndev = 0 ? */
+    rwin->displayId = aglChoosePixelFmt(NULL, 0, attributeList);
     
-    rwin->contextId = aglCreateContext(rwin->display, NULL); 
+    rwin->contextId = aglCreateContext(rwin->displayId, NULL); 
 #elif defined(OPENGL_WINDOWS)
     /* TODO int ChoosePixelFormat( HDC hdc, PIXELFORMATDESCRIPTOR *pfd ) */
 #endif
@@ -147,7 +147,7 @@
 					v, rwin->pixmap);
 #elif defined(OPENGL_AQUA)
     /* create win pixmap to render to (same depth as RootWindow) */
-    rwin->pixmap = NULL; /* TODO */
+    rwin->pixmap = NULL; /* TODO: create GWorldPtr */
     /* create an off-screen AGL rendering area */
     rwin->windowId = aglCreateAGLPixmap(rwin->displayId,
 					rwin->pixmap); 
@@ -185,7 +185,8 @@
     if (rwin->contextId == aglGetCurrentContext())
 	return 1;
 
-    aglMakeCurrent(rwin->windowId, rwin->contextId);
+    /* TODO: mac_win */
+    aglMakeCurrent((AGLDrawable) mac_win, rwin->contextId);
 #elif defined(OPENGL_WINDOWS)
     /* TODO wglMakeCurrent( HDC hdc, HGLRC hrc ) */
 #endif



More information about the grass-commit mailing list