Date: Fri, 30 Jan 2004 11:41:59 +0300 From: Igor Pokrovsky <tiamat@comset.net> To: FreeBSD-gnats-submit@freebsd.org, freebsd-ports-bugs@freebsd.org Subject: Re: ports/62016: New port: graphics/demeter A C++ library to render 3D terrains using OpenGL Message-ID: <20040130084158.GA48363@doom.homeunix.org> In-Reply-To: <200401280410.i0S4AI3e004223@freefall.freebsd.org> References: <200401280359.i0S3xMS8000722@doom.homeunix.org> <200401280410.i0S4AI3e004223@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <SDL.h> #include "Elevations.h" +#ifndef _WIN32 -+#include <dlfcn.h> ++#include <GL/glx.h> +#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 <iostream> #include <string> +#ifndef _WIN32 -+#include <dlfcn.h> ++#include <GL/glx.h> +#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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040130084158.GA48363>