From Gideon May, port to OSX of GLUT examples.

This commit is contained in:
Robert Osfield 2005-11-28 09:15:46 +00:00
parent 3881a55564
commit 81435a28b9
5 changed files with 20 additions and 4 deletions

View File

@ -209,6 +209,7 @@ ifeq ($(OS),SunOS)
DYNAMICLIBRARYLIB = -ldl DYNAMICLIBRARYLIB = -ldl
OSG_LIBS = -losgGA -losgDB -losgUtil -losg OSG_LIBS = -losgGA -losgDB -losgUtil -losg
GL_LIBS = -lGLU -lGL GL_LIBS = -lGLU -lGL
GLUT_LIBS = -lglut
X_INC = -I/usr/X11R6/include X_INC = -I/usr/X11R6/include
X_LIBS = -lXext -lXmu -lXi -lX11 X_LIBS = -lXext -lXmu -lXi -lX11
SOCKET_LIBS = -lsocket -lnsl SOCKET_LIBS = -lsocket -lnsl
@ -298,6 +299,7 @@ ifeq ($(OS),IRIX)
DYNAMICLIBRARYLIB = DYNAMICLIBRARYLIB =
OSG_LIBS = -losgGA -losgDB -losgUtil -losg OSG_LIBS = -losgGA -losgDB -losgUtil -losg
GL_LIBS = -lGLU -lGL GL_LIBS = -lGLU -lGL
GLUT_LIBS = -lglut
X_INC = -I/usr/X11R6/include X_INC = -I/usr/X11R6/include
X_LIBS = -lXext -lXi -lXmu -lX11 X_LIBS = -lXext -lXi -lXmu -lX11
SOCKET_LIBS = SOCKET_LIBS =
@ -382,6 +384,7 @@ endif
DYNAMICLIBRARYLIB = -ldl DYNAMICLIBRARYLIB = -ldl
OSG_LIBS = -losgGA -losgDB -losgUtil -losg OSG_LIBS = -losgGA -losgDB -losgUtil -losg
GL_LIBS = -lGLU -lGL GL_LIBS = -lGLU -lGL
GLUT_LIBS = -lglut
X_INC = -I/usr/X11R6/include X_INC = -I/usr/X11R6/include
X_LIBS = -lXi -lXmu -lX11 X_LIBS = -lXi -lXmu -lX11
PF_XTRA_LIBS = -L/usr/lib/libpfdb -Xlinker -rpath /usr/lib/libpfdb \ PF_XTRA_LIBS = -L/usr/lib/libpfdb -Xlinker -rpath /usr/lib/libpfdb \
@ -430,6 +433,7 @@ ifeq ($(OS),FreeBSD)
DYNAMICLIBRARYLIB = DYNAMICLIBRARYLIB =
OSG_LIBS = -losgGA -losgDB -losgUtil -losg OSG_LIBS = -losgGA -losgDB -losgUtil -losg
GL_LIBS = -lGLU -lGL GL_LIBS = -lGLU -lGL
GLUT_LIBS = -lglut
X_INC = -I/usr/X11R6/include X_INC = -I/usr/X11R6/include
X_LIBS = -lXmu -lX11 X_LIBS = -lXmu -lX11
SOCKET_LIBS = SOCKET_LIBS =
@ -503,6 +507,7 @@ ifeq ($(OS),Darwin)
OSG_LIBS = -losgGA -losgDB -losgUtil -losg OSG_LIBS = -losgGA -losgDB -losgUtil -losg
CARBON_LIB = -framework Carbon CARBON_LIB = -framework Carbon
GL_LIBS = -framework OpenGL $(CARBON_LIB) GL_LIBS = -framework OpenGL $(CARBON_LIB)
GLUT_LIBS = -framework GLUT
SOCKET_LIBS = SOCKET_LIBS =
OTHER_LIBS = -lm -lstdc++ -lobjc -lOpenThreads OTHER_LIBS = -lm -lstdc++ -lobjc -lOpenThreads
LIB_EXT = dylib LIB_EXT = dylib
@ -555,6 +560,7 @@ ifeq ($(OS),CYGWIN)
DYNAMICLIBRARYLIB = DYNAMICLIBRARYLIB =
OSG_LIBS = -losgGA -losgDB -losgUtil -losg OSG_LIBS = -losgGA -losgDB -losgUtil -losg
GL_LIBS = -lglu32 -lopengl32 GL_LIBS = -lglu32 -lopengl32
GLUT_LIBS = -lglut
X_INC = X_INC =
X_LIBS = -lgdi32 -luser32 X_LIBS = -lgdi32 -luser32
SOCKET_LIBS = SOCKET_LIBS =
@ -616,6 +622,7 @@ ifeq ($(OS),MINGW)
DYNAMICLIBRARYLIB = DYNAMICLIBRARYLIB =
OSG_LIBS = -losgGA -losgDB -losgUtil -losg OSG_LIBS = -losgGA -losgDB -losgUtil -losg
GL_LIBS = -lglu32 -lopengl32 GL_LIBS = -lglu32 -lopengl32
GLUT_LIBS = -lglut
X_INC = X_INC =
X_LIBS = -lgdi32 -luser32 X_LIBS = -lgdi32 -luser32
SOCKET_LIBS = -lws2_32 SOCKET_LIBS = -lws2_32
@ -676,6 +683,7 @@ ifeq ($(OS),HP-UX)
OSG_LIBS = -losgGA -losgDB -losgUtil -losg OSG_LIBS = -losgGA -losgDB -losgUtil -losg
GL_LIBS = -L/opt/graphics/OpenGL/lib -lGLU -lGL GL_LIBS = -L/opt/graphics/OpenGL/lib -lGLU -lGL
GLUT_LIBS = -lglut
X_INC = -I/usr/X11R6/include X_INC = -I/usr/X11R6/include
X_LIBS = -L/usr/lib/X11R6 -lXext -lXi -lX11 X_LIBS = -L/usr/lib/X11R6 -lXext -lXi -lX11
SOCKET_LIBS = SOCKET_LIBS =

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgGLUTkeyboardmouse.cpp\ osgGLUTkeyboardmouse.cpp\
LIBS += -losgDB -losgUtil -losg -lglut $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) LIBS += -losgDB -losgUtil -losg $(GLUT_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
INSTFILES = \ INSTFILES = \
$(CXXFILES)\ $(CXXFILES)\

View File

@ -7,7 +7,11 @@
#ifdef WIN32 #ifdef WIN32
#include <windows.h> #include <windows.h>
#endif #endif
#ifdef __APPLE__
# include <GLUT/glut.h>
#else
# include <GL/glut.h> # include <GL/glut.h>
#endif
#include <osg/Timer> #include <osg/Timer>
#include <osgUtil/SceneView> #include <osgUtil/SceneView>
#include <osgDB/ReadFile> #include <osgDB/ReadFile>

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgGLUTsimple.cpp\ osgGLUTsimple.cpp\
LIBS += -losgDB -losgUtil -losg -lglut $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) LIBS += -losgDB -losgUtil -losg $(GLUT_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
INSTFILES = \ INSTFILES = \
$(CXXFILES)\ $(CXXFILES)\

View File

@ -7,7 +7,11 @@
#ifdef WIN32 #ifdef WIN32
#include <windows.h> #include <windows.h>
#endif #endif
#ifdef __APPLE__
# include <GLUT/glut.h>
#else
# include <GL/glut.h> # include <GL/glut.h>
#endif
#include <osg/Timer> #include <osg/Timer>
#include <osgUtil/SceneView> #include <osgUtil/SceneView>
#include <osgDB/ReadFile> #include <osgDB/ReadFile>