From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jan 30 00:42:10 2004 Return-Path: Delivered-To: freebsd-ports-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4AB1016A4CE; Fri, 30 Jan 2004 00:42:10 -0800 (PST) Received: from doom.homeunix.org (9-198.dialup.comset.net [213.172.9.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 43EE543D4C; Fri, 30 Jan 2004 00:42:05 -0800 (PST) (envelope-from igor@doom.homeunix.org) Received: from doom.homeunix.org (localhost [127.0.0.1]) by doom.homeunix.org (8.12.10/8.12.10) with ESMTP id i0U8fxqf048436; Fri, 30 Jan 2004 11:42:00 +0300 (MSK) (envelope-from igor@doom.homeunix.org) Received: (from igor@localhost) by doom.homeunix.org (8.12.10/8.12.10/Submit) id i0U8fxhU048435; Fri, 30 Jan 2004 11:41:59 +0300 (MSK) (envelope-from igor) Date: Fri, 30 Jan 2004 11:41:59 +0300 From: Igor Pokrovsky To: FreeBSD-gnats-submit@freebsd.org, freebsd-ports-bugs@freebsd.org Message-ID: <20040130084158.GA48363@doom.homeunix.org> References: <200401280359.i0S3xMS8000722@doom.homeunix.org> <200401280410.i0S4AI3e004223@freefall.freebsd.org> Mime-Version: 1.0 In-Reply-To: <200401280410.i0S4AI3e004223@freefall.freebsd.org> User-Agent: Mutt/1.4.1i Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="demeter.diff" X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Re: ports/62016: New port: graphics/demeter A C++ library to render 3D terrains using OpenGL X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2004 08:42:10 -0000 diff -ru demeter-orig/Makefile demeter/Makefile --- demeter-orig/Makefile Fri Jan 30 10:51:59 2004 +++ demeter/Makefile Fri Jan 30 11:30:13 2004 @@ -75,9 +75,9 @@ .endif .if !defined(WITH_LIBXML2) -PLIST_SUB= WITH_LIBXML2="@comment " +PLIST_SUB+= WITH_LIBXML2="@comment " .else -PLIST_SUB= WITH_LIBXML2="" +PLIST_SUB+= WITH_LIBXML2="" .endif .if !defined(WITH_OSG) diff -ru demeter-orig/files/patch-samples-SampleRawApplication-SampleRawMain.cpp demeter/files/patch-samples-SampleRawApplication-SampleRawMain.cpp --- demeter-orig/files/patch-samples-SampleRawApplication-SampleRawMain.cpp Fri Jan 30 10:51:59 2004 +++ demeter/files/patch-samples-SampleRawApplication-SampleRawMain.cpp Fri Jan 30 11:17:58 2004 @@ -1,35 +1,22 @@ --- samples/SampleRawApplication/SampleRawMain.cpp.orig Sat Dec 20 17:28:54 2003 -+++ samples/SampleRawApplication/SampleRawMain.cpp Mon Jan 26 09:16:09 2004 ++++ samples/SampleRawApplication/SampleRawMain.cpp Fri Jan 30 11:17:04 2004 @@ -28,6 +28,10 @@ #include #include "Elevations.h" +#ifndef _WIN32 -+#include ++#include +#endif + using namespace Demeter; using namespace std; -@@ -35,6 +39,8 @@ - #ifdef _WIN32 - typedef void (APIENTRY * PFNGLFOGCOORDPOINTERFARBPROC) (GLenum type,GLint stride,const GLvoid* pointer); - #else -+typedef void* (*GLXGETPROCADDRESSARBPROC) (const char *); -+GLXGETPROCADDRESSARBPROC glXGetProcAddress; - typedef void (*PFNGLFOGCOORDPOINTERFARBPROC) (GLenum type,GLint stride,const GLvoid* pointer); - #endif - PFNGLFOGCOORDPOINTERFARBPROC FogCoordPointerEXT = NULL; -@@ -193,7 +199,11 @@ +@@ -193,7 +197,7 @@ #ifdef _WIN32 FogCoordPointerEXT = (PFNGLFOGCOORDPOINTERFARBPROC) wglGetProcAddress("glFogCoordPointerEXT"); #else - FogCoordPointerEXT = glFogCoordPointerEXT; -+ glXGetProcAddress = (GLXGETPROCADDRESSARBPROC) dlsym(RTLD_NEXT, "glXGetProcAddress"); -+ if (!glXGetProcAddress) -+ cout << "No glXGetProcAddress!" << endl; -+ else -+ FogCoordPointerEXT = (PFNGLFOGCOORDPOINTERFARBPROC) glXGetProcAddress("glFogCoordPointerEXT"); ++ FogCoordPointerEXT = (PFNGLFOGCOORDPOINTERFARBPROC) glXGetProcAddress((GLubyte*)"glFogCoordPointerEXT"); #endif if (FogCoordPointerEXT != NULL) { diff -ru demeter-orig/files/patch-src-Terrain.cpp demeter/files/patch-src-Terrain.cpp --- demeter-orig/files/patch-src-Terrain.cpp Fri Jan 30 10:51:59 2004 +++ demeter/files/patch-src-Terrain.cpp Fri Jan 30 11:14:23 2004 @@ -1,28 +1,18 @@ --- src/Terrain.cpp.orig Sat Dec 20 17:28:54 2003 -+++ src/Terrain.cpp Mon Jan 26 09:09:31 2004 ++++ src/Terrain.cpp Fri Jan 30 11:13:50 2004 @@ -26,6 +26,11 @@ #include #include +#ifndef _WIN32 -+#include ++#include +#endif + + using namespace Demeter; using namespace std; -@@ -40,6 +45,9 @@ - // Diagnostics - vector < GLuint > AllocatedTextures; - -+typedef void* (*GLXGETPROCADDRESSARBPROC) (const char *); -+GLXGETPROCADDRESSARBPROC glXGetProcAddress; -+ - PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB_ptr; - PFNGLACTIVETEXTUREARBPROC glActiveTextureARB_ptr; - PFNGLLOCKARRAYSEXTPROC glLockArraysEXT_ptr; -@@ -108,11 +116,16 @@ +@@ -108,11 +113,11 @@ glUnlockArraysEXT_ptr = (PFNGLUNLOCKARRAYSEXTPROC) wglGetProcAddress("glUnlockArraysEXT"); glClientActiveTextureARB_ptr = (PFNGLCLIENTACTIVETEXTUREARBPROC) wglGetProcAddress("glClientActiveTextureARB"); #else @@ -31,16 +21,11 @@ - glLockArraysEXT_ptr = glLockArraysEXT; - glUnlockArraysEXT_ptr = glUnlockArraysEXT; - glClientActiveTextureARB_ptr = glClientActiveTextureARB; -+ glXGetProcAddress = (GLXGETPROCADDRESSARBPROC) dlsym(RTLD_NEXT, "glXGetProcAddress"); -+ if (!glXGetProcAddress) { -+ cout << "LoadGLExtensions: No glXGetProcAddress" << endl; -+ return; -+ } -+ glMultiTexCoord2fARB_ptr = (PFNGLMULTITEXCOORD2FARBPROC) glXGetProcAddress("glMultiTexCoord2fARB"); -+ glActiveTextureARB_ptr = (PFNGLACTIVETEXTUREARBPROC) glXGetProcAddress("glActiveTextureARB"); -+ glLockArraysEXT_ptr = (PFNGLLOCKARRAYSEXTPROC) glXGetProcAddress("glLockArraysEXT"); -+ glUnlockArraysEXT_ptr = (PFNGLUNLOCKARRAYSEXTPROC) glXGetProcAddress("glUnlockArraysEXT"); -+ glClientActiveTextureARB_ptr = (PFNGLCLIENTACTIVETEXTUREARBPROC) glXGetProcAddress("glClientActiveTextureARB"); ++ glMultiTexCoord2fARB_ptr = (PFNGLMULTITEXCOORD2FARBPROC) glXGetProcAddress((GLubyte*)"glMultiTexCoord2fARB"); ++ glActiveTextureARB_ptr = (PFNGLACTIVETEXTUREARBPROC) glXGetProcAddress((GLubyte*)"glActiveTextureARB"); ++ glLockArraysEXT_ptr = (PFNGLLOCKARRAYSEXTPROC) glXGetProcAddress((GLubyte*)"glLockArraysEXT"); ++ glUnlockArraysEXT_ptr = (PFNGLUNLOCKARRAYSEXTPROC) glXGetProcAddress((GLubyte*)"glUnlockArraysEXT"); ++ glClientActiveTextureARB_ptr = (PFNGLCLIENTACTIVETEXTUREARBPROC) glXGetProcAddress((GLubyte*)"glClientActiveTextureARB"); #endif } diff -ru demeter-orig/pkg-descr demeter/pkg-descr --- demeter-orig/pkg-descr Fri Jan 30 11:19:07 2004 +++ demeter/pkg-descr Wed Jan 28 06:59:56 2004 @@ -3,7 +3,7 @@ of advanced techniques such as dynamic tessellation (adaptive mesh) to render vast landscapes in real-time, without the need for high-end hardware. It is written as a stand-alone component that can be easily integrated into any kind -of application +of application. WWW: http://www.terrainengine.com/