\section{OpenGL $@%$%s%?!<%U%'!<%9(J}
\markright{\arabic{section}. OpenGL}
EusLisp OpenGL $@%$%s%?!<%U%'!<%9$O!"(JEusLisp $@$K(J OpenGL 
$@%$%s%?!<%U%'!<%9$r<B8=$7!"%W%i%C%H%U%)!<%`Hs0MB8$N#3<!85%0%i%U%#%/%94D(J
$@6-$r(J EusLisp $@=hM}7O$G<B8=$9$k!#(J\\

OpenGL $@%"%W%j%1!<%7%g%s%$%s%?!<%U%'!<%9$O!"(JSilicon Graphics $@<R@=(J WS
DIGITAL EQUIPMENTS $@<R@=(J WS $@$r;O$a!"(JWindows-NT$@!"(JWindows-95$@!JM=Dj!K!"$5(J
$@$i$K%5!<%I%Q!<%F%#(J\footnote{Template Graphics,.Inc $@Ey(J}$@$N%=%U%H%&%(%"@=(J
$@IJ$NDI2C$K$h$j(J Sun WS (Solaris2)$@!"(JPC-UNIX $@!J(JLINUX $@Ey!K$N>e$G$bF0:n$9$k!#(J\\

$@$^$?!"%U%j!<$N(J OpenGL $@%(%_%e%l!<%7%g%s!&%i%$%V%i%j$G$"$k!"(JMesa GL $@$HJ;(J
$@MQ$9$k$H!"DL>o$N(J X $@C<Kv$K$bF1Ey$N3($NIA2h$r9T$J$&$3$H$,$G$-$k!#(J\\

\subsection{OpenGL $@5!G=3HD%(J}

EusLisp $@$N(J OpenGL $@5!G=3HD%$O!"(JOpenGL $@%i%$%V%i%j$H$N%$%s%?!<%U%'!<%9!"(J
viewsurface $@%/%i%9$N%5%V%/%i%9$G$"$k(J glviewsurface$@!"(Jgeo:viewer $@$N(J 
:draw-one $@%a%=%C%I$N=q$-49$(!"(Jgldraw $@%f!<%F%#%j%F%#!&%k!<%A%s$K$h$j<B(J
$@Au$5$l$k!#(J\\

\classdesc{glviewsurface}{geometry:viewsurface}{}{
OpenGL $@MQ(J viewsurface$@!#(J viewer $@$X$NIA2h%j%/%(%9%H$r(J OpenGL $@$NIA2h%j%/(J
$@%(%9%H$KK]Lu$9$k!#(J
}

\methoddesc{:create}{}{ \&key (x 0) (y 0) (size 256) (w size) (h size)
		      (title (string (gensym "GL")))
		      (displaymode (logior gl:AUX\_DOUBLE gl:AUX\_RGB gl:AUX\_DEPTH))
		      \&allow-other-keys}{
{\relax glviewsurface} $@$r:n@.!"=i4|2=$9$k!#(J
}
\methoddesc{:material}{ambient diffuse specular emission shininess}{
$@8=:_$N%^%F%j%"%k!&%+%i!<$rJQ99$9$k!#(J
}
\methoddesc{:color}{color-vector}{
$@8=:_$N%+%i!<$rJQ99$9$k!#(J
}
\methoddesc{:3d-mode}{}{
$@<M1FJQ49$rF);kK!<M1F%b!<%I$K$7!"%G%W%98!::!"%i%$%F%#%s%0$r%$%M!<%V%k$9(J
$@$k!##3<!85%b%G%k(!(!%7!<%s$NIA2h$KE,$7$?%b!<%I$K$9$k!#(J
}
\methoddesc{:2d-mode}{}{
$@<M1FJQ49$r@5<M1F$K$7!"%G%W%98!::!"%i%$%F%#%s%0$r%G%#%9%(!<%V%k$9$k!#(J
$@#2<!85$NIA2hMWAG$NIA2h$KE,$7$?%b!<%I$K$9$k!#(J
}
\methoddesc{:clear}{mask \&key (color)}{
{\relax mask} $@$G;XDj$5$l$k!"%U%l!<%`%P%C%U%!$NFbMF$r>C5n$9$k!#(J
{\relax color} $@$O;XDj$,$"$l$P!">C5n;~$KMQ$$$i$l$k?'$r@_Dj$7D>$9!#(J
}
\methoddesc{:init}{\&key \&allow-other-keys}{
$@=i4|2=%a%=%C%I!#(J
}
\methoddesc{:point}{x y}{
$@#2<!85%b!<%I$G!"E@$rIA$/!#(J
}
\methoddesc{:line}{x1 y1 x2 y2}{
$@#2<!85%b!<%I$G!"D>@~$rIA$/!#(J
}
\methoddesc{:3d-point}{pos}{
$@#3<!85%b!<%I$GE@$rIA$/!#(J
}
\methoddesc{:3d-line}{start end}{
$@#3<!85%b!<%I$GD>@~$rIA$/!#(J
}
\methoddesc{:draw-faces}{faces}{
$@#3<!85%b!<%I$GLL!J%]%j%4%s!K$rIA$/!#(J
}
\methoddesc{:rectangle}{x y w h}{
$@#2<!85%b!<%I$G6k7A$rIA$/!#(J
}
\methoddesc{:draw-point}{p}{
$@#2<!85%b!<%I$G!"E@$rIA$/!#(J
}
\methoddesc{:draw-line}{from to}{
$@#2<!85%b!<%I$G!"D>@~$rIA$/!#(J
}
\methoddesc{:draw-rectangle}{}{
$@#2<!85%b!<%I$G6k7A$rIA$/!#(J
}
\classdesc{colormaterial}{object}{}{
$@%b%G%k$N%^%F%j%"%k;XDj$KMQ$$$k%G!<%?9=B$!#(J
}
\funcdesc{gl:draw-face}{face}{
$@%]%j%4%s$NIA2hC10L!#FL$G%[!<%k$N$J$$!"%]%j%4%s$O(J glVertex3fv\(\) $@$rMQ(J
$@$$$F!"$=$N$^$^IA$+$l$k!#$=$&$G$J$$$b$N$O(J GLU $@%i%$%V%i%j$N(J tesselation 
$@5!G=$rMQ$$$FIA$+$l$k!#(J
}
\funcdesc{gl:draw-body}{abody}{
{\relax body} $@$NIA2hC10L!#(J\\

{\relax body} $@$NIA2h<j=g$O0lEY!"3FLLKh$NIA2hMW5a$NNs$H$7$F!"$=$N(J {\relax
body} $@$rIA$/<j=g$,(J OpenGL $@$N(J Display List $@$H$7$FDj5A$5$l!"<B:]$NIA2h$O(J
$@$=$N8e!"$=$N(J Display List $@$r8F$S=P$9$3$H$K$h$jIA2h$,9T$J$o$l$k!#(J\\

Display List $@$N5-O?$O(J {\relax body} $@$N(J plist $@$K(J attribute {\relax
:GL-DISPLAYLIST-ID} $@$G(J put $@$5$l$k!#(J
}
\classdesc{linecolor}{object}{}{
$@E@!"D>@~$N?';XDj$KMQ$$$k%G!<%?9=B$!#(J
}

\funcdesc{cls}{}{
$@2hLL$r%/%j%"$9$k!#(J
}
\funcdesc{swapb}{}{
$@%@%V%k%P%C%U%!!&%b!<%I$N$H$-$N%P%C%U%!!&%9%o%C%W$r9T$J$&!#(J
}
\funcdesc{resetperspective}{}{
$@8=:_$N(J{\relax \*viewing\*} $@$+$i;kE@!"Cm;kE@0LCV$r<h$j=P$7!"(JGL $@$N%3%s%F%-(J
$@%9%H$KH?1G$5$;$k!#(J
}
\funcdesc{gldraw}{\&rest things}{
$@;kE@$N:F@_Dj(J {\relax (resetperspective)}$@!"(J
$@%U%l!<%`%P%C%U%!$N%/%j%"(J {\relax (cls)}$@!"(J
$@IA2h(J {\relax (apply \#'draw things)}$@!"(J
$@%@%V%k%P%C%U%!$N8r49(J {\relax (swapb)}
$@$r=g$K9T$J$$!"%7!<%s$NIA2h$r9T$J$&!#(J\\

things $@$O:8$+$i1&$K=g$K=hM}$5$l!"$=$NMWAG$,!"%/%i%9(J colormaterial$@!"(J
linecolor $@$N%$%s%9%?%s%9$N;~$O!"(JGL $@$N%+%l%s%H%3%s%F%-%9%H$N?'$,JQ99$5(J
$@$l$k!#$9$J$o$A!"(J(gldraw *color1* *obj1* *color2* *obj2*) $@$G$O!"(J
*obj1* $@$,(J *color1* $@$GIA$+$l!"(J*obj2* $@$,(J *color2* $@$GIA$+$l$k!#(J
}

\subsection{$@5/F0J}K!(J}
eusgl $@$O(J OpenGL $@$NJd=u%i%$%V%i%j(J aux$@!"(Jglx $@$rMQ$$$k$N$?$a!"4D6-JQ?t(J 
DISPLAY$@!"(JLD\_LIBRARY\_PATH $@$,E,Ev$JCM$K%;%C%H$5$l$F$$$kI,MW$,$"$k!#(Jaux 
$@%i%$%V%i%j$O(J irix5 $@$G$O%G%U%)%k%H$G%$%s%9%H!<%k$5$l$F$$$J$$$,!"(J
/usr/share/src/OpenGL $@2<$K%=!<%9%3!<%I$,$"$k$[$+!"(J
http://www.sgi.com/Technology/openGL/opengl.html $@$^$?$O(J 
ftp://sgigate.sgi.com/pub/opengl/ $@Ey$+$i<hF@$G$-$k!#(J\\

Mesa GL $@%i%$%V%i%j$rMQ$$$k>l9g$O!"(JLD\_LIBRARY\_PATH $@$NJQ99$N$_(J
$@$G!"@ZBX$,$G$-$k!#>\:Y$O(J /usr/local/eus/gl/src/README.Mesa $@$r;2>H$N$3(J
$@$H!#(JMesa GL $@$O!"(Jhttp://www.ssec.wisc.edu/\~brianp/Mesa.html $@$^$?$O(J 
ftp://iris.ssec.wisc.edu/pub/Mesa/ $@Ey$+$iF~<j$G$-$k!#(J\\

$@%W%m%0%i%`L>(J eusgl $@$H$7$F5/F0$9$k$3$H$G!"(JOpenGL $@3HD%5!G=$D$-$N(J Euslisp
$@$,N)$A>e$,$k!#(J\\

eta3 $@%^%K%T%e%l!<%?$rIA$/%5%s%W%k(J /usr/local/eus/gl/src/Sample.l $@$,(J
$@MQ0U$7$F$"$j!"(J

\begin{verbatim}
eusgl$ (load "/usr/local/eus/gl/src/Sample.l")
eusgl$ (load "view")
eusgl$ (gldraw *scene*)
\end{verbatim}

$@Ey$H$9$k$H3($,I=<($G$-$k!#(J

