Index: include/vrs/opengl/vertexattributebufferobjectgl.h =================================================================== --- include/vrs/opengl/vertexattributebufferobjectgl.h (revision 5687) +++ include/vrs/opengl/vertexattributebufferobjectgl.h (working copy) @@ -221,8 +221,11 @@ static UINT getComponents(const GLushort* /* dummy */) { return 1; } static UINT getComponents(const GLshort* /* dummy */) { return 1; } static UINT getComponents(const GLuint* /* dummy */) { return 1; } -#ifndef __APPLE__ static UINT getComponents(const GLint* /* dummy */) { return 1; } +#ifdef __APPLE__ + // on OS-X GLuint is defined as unsigned long, but to catch the calls to + // this method with VRS::UINT as arg (which is unsigned int) one needs this: + static UINT getComponents(const unsigned int* /* dummy */) { return 1; } #endif // __APPLE__ static UINT getComponents(const GLfloat* /* dummy */) { return 1; } static UINT getComponents(const GLdouble* /* dummy */) { return 1; } @@ -236,8 +239,9 @@ static GLenum getComponentType(const GLushort* /* dummy */) { return GL_UNSIGNED_SHORT; } static GLenum getComponentType(const GLshort* /* dummy */) { return GL_SHORT; } static GLenum getComponentType(const GLuint* /* dummy */) { return GL_UNSIGNED_INT; } -#ifndef __APPLE__ static GLenum getComponentType(const GLint* /* dummy */) { return GL_INT; } +#ifdef __APPLE__ + static GLenum getComponentType(const unsigned int* /* dummy */) { return GL_UNSIGNED_INT; } #endif // __APPLE__ static GLenum getComponentType(const GLfloat* /* dummy */) { return GL_FLOAT; } static GLenum getComponentType(const GLdouble* /* dummy */) { return GL_DOUBLE; } Index: include/vrs/opengl/openglconfig.h =================================================================== --- include/vrs/opengl/openglconfig.h (revision 5687) +++ include/vrs/opengl/openglconfig.h (working copy) @@ -88,23 +88,4 @@ # define VRS_CheckErrorGL(STRING) #endif // VRS_VERSION_RELEASE -#ifdef __APPLE__ - -#include - -namespace VRS { - - inline void - serialization( - SerializationManager& manager, - const std::string& attributeName, - GLenum& attributeValue - ) { - serialization(manager, attributeName, reinterpret_cast(attributeValue)); - } - -} // namespace VRS - -#endif // __APPLE__ - #endif // VRS_OPENGL_OPENGLCONFIG_H Index: include/vrs/opengl/glext.h =================================================================== --- include/vrs/opengl/glext.h (revision 5687) +++ include/vrs/opengl/glext.h (working copy) @@ -368,6 +368,8 @@ #elif defined(__ia64__) || defined(__x86_64__) typedef long int GLintptr; typedef long int GLsizeiptr; +#elif defined(__APPLE__) + // OS-X already has this #else // !_WIN64 && !__ia64__ && !__x86_64__ typedef int GLintptr; typedef int GLsizeiptr; Index: include/vrs/opengl/offscreencanvasgl.h =================================================================== --- include/vrs/opengl/offscreencanvasgl.h (revision 5687) +++ include/vrs/opengl/offscreencanvasgl.h (working copy) @@ -1,3 +1,4 @@ +#ifndef __APPLE__ /********************************************************************** VRS - The Virtual Rendering System Copyright (C) 2001 Computer Graphics Systems Group at the @@ -189,3 +190,4 @@ } // namespace VRS #endif // VRS_OPENGL_OFFSCREENCANVASGL_H_ +#endif // !__APPLE__ Index: include/vrs/serializationmanager.h =================================================================== --- include/vrs/serializationmanager.h (revision 5687) +++ include/vrs/serializationmanager.h (working copy) @@ -105,6 +105,10 @@ #include #include +#ifdef __APPLE__ +#include +#endif + namespace VRS { class Color; @@ -240,6 +244,28 @@ #undef VRS_DEFINE_SERIALIZE_FOR_BUILTIN +#ifdef __APPLE__ + +inline void +serialization( + SerializationManager& manager, + const std::string& attributeName, + GLenum& attributeValue +) { + serialization(manager, attributeName, reinterpret_cast(attributeValue)); +} + +inline void +serialization( + SerializationManager& manager, + const std::string& attributeName, + GLint& attributeValue +) { + serialization(manager, attributeName, reinterpret_cast(attributeValue)); +} + +#endif + } // namespace VRS #endif // VRS_SERIALIZATIONMANAGER_H Index: src/opengl/sharedcontextgl.cpp =================================================================== --- src/opengl/sharedcontextgl.cpp (revision 5687) +++ src/opengl/sharedcontextgl.cpp (working copy) @@ -479,7 +479,7 @@ } GLhandleARB SharedContextGL::newGenericObject(SharedObj* obj, GLhandleARB handle) { - CallbackData dta = newOGLObject(obj, genericObjectTable_, handle); + CallbackData dta = newOGLObject(obj, genericObjectTable_, (GLuint)handle); if (dta.handle) { obj->registerDestructionCB(genericObjectCallback_); @@ -568,7 +568,7 @@ if(!invalidGenericObjects_.empty()) { VRS_CheckErrorGL("before generic object cleanup"); for(UINT i = 0, iEnd = invalidGenericObjects_.size(); i != iEnd; ++i) { - VRS_Warning(glIsProgramARB(invalidGenericObjects_[i]), "ARB vertex program does not exist"); + VRS_Warning(glIsProgramARB((GLuint)invalidGenericObjects_[i]), "ARB vertex program does not exist"); glDeleteObjectARB(invalidGenericObjects_[i]); } invalidARBPrograms_.clear(); Index: src/opengl/shapematerialgl.cpp =================================================================== --- src/opengl/shapematerialgl.cpp (revision 5687) +++ src/opengl/shapematerialgl.cpp (working copy) @@ -1,4 +1,4 @@ -set /********************************************************************** +/********************************************************************** VRS - The Virtual Rendering System Copyright (C) 2001 Computer Graphics Systems Group at the Hasso-Plattner-Institute, Potsdam, Germany. Index: src/opengl/gl2/programobjectpainter.cpp =================================================================== --- src/opengl/gl2/programobjectpainter.cpp (revision 5687) +++ src/opengl/gl2/programobjectpainter.cpp (working copy) @@ -47,6 +47,17 @@ #include #include +// OS-X seems to have different defines for this +#ifdef __APPLE__ + #define GL_OBJECT_COMPILE_STATUS GL_OBJECT_COMPILE_STATUS_ARB + #define GL_OBJECT_LINK_STATUS GL_OBJECT_LINK_STATUS_ARB + #define GL_OBJECT_INFO_LOG_LENGTH GL_OBJECT_INFO_LOG_LENGTH_ARB + + #define GL_OBJECT_ACTIVE_UNIFORMS GL_OBJECT_ACTIVE_UNIFORMS_ARB + #define GL_OBJECT_ACTIVE_ATTRIBUTES GL_OBJECT_ACTIVE_ATTRIBUTES_ARB + +#endif + namespace VRS { namespace GL2 { Index: src/opengl/gl2/variablesmapping.cpp =================================================================== --- src/opengl/gl2/variablesmapping.cpp (revision 5687) +++ src/opengl/gl2/variablesmapping.cpp (working copy) @@ -39,6 +39,11 @@ #include #include +// OS-X seems to have a different define for this +#ifdef __APPLE__ + #define GL_SAMPLER_2D_RECT_SHADOW GL_SAMPLER_2D_RECT_SHADOW_ARB +#endif + namespace VRS { namespace GL2 { Index: src/opengl/enginegl.cpp =================================================================== --- src/opengl/enginegl.cpp (revision 5687) +++ src/opengl/enginegl.cpp (working copy) @@ -427,14 +427,13 @@ #include #if !defined(__APPLE__) && defined(unix) +# include +# include # include +#elif defined(__APPLE__) +# include #endif // !__APPLE__ && unix -#ifdef unix -#include -#include -#endif - namespace VRS { namespace { @@ -445,6 +444,11 @@ // used between glBegin/glEnd pairs. This is necessary because inside glBegin/ // glEnd pairs, invoking XXXGetProcAddress is not allowed and issues a warning. void initializePerVertexExtensionEntries(EngineGL* engine) { +// when not preventing this code from getting into the object you +// get linker errors on os-x (TODO: solve this better) +#ifdef __APPLE__ + return; +#endif VRS_CheckErrorGL("before initialization of per vertex extension entries"); @@ -1103,7 +1107,7 @@ // GL Info // -#ifdef unix +#if !defined(__APPLE__) && defined(unix) namespace { @@ -1157,7 +1161,7 @@ } // namespace -#endif // unix +#endif // !__APPLE__ && unix bool EngineGL::hasExtension(const ID& extensionID) const { // read complete list of extensions @@ -1165,12 +1169,12 @@ const_cast(this)->extensions_ = new HashTable; std::string exts = glGetString(GL_EXTENSIONS) ? (char*)glGetString(GL_EXTENSIONS) : ""; -#ifdef unix +#if !defined(__APPLE__) && defined(unix) // try harder if(exts.empty()) { exts = xQueryExts(); } -#endif // unix +#endif // !__APPLE__ && unix VRS_Error(!exts.empty(), "could not get OpenGL extensions"); std::istringstream extensions(exts.c_str()); @@ -1191,18 +1195,10 @@ Display* dpy = glXGetCurrentDisplay(); int screenNo = XScreenNumberOfScreen(XDefaultScreenOfDisplay(dpy)); -# ifdef __APPLE__ if(!dpy) { - dpy = XOpenDisplay("localhost:0"); - screenNo = 0; - } -# endif // __APPLE__ -# ifdef unix - if(!dpy) { dpy = XOpenDisplay(":0"); screenNo = 0; } -# endif // __APPLE__ if (dpy) { exts = glXQueryExtensionsString(dpy, screenNo); @@ -1282,13 +1278,6 @@ Display* dpy = glXGetCurrentDisplay(); int screenNo = XScreenNumberOfScreen(XDefaultScreenOfDisplay(dpy)); -# ifdef __APPLE__ - if(!dpy) { - dpy = XOpenDisplay("localhost:0"); - screenNo = 0; - } -# endif // __APPLE__ - out << std::endl; out << "GLX Server Version: " << (char*)glXQueryServerString(dpy, screenNo, GLX_VERSION) << endl; out << "GLX Server Vendor: " << (char*)glXQueryServerString(dpy, screenNo, GLX_VENDOR) << endl; Index: src/opengl/offscreencanvasgl.cpp =================================================================== --- src/opengl/offscreencanvasgl.cpp (revision 5687) +++ src/opengl/offscreencanvasgl.cpp (working copy) @@ -1,3 +1,4 @@ +#ifndef __APPLE__ /********************************************************************** VRS - The Virtual Rendering System Copyright (C) 2001 Computer Graphics Systems Group at the @@ -512,7 +513,7 @@ if ((oldDisplay != glXGetCurrentDisplay()) || (oldContext != glXGetCurrentContext())) { if (!glXMakeCurrent(oldDisplay, oldDrawable, oldContext)) { - VRS_Error(false, "pbuffer: wglMakeCurrent() failed"); + VRS_Error(false, "pbuffer: glXMakeCurrent() failed"); } } @@ -748,3 +749,4 @@ } } // namespace VRS +#endif // !__APPLE__ Index: src/opengl/pbuffercanvasgl.cpp =================================================================== --- src/opengl/pbuffercanvasgl.cpp (revision 5687) +++ src/opengl/pbuffercanvasgl.cpp (working copy) @@ -757,7 +757,7 @@ #elif __APPLE__ -#include +#include namespace VRS { @@ -809,7 +809,7 @@ VRS_Warning(properties_ & GLCanvas::FLOAT_BUFFER == GLCanvas::UBYTE_BUFFER, "Float pbuffers not supported in OSX"); // Create offscreen context - const int attributes[] = { + const GLint attributes[] = { AGL_OFFSCREEN, AGL_RED_SIZE, (properties_ & GLCanvas::RGB_BUFFER) ? 8 : 0, AGL_GREEN_SIZE, (properties_ & GLCanvas::RGB_BUFFER) ? 8 : 0, @@ -925,10 +925,6 @@ static bool isSupported() { Display* display = glXGetCurrentDisplay(); -# ifdef __APPLE__ - if(!display) { display = XOpenDisplay("localhost:0"); } -# endif // __APPLE__ - const char* const exts = (display == NULL) ? NULL : glXQueryExtensionsString(display, 0); return (exts && strstr(exts, "GLX_SGIX_pbuffer") && strstr(exts, "GLX_SGIX_fbconfig")); Index: src/opengl/stereorenderergl.cpp =================================================================== --- src/opengl/stereorenderergl.cpp (revision 5687) +++ src/opengl/stereorenderergl.cpp (working copy) @@ -95,7 +95,7 @@ StereoRendererGL::start( Engine* ) { - glGetIntegerv(GL_STEREO, &m_haveStereo); + glGetIntegerv(GL_STEREO, (GLint*)&m_haveStereo); VRS_WarnOnce(m_haveStereo, "Stereo rendering not available, required canvas properties are missing => switching to red/cyan rendering instead..."); m_pass = Stereo::ST_Left; Index: src/opengl/facetpaintergl.cpp =================================================================== --- src/opengl/facetpaintergl.cpp (revision 5687) +++ src/opengl/facetpaintergl.cpp (working copy) @@ -254,7 +254,11 @@ IF_DEBUG( SO more; ) }; -typedef GLvoid(STDCALL *CBFunc)(); +#ifdef __APPLE__ + typedef GLvoid(*CBFunc)(...); +#else + typedef GLvoid(STDCALL *CBFunc)(); +#endif FacetPainterGL::FacetPainterGL() { tess_ = gluNewTess(); Index: src/opengl/texturegl.cpp =================================================================== --- src/opengl/texturegl.cpp (revision 5687) +++ src/opengl/texturegl.cpp (working copy) @@ -394,8 +394,8 @@ serialization(manager, "internalFormat", internalFormat_); // new in version 1 - serialization(manager, "minMipmapLevel", minMipmapLevel_, 0); - serialization(manager, "maxMipmapLevel", maxMipmapLevel_, 1000); + serialization(manager, "minMipmapLevel", minMipmapLevel_, GLint(0)); + serialization(manager, "maxMipmapLevel", maxMipmapLevel_, GLint(1000)); } VRS_SERIALIZATION_REGISTRATION(TextureGL); Index: src/opengl/Makefile =================================================================== --- src/opengl/Makefile (revision 5687) +++ src/opengl/Makefile (working copy) @@ -4,7 +4,11 @@ SRC_FILES += $(wildcard gl2/*.cpp) SRC_FILES += $(wildcard fbo/*.cpp) +ifeq ($(shell uname -s),Darwin) +EXTRA_INCLUDE = -I/usr/X11R6/include/freetype2 +else EXTRA_INCLUDE = -I/usr/X11R6/include -I/usr/include +endif EXTRA_LIBRARIES = -lvrs_core EXTRA_FLAGS = Index: src/opengl/polygonsetbuildergl.cpp =================================================================== --- src/opengl/polygonsetbuildergl.cpp (revision 5687) +++ src/opengl/polygonsetbuildergl.cpp (working copy) @@ -94,7 +94,11 @@ # define STDCALL #endif // WIN32 -typedef GLvoid(STDCALL *CBFunc)(); +#ifdef __APPLE__ + typedef GLvoid(*CBFunc)(...); +#else + typedef GLvoid(STDCALL *CBFunc)(); +#endif namespace { Index: src/opengl/textrenderergl.cpp =================================================================== --- src/opengl/textrenderergl.cpp (revision 5687) +++ src/opengl/textrenderergl.cpp (working copy) @@ -66,8 +66,13 @@ # include #endif -#include FT_FREETYPE_H -#include FT_BITMAP_H +#ifdef __APPLE__ +# include +# include +#else +# include FT_FREETYPE_H +# include FT_BITMAP_H +#endif namespace VRS { Index: src/opengl/mirrortechniquegl.cpp =================================================================== --- src/opengl/mirrortechniquegl.cpp (revision 5687) +++ src/opengl/mirrortechniquegl.cpp (working copy) @@ -529,7 +529,7 @@ int mirrorbit = stencil_->getBit(); int mirrormask = stencil_->getMask(StencilBitGL::Mirror); glEnable(GL_STENCIL_TEST); - int bits, mask; + GLint bits, mask; glGetIntegerv(GL_STENCIL_REF, &bits); glGetIntegerv(GL_STENCIL_VALUE_MASK, &mask); bits |= mirrorbit; Index: src/opengl/fbo/framebufferobjectgl.cpp =================================================================== --- src/opengl/fbo/framebufferobjectgl.cpp (revision 5687) +++ src/opengl/fbo/framebufferobjectgl.cpp (working copy) @@ -237,7 +237,11 @@ // ensure valid GLCanvas if (canvas==0) { // create small OffscreenCanvasGL to get an OpenGL context +#ifndef __APPLE__ canvas = new OffscreenCanvasGL(32, 32); +#else + VRS_NoImpl("OffscreenCanvasGL not implemented on OS-X."); +#endif } // save state of canvas @@ -307,7 +311,11 @@ // ensure valid GLCanvas if (canvas==0) { // create small OffscreenCanvasGL to get an OpenGL context +#ifndef __APPLE__ canvas = new OffscreenCanvasGL(32, 32); +#else + VRS_NoImpl("OffscreenCanvasGL not implemented on OS-X."); +#endif } // save state of canvas Index: src/Makefile.generic =================================================================== --- src/Makefile.generic (revision 5687) +++ src/Makefile.generic (working copy) @@ -10,23 +10,40 @@ CC = $(CXX) MOC = $(QTDIR)/bin/moc +# G4 Mac +ifeq ($(shell echo "`uname -s`.`machine`"),Darwin.ppc7450) +OFLAGS = -O3 -mcpu=G4 -faltivec -ffast-math +else +# Intel Mac +ifeq ($(shell echo "`uname -s`.`machine`"),Darwin.i486) +OFLAGS = -O3 -march=prescott -mtune=prescott -ffast-math +else +OFLAGS = -O2 +endif +endif + ifdef BUILD_DEBUG DEBUG_LEVEL = -pipe -g -DVRS_VERSION_DEBUG -D_DEBUG else # BUILD_DEBUG -DEBUG_LEVEL = -pipe -O2 -DVRS_VERSION_RELEASE -DNDEBUG +DEBUG_LEVEL = -pipe $(OFLAGS) -DVRS_VERSION_RELEASE -DNDEBUG endif # BUILD_DEBUG # -fPIC is needed for correctly linking .so files. LD_FLAGS = -fPIC # A goal is to add -W as well sometimes -WARN_CCFLAGS = -Wall +WARN_CCFLAGS = -Wall -Wno-non-virtual-dtor -Wno-sign-compare -Wno-unused CCFLAGS = $(DEBUG_LEVEL) $(LD_FLAGS) $(WARN_CCFLAGS) $(EXTRA_FLAGS) VRS_INCLUDE = -I../../include OPENGL_INCLUDE = -I$(OPENGLDIR)/include +# OS-X has no special OpenGL include +ifeq ($(shell uname -s),Darwin) +INCLUDE = $(VRS_INCLUDE) $(EXTRA_INCLUDE) +else INCLUDE = $(VRS_INCLUDE) $(OPENGL_INCLUDE) $(EXTRA_INCLUDE) +endif CXXFLAGS = $(CCFLAGS) $(INCLUDE) @@ -43,6 +60,9 @@ .PHONY: all clean distclean +ifeq ($(shell uname -s),Darwin) +all: $(TARGET) +else all: $(REALTARGET) rm -f $(TARGET).$(MAJOR_VERSION) rm -f $(TARGET).$(MAJOR_VERSION).$(MINOR_VERSION) @@ -50,6 +70,7 @@ ln -s $(REALTARGET) $(TARGET).$(MAJOR_VERSION).$(MINOR_VERSION) cp -f $(REALTARGET) $(LIBDIR) ln -f -s $(REALTARGET) $(LIBDIR)/$(TARGET) +endif clean: @@ -59,8 +80,12 @@ rm -f $(DEPENDENCIES) $(O_FILES) $(TARGET) $(TARGET).$(MAJOR_VERSION) $(TARGET).$(MAJOR_VERSION).$(MINOR_VERSION) $(REALTARGET) +ifeq ($(shell uname -s),Darwin) +$(TARGET): $(O_FILES) +else $(REALTARGET): $(OMOC_FILES) $(O_FILES) $(CXX) $(LINKOPTIONS) $(O_FILES) $(EXTRA_LINKFLAGS) +endif %.o: %.cpp Index: src/io/file.cpp =================================================================== --- src/io/file.cpp (revision 5687) +++ src/io/file.cpp (working copy) @@ -542,13 +542,10 @@ #include #ifdef __APPLE__ -// there are no 64 bit versions of these IO-functions for Mac OS X? +// OS-X's functions are already 64 bit. +# include # define lseek64 lseek # define open64 open -# define S_IRUSR 400 -# define S_IWUSR 200 -# define S_IRGRP 040 -# define S_IROTH 004 #endif // __APPLE__ namespace VRS { Index: src/io/Makefile =================================================================== --- src/io/Makefile (revision 5687) +++ src/io/Makefile (working copy) @@ -3,7 +3,11 @@ SRC_FILES = $(wildcard *.cpp) $(wildcard aseobjmd/*.cpp) $(wildcard vrml1readerimpl/*.cpp) GCC_FILES = $(wildcard *.c) $(wildcard zlib/*.c) $(wildcard md5/*.c) +ifeq ($(shell uname -s),Darwin) +EXTRA_INCLUDE = -I/opt/local/include +else EXTRA_INCLUDE = +endif EXTRA_LIBRARIES = -lvrs_core include ../Makefile.generic Index: src/io/cubemapcreator.cpp =================================================================== --- src/io/cubemapcreator.cpp (revision 5687) +++ src/io/cubemapcreator.cpp (working copy) @@ -68,7 +68,11 @@ root->append(cubeCamera); root->append(scene); // create off screen canvas +#ifndef __APPLE__ if(!canvas) canvas = new OffscreenCanvasGL(size, size); +#else + VRS_NoImpl("OffscreenCanvasGL not implemented on OS-X."); +#endif if(canvas->contains(scene)) { canvas->remove(scene); Index: src/sg/scenegraphprinter.cpp =================================================================== --- src/sg/scenegraphprinter.cpp (revision 5687) +++ src/sg/scenegraphprinter.cpp (working copy) @@ -100,7 +100,7 @@ #define D_LOG(expr) { \ std::ostringstream str; \ str << expr << std::endl; \ - std::cerr << str.str(); \ + std::cerr << str.str(); \ if (toFile) { \ (*toFile) << str.str(); \ } \ Index: src/vrs/font.cpp =================================================================== --- src/vrs/font.cpp (revision 5687) +++ src/vrs/font.cpp (working copy) @@ -705,8 +705,10 @@ } } -#ifdef WIN32 +#if defined(WIN32) typedef GLvoid(__stdcall *CBFunc)(); +#elif defined(__APPLE__) + typedef GLvoid(*CBFunc)(...); #else typedef GLvoid(*CBFunc)(); #endif // WIN32 Index: src/Makefile =================================================================== --- src/Makefile (revision 5687) +++ src/Makefile (working copy) @@ -1,8 +1,27 @@ +ifeq ($(shell uname -s),Darwin) +SUBDIRS = vrs image io opengl sg glut + +VRS_VERSION = 3.3.1 +ALL_OBJECTS = $(shell find $(SUBDIRS) -name "*.o") + +LIBDIRS = -L../lib -L/opt/local/lib +LIBRARIES = -lm -lfreetype -lz -lpng -ljpeg \ + -framework AGL -framework OpenGL -framework GLUT + +LINKOPTIONS = -dynamiclib -single_module $(LIBDIRS) $(LIBRARIES) +else SUBDIRS = vrs image io opengl sg glut gtkmm qt tcl +endif all: for X in $(SUBDIRS); do make -C $$X ; done +# just makes sense on OS-X +dylib: all + g++ $(LINKOPTIONS) -install_name libvrs.dylib \ + -compatibility_version $(VRS_VERSION) -current_version $(VRS_VERSION) \ + -o ../lib/libvrs.dylib $(ALL_OBJECTS) + clean: for X in $(SUBDIRS); do make -C $$X clean; done Index: apps/glutexamples/Makefile.generic =================================================================== --- apps/glutexamples/Makefile.generic (revision 5687) +++ apps/glutexamples/Makefile.generic (working copy) @@ -19,7 +19,11 @@ VRS_LIBRARIES = -lvrs_core -lvrs_opengl -lvrs_io -lvrs_sg -lvrs_image -lvrs_glut LIBPATH = -L../../../lib -L/usr/lib -L/usr/X11R6/lib +ifeq ($(shell uname -s),Darwin) +LIB = -L../../../lib -lvrs -framework GLUT +else LIB = $(EXTRA_LIBRARIES) $(LIBPATH) $(LIBRARIES) $(VRS_LIBRARIES) +endif O_FILES = $(SRC_FILES:%.cpp=%.o) Index: INSTALL.mac =================================================================== --- INSTALL.mac (revision 0) +++ INSTALL.mac (revision 0) @@ -0,0 +1,27 @@ +********************************************************************** +VRS - The Virtual Rendering System +Copyright (C) 2001-07 Computer Graphics Systems Group at the +Hasso-Plattner-Institute, Potsdam, Germany. +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. +This library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details. +You should have received a copy of the GNU Lesser+ General Public +License along with this library; if not, write to the FreeSoftware +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA, 02111-1307, USA. +********************************************************************** + + +When installing on Mac OS-X (tested on Tiger) you just need the Developer Tools +from Apple (including gcc-4.0 or 3.x) and MacPorts for libjpeg and libpng. + +All you have to do after installing this depencies is to go to the src/ folder +in the VRS distribution and type "make", after this you have wait a bit and then +you should do a "make dylib" to build the dynamic library for OS-X which will be +placed in the lib/ directory. + +You can now try most of the examples.