--Apple-Mail-6--254042018
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
Hello,
Here are my instructions to get rbogl-0.32c compiled on Mac OSX 10.3
(Panther)
(the attached .rtf file)
It's a bit different from the instructions listed on
http://www.rubygarden.org/ruby?RubyOnMacintosh/OpenGLandGLUT but this
is what makes it work on my machine. (I hope I haven't missed
something)
Regards Alwin.
--Apple-Mail-6--254042018
Content-Transfer-Encoding: 7bit
Content-Type: application/rtf;
x-unix-mode=0644;
name="rbogl_panther.rtf"
Content-Disposition: attachment;
filename=rbogl_panther.rtf
{\rtf1\mac\ansicpg10000\cocoartf102
{\fonttbl\f0\fnil\fcharset77 LucidaGrande-Bold;\f1\fnil\fcharset77 Monaco;\f2\fnil\fcharset77 LucidaGrande;
}
{\colortbl;\red255\green255\blue255;}
\paperw11900\paperh16840\margl1440\margr1440\vieww13000\viewh14880\viewkind0
\pard\tx565\tx1133\tx1700\tx2266\tx2833\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
\f0\b\fs32 \cf0 In extconf.rb\
\pard\tx565\tx1133\tx1700\tx2266\tx2833\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
\fs24 \cf0 Comment out the lines:\
\f1\b0 header = nil\
\
idir, ldir = dir_config("x11", "/usr/X11R6")\
have_library("Xi", "XAllowDeviceEvents")\
have_library("Xext", "XMITMiscGetBugMode")\
have_library("Xmu", "XmuAddCloseDisplayHook")\
have_library("X11", "XOpenDisplay")\
\
dir_config("opengl", idir, ldir)\
dir_config("glut", idir, ldir)\
\
\f0\b replace the line:\
\f1\b0 have_library(lib, func) || have_library("Mesa"+lib, func)\
\f0\b with\
\f1\b0 true\
\
\f0\b Comment out the lines:\
\f1\b0 if have_library(glut_libname)\
\
end\
\
\f0\b Now run ruby extconf.rb. \
This creates the makefiles you'll have to edit by hand.\
\
\pard\tx565\tx1133\tx1700\tx2266\tx2833\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
\fs32 \cf0 In rbogl and ogl.c:\
\pard\tx565\tx1133\tx1700\tx2266\tx2833\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
\fs24 \cf0 replace the line: \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f1\b0 \cf0 #include "GL/gl.h"\
\f0\b with:\
\f1\b0 #include <OpenGL/gl.h>\
\f2 \
\pard\tx565\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
\f0\b\fs32 \cf0 In glu.c\
\pard\tx565\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
\fs24 \cf0 replace the lines: \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f1\b0 \cf0 #include "GL/gl.h"\
#include "GL/glu.h"\
\f0\b with:\
\f1\b0 #include <OpenGL/gl.h>\
#include <OpenGL/glu.h>\
\
\pard\tx565\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
\f0\b\fs32 \cf0 In glut.c\
\pard\tx565\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
\fs24 \cf0 replace the line: \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f1\b0 \cf0 #include "GL/glut.h"\
\f0\b with:\
\f1\b0 #include <GLUT/glut.h>\
\f2 \
\pard\tx565\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
\f0\b\fs32 \cf0 In Makefile.ogl and Makefile.glut: \
\pard\tx565\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
\fs24 \cf0 replace the lines: \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f1\b0 \cf0 CFLAGS = -fno-common -g -O2 -fno-common -pipe -fno-common \
\f0\b with:\
\f1\b0 CFLAGS = -fno-common -g -O2 -pipe -I/System/Library/Frameworks/OpenGL.framework/Headers -I/System/Library/Frameworks/GLUT.framework/Headers\
\f0\b and:\
\f1\b0 LIBS = $(LIBRUBYARG_SHARED) -ldl -lobjc \
\pard\tx565\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
\f0\b \cf0 with: \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f1\b0 \cf0 LIBS = -ldl -lruby -lGLU -lGL -lobjc -framework GLUT\
\f0\b and:\
\pard\tx565\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
\f1\b0 \cf0 DLDFLAGS = \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f0\b \cf0 with:\
\f1\b0 DLDFLAGS = -L$(topdir) -L$(libdir) -L/System/Library/Frameworks/OpenGL.framework/Libraries\
\f2 \
\pard\tx565\tx1133\tx1700\tx2266\tx2832\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural
\f0\b\fs32 \cf0 Compile: \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\fs24 \cf0 compile with:\
\f1\b0 make\
\f0\b Test with:\
\f1\b0 ruby sample/robot.rb\
\f0\b Install with:\
\f1\b0 sudo make install}
--Apple-Mail-6--254042018--