8. GLUT$B$rMQ$$$?(BCG$B$N0\F0$H2sE>(B

$B!Z7W;;5!=xO@#2!&$BL\, $B7W;;5!=xO@#2(B, $B, www.kameda-lab.org 2014/01/30e

OpenGL$B$G$N(BCG$BIA2h$r$$$h$$$h9T$$$^$9!#(B
$B$?$@!"8w$HH?@\;XDj$7$^$9!#(B

$B;29M%j%s%/(B

$B!&(BOpenGL(ver.2.1)$B$N3F4X?t(B($B>.J8;z$N(Bgl$B$N#2J8;z$G;O$^$k4X?t(B)$B$N@bL@(B
$B!&(BOpenGL$B$N(BProgramming Guide Book (ver1.1, $BDL>N@VK\(B)
$B!&(BGLUT - The OpenGL Utility Toolkit
$B!&(BThe OpenGL Utility Toolkit (GLUT) Programming Interface API Version 3


08.01. OpenGL$B%i%$%V%i%j$,;H$&9TNs(B

OpenGL$B$,$B$$$^!"$3$3$G$O(B GL_PROJECTION$B9TNs$r(B$B#P(B$B!"(BGL_MODELVIEW$B9TNs$r(B$B#M(B$B$HI=5-$7$^$9!#(B
$B$"$k6u4VCf$N#1E@$N0LCV%Y%/%H%k$O!"#4a$B$GI=$7$^$9!#(B
$BEvLL!"(Ba = (X, Y, Z, 1)T$B$H$7!"Bh#4MWAG$O#1$K8BDj$7$F$*$/$3$H$K$7$^$9!#(B

GL_PROJECTION$B9TNs(B
$B;29M!'(BProjection Transformation
$B%+%a%i:BI87O$N0LCV%Y%/%H%k(Bb$B$r2hA|J?LL>e$K$Ba$B$b#4$B8=;~E@$G$O!"a = (u, v, f, 1)T$B$H$7!"Bh#4MWAG$O#1$K$7$F$*$$$F$/$@$5$$!#(B
$B$3$3$G$O!"(B06.05$B@a$N@5Ej1F(B$B$KBP1~$9$kEj1F9TNs(B $B#P(Bortho $B$r9M$($^$9!#(B
$B$3$N>l9g$O!"a = (X, Y, f, 1)T$B$H$J$j$^$9!#(B
a = $B#P(Bortho b

GL_MODELVIEW$B9TNs(B
$B;29M!'(BViewing and Modeling Transformations
$BJ*BN$N0\F0$d2sE>$J$I$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H$C$F$I$3$N>uBV$N9TNs$rCN$k$Y$-$G$7$g$&$+!#(B
$B$=$l$OJ*BN$r(BCG$B$H$7$FIA2h$7;O$a$kD>A0$G$9!#$3$N$3$H$K$D$$$F$O$B!Z%W%m%0%i%`(B08-01$B![!J3%?'J,$OJQ99L5$7!K(B

  1. ic2-CommonHeaders.h (07-05$B$+$i$N:9J,(B)
  2. 08-01-Rendering.c (07-05$B$+$i$N:9J,(B)
  3. 08-01-GLTools.c ($B?75,(B)
  4. 07-03-EmbededObjects.c, 07-03-Projection.c, 07-04-Initialization.c, 07-05-Callback.c, 07-05-MainFunction.c

eclipse$B$N%W%m%8%'%/%H@_Dj$K$D$$$F(B
07$B@a0J9_!"FC$K$3$N(B08$B@a0J9_$O!"=q$-49$($kI,MW$N$J$$%U%!%$%k$,A}$($F$-$^$9!#(B
$B!J=q$-49$($kI,MW$N$J$$%U%!%$%k$,40A4$K3NDj$7$F$7$^$($k$N$J$i%i%$%V%i%j$r:n$C$F$7$^$&$H$3$m$G$9$,!"K\
$B!J$A$g$3$A$g$3$H$"$A$3$A$N%U%!%$%k$r$$$8$k$N$G!E!K(B
$B$=$3$G:#8e$O0J2<$N$h$&$K$7$F3F@aMQ$N?75,%W%m%8%'%/%H$rMQ0U$7$F$/$@$5$$!#(B
1. $B$^$:%W%m%8%'%/%H!J(B08-01$B!K$r?75,:n@.$7$^$9!#(B
2. $BI,MW$J?7$7$$%=!<%9%U%!%$%k$r$=$N%W%m%8%'%/%H%G%#%l%/%H%j!J(B~/workspace-ic2/08-01/$B!K$KCV$-$^$9!#(B
3. $B=q$-49$($:$KA0$N%W%m%8%'%/%H$+$i0z$-7Q$0%=!<%9%U%!%$%k!J$3$3$G$$$l$P(B07.05.$B@a$N%=!<%9%U%!%$%k72$N$&$A!"?7$7$/=q$-D>$5$J$+$C$?%=!<%9%U%!%$%k!K!J(B~/workspace-ic2/07-05/*.[ch]$B!K$r%W%m%8%'%/%H%G%#%l%/%H%j!J(B~/workspace-ic2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Editor$B"*!JE83+!K"*(BC/C++ Editor Text Font$B"*JQ99(B
4.$B!!%U%!%_%j!'J8@t!vEy42HyJF9u(B , $B%9%?%$%k!'(BRegular , $B%5%$%:(B 10 $B"*(BOK
$B!J$H$K$+$/2<$N%W%l%S%e!<$GEyI}$+$I$&$+$r3NG'$7$^$7$g$&!K(B
5.$B!V@_Dj!W1&B&!'?'$H%U%)%s%H!'(BC/C++$B"*!JE83+!K"*(BC-Build Console Text Font$B"*JQ99(B
6$B!!%U%!%_%j!'J8@t!vEy42HyJF9u(B , $B%9%?%$%k!'(BRegular , $B%5%$%:(B 10 $B"*(BOK

eclipse$B$N%H%i%V%k%7%e!<%F%#%s%0!JK\Ev$KIT6q9g$K$J$C$??M$@$1!K(B
$B$J$K$+$NGo;R$K!"@_Dj$,ITNI$K$J$C$F(Beclipse$B$,A4$/5/F0$G$-$J$/$J$k$H$-$,$"$j$^$9!#(B
~/workspace-ic2/.metadata/ $B$N2<$N%U%!%$%k$,$*$+$7$$!"$H8@$o$l$?>l9g$,$3$l$K3:Ev$7$^$9!#(B
0. eclipse$B$r=*N;$5$;$F$/$@$5$$!#(B
1. bash$B>e$G!"(Brm -rf ~/workspace-ic2/.metadata/ $B$H$7$F!"A4$F>C$7$F$/$@$5$$!#(B
2. eclipse$B$r5/F0$7$^$9!#(B
3. $B%a%K%e!4. $B0lHL"*!JE83+!K"*4{B8%W%m%8%'%/%H$r%o!<%/%9%Z!<%9$X"*5. $B%k!<%H%G%#%l%/%H%j$NA*Br"*;2>H!J(Bubuntu/workspace-ic2$B$,A*Br$5$l$F$k$O$:!K(B
6. $B$:$i$C$H2a5n$N%W%m%8%'%/%H$,JB$s$G$$$k$O$:$J$N$G!"!V$9$Y$FA*Br!W$7$F!V=*N;!W$7$^$9!#(B
7. mail protected]$9$l$P!"A4$F$N%W%m%8%'%/%H$,I|3h$7$^$9!#(B

$B1i=,(B

08-01-ex1: $BEj1F9TNs$NM=A[(B
06.05$B@a$N@5Ej1F$N@_Dj(B$B$N$H$-$N(B$B#P(Bortho$B$N9TNs$r%W%m%0%i%`:[email protected]$KM=A[$7$J$5$$!#(B

08-01-ex2: GL_MODELVIEW$B9TNs(B
GL_MODELVIEW$B9TNs$O=i4|>uBV$G$I$N$h$&$J9TNs$G$"$k$Y$-$+!"M}M3$H6&$K@bL@$7$J$5$$!#(B

08-01-ex3: OpenGL$B$G$N(B4x4$B9TNs$NG[CV(B
OpenGL$B$G(Bfloat m[16];$B$N(B16$BMWAG$O(B4x4$B9TNs$K$I$&BP1~$9$k$+<($7$J$5$$!#FC$KE:;z$K$OCm0U$7$F@bL@$9$k$3$H!#(B

08-01-ex4: glGetFloatv()$B4X?t$N@bL@(B
glGetFloatv()$B4X?t$N@bL@$N$"$k%Z!<%8$r!"!V(BOpenGL$B$N3F4X?t$N@bL@(B$B!W$NCf$+$iC5$7$F(BURL$B$r<($7$J$5$$!#!J(Bhttp://www.opengl.org/sdk/docs/man/$B$G$OITL@NF$J$N$GIT@52r$G$9!#!K(B

08-01-ex5: $B?7$7$$(BOpenGL$B%i%$%V%i%j4X?t(B
$B:#2s?7$7$/F3F~$5$l$?(BOpenGL$B%i%$%V%i%j4X?t$rA4$F%j%9%H%"%C%W$7!"$H$=$N;H$$J}$r4JC1$K@bL@$7$J$5$$!#(B

08-01-ex6: ic2_OpenGLLogo()$B$NFbMF$r!"(B06-06-ex2$B$G:n@.$7$?$b$N$KF~$lBX$($J$5$$!#(B


08.02. $B=i$a$F$N0\F0(B

$B;29M!'(BViewing and Modelin Transformations

$B$^$@;d$?$A$,$B$3$NJ*BN$r1&$K(B0.5$B0\F0$5$;$k$3$H$K$7$^$9!#(B(08-02-ex1)
$B$9$J$o$A!"!V%+%a%i:BI87O$N(BX$B<4$K1h$C$F(B+0.01$B$@$10\F0!W$5$;$^$9!#(B
$B!J(B0.01$B$J$s$F>.$5$$0\F0NL$,J,$+$k$+$C$F!)$4?4G[$J$/!#$A$c$s$HM}M3$,$"$j$^$9!#!K(B

$B0\F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(Bic2_OpenGLLogo()$B$N8F$S=P$7D>A0$KA`:n$7$F$_$^$7$g$&!#(B
OpenGL$B$G$O!"(BglTranslatef()$B$N$h$&$K9TNs$rA`:n$9$k4X?t$NMxMQ;~$K$O!"I,$:(BOpenGL$B$N#4$B$=$N$?$a$K!"(BglTranslatef()$B$ND>A0$K(B glMatrixMode(GL_MODELVIEW) $B$r$B!Z%W%m%0%i%`(B08-02$B![!J3%?'J,$OJQ99L5$7!K(B

  1. 08-02-Rendering.c (08-01$B$+$i$N:9J,(B)
  2. 07-03-EmbededObjects.c, 07-03-Projection.c, 07-04-Initialization.c, 07-05-Callback.c, 07-05-MainFunction.c, 08-01-GLTools.c, ic2-CommandHeaders.h

$B

$BI=<($5$l$k(BGL_MODELVIEW$B9TNs$KCmL\$7$^$7$g$&!E$F!"$"$l$l!)$I$&$7$F!)(B

$B1i=,(B

08-02-ex1: $BC10L(B
$B>e5-@bL@Cf$N!"!V(B0.01$B!W$NC10L$O2?$G$9$+!#@bL@$7$J$5$$!#(B

08-02-ex2: glTranslatef()$B4X?t$N@bL@(B
$B%Z!<%8$r!"!V(BOpenGL$B$N3F4X?t$N@bL@(B$B!W$NCf$+$iC5$7$F(BURL$B$r<($7$J$5$$!#(B

08-02-ex3: $B0\F0JQNL$N%F%9%H(B
$B0\F0JQNL$N(B(0.01, 0, 0)$B$r$$$m$$$mJQ99$7$FO$G$b@bL@$7$J$5$$!#(B


08.03. OpenGL$B$G$N9TNsA`:n$N

$B;29M!'(BViewing and Modelin Transformations

$BA0@a$G$O?^$i$:$b%"%K%a!<%7%g%s$r$B!J$o!<$$%"%K%a!<%7%g%s$@!
$B!JIaDL$N%W%m%0%i%^$J$i!"Nc$($?$^$?$^$$$$7k2L$K=P$/$o$7$F$b!"$=$l$,A[Dj30$G$"$k$N$J$iMQ?4$7$F$A$c$s$H$=$l$,H/@8$7$J$$$h$&$K!V%P%0!W$H$7$FDY$7$^$9!K(B
$B!J??$N%W%m%0%i%^(B(?)$B$J$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#19TL\$NA`:n$r$B$3$3$G$O!"(BglTranslatef()$B$NA0$KF3F~$7$^$9!#(B

$B%W%m%0%i%_%s%0(B
$B%W%m%0%i%_%s%0$G!"F0:n$r3NG'$7$F$_$^$7$g$&!#(B
$B3NG'$N0Y$K!"(Bic2_showMATRIX()$B$r#32U=j$KKd$a9~$s$G$_$^$9!#(B
$B!J$=$3$N7/!"%W%m%0%i%`$N

$B!Z%W%m%0%i%`(B08-03$B![!J3%?'J,$OJQ99L5$7!K(B

  1. 08-03-Rendering.c (08-02$B$+$i$N:9J,(B)
  2. 07-03-EmbededObjects.c, 07-03-Projection.c, 07-04-Initialization.c, 07-05-Callback.c, 07-05-MainFunction.c, 08-01-GLTools.c, ic2-CommandHeaders.h

$B1i=,(B

08-03-ex1: X$BJQNL$NJQ99(B
X$BJQNL!V(B0.01$B!W$r(B0.7$B$N$h$&$K$b$&>/$7Bg$-$$CM$K$7$F


08.04. $BB?CJ3,$N9TNsA`:n(B

OpenGL$B$G$O!"0\F0$NA`:n$rB?CJ3,$N9TNsA`:n$GI=8=$9$k$3$H$GJ#;($JA`:n$r2DG=$K$7$^$9!#(B
$B!"3HBg=L>.$N#3$B$3$N$$$:$l$b9TNs$GI=8=$7$^$9!#(B(08-04-ex1)

$B$3$3$G$O!"(BViewing and Modelin Transformations$B$N(BFigure-3.4$B$NA`:n$rZ$B<4H?;~7W2s$j$K(B45$B!k2sE>$5$;$?(B$B$"$H(B$B!"!V%+%a%i:BI87O(BX$B<4!W$K1h$C$F(B0.7$B0\F0$5$;$^$9(B($B?^(B$B!K!#(B
$B2sE>9TNs$r(B$B#M(Brot$B!"0\F09TNs$r(B$B#M(Bmove$B$H$9$k$H!"(B
$B#M(Bst $B"+(B $B#I(B $B#M(Bmove $B#M(Brot
$B$G$h$$$3$H$K$J$j$^$9!#(B
$B9TNs$NJB$S$,@bL@$NJB$S$HH?E>$7$F$$$k$3$H$KCm0U$7$F$/$@$5$$!#(B
$B!J5U$G$O$$$1$^$;$s!*!K(B
$B$3$l$OA`:nBP>]$G$"$k0LCV%Y%/%H%k$,$3$N1&B&$KG[CV$5$l$F!"1&B&$N9TNs$+$iE,MQ$5$l$F$$$/$?$a$G$9!#(B

OpenGL$B$N$B$H$$$&$3$H$O!"@bL@8l=g$KBP$7$F!"5U=g$K9TNsA`:n4X?t$rJB$Y$F$$$/$3$H!J<0$N>e$G$O:8$+$i1&$X=g$K!K$K$J$j$^$9!#(B

$B$B!Z(BRT$B![$NglRotatef(45, 0, 0, 1);
glTranslatef(0.7, 0, 0);
$B!Z(BTR$B![$NglTranslatef(0.7, 0, 0);
glRotatef(45, 0, 0, 1);

$B$J$*!"2sE>9TNs$rI=$9(B glRotatef() $B4X?t$O!"Bh#10z?t$,2sE>3QEY(B(degree$B$G;XDj(B)$B!"Bh#2!A#40z?t$G2sE><4$NJ}8~%Y%/%H%k$r<($7$^$9!#(B

$B!Z%W%m%0%i%`(B08-04$B![!J3%?'J,$OJQ99L5$7!K(B

  1. 08-04-Rendering.c (08-03$B$+$i$N:9J,(B)
  2. 07-03-EmbededObjects.c, 07-03-Projection.c, 07-04-Initialization.c, 07-05-Callback.c, 07-05-MainFunction.c, 08-01-GLTools.c, ic2-CommandHeaders.h

$B$o$+$j$K$/$$$H$-$O!"(B's'/'S'$B%-!<$bMxMQ$7$F$_$^$7$g$&!#(B
$B!J(Blogoscale$BJQ?t$K$h$kJQ2=$O(B ic2_OpenGLLogo() $B$NCf$NIA2h:BI8CM$rD>@\$$$8$C$F$$$k$N$G!"9TNsA`:n$KL54X78$G$9$M!K(B
$B!J(B's'$B$N%9%1!<%k$r(B0.5$B$h$j$b$C$H>.$5$$(B 0.1 $B$H$+$K$9$k$H$o$+$j$d$9$$$+$b$7$l$^$;$s!K(B

$B1i=,(B

08-04-ex1: $B9TNs1i;;(B
RT, TR$B$N$I$A$i$b08-04-ex2: glRotatef()$B!&;~7W2s$j(B
glRotatef()$B$@$1$r;H$C$F!"%m%4$,Cf?4$G;~7W2s$j$K$f$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