| 
 | Generated by diff2html.pl © Yves Bailly, MandrakeSoft S.A. 2001, Ryohei Morita 2007 diff2html.pl is licensed under the GNU GPL. | 
| ../07-02/07-02-Rendering.c | 07-03-Rendering.c | |||
|---|---|---|---|---|
| 35 lines 1070 bytes Last modified : Mon Nov 5 07:59:18 2012 | 38 lines 1118 bytes Last modified : Mon Nov 5 12:08:18 2012 | |||
| 1 | // Keisanki Joron 2 (Introduction to Computing II) | 1 | // Keisanki Joron 2 (Introduction to Computing II) | |
| 2 | // Dept. of Engineering Systems, University of Tsukuba | 2 | // Dept. of Engineering Systems, University of Tsukuba | |
| 3 | // [UTF-8 / Unix] | 3 | // [UTF-8 / Unix] | |
| 4 | // 計算機序論2・実習 (筑波大学工学システム学類) | 4 | // 計算機序論2・実習 (筑波大学工学システム学類) | |
| 5 | 5 | |||
| 6 | // 2012/11/05a kameda[at]iit.tsukuba.ac.jp | 6 | // 2012/11/05a kameda[at]iit.tsukuba.ac.jp | |
| 7 | // 07.02. ファイル分割 | 7 | // 07.03. ファイル分割に伴う修正 | |
| 8 | ||||
| 9 | #include "ic2-CommonHeaders.h" | |||
| 10 | ||||
| 8 | 11 | |||
| 9 | // *********************************************************************** | 12 | // *********************************************************************** | |
| 10 | // Rendering ************************************************************* | 13 | // Rendering ************************************************************* | |
| 11 | 14 | |||
| 12 | // +++-------------------------------------------------- | 15 | // +++-------------------------------------------------- | |
| 13 | // スクリーンに描画する | 16 | // スクリーンに描画する | |
| 14 | // +++-------------------------------------------------- | 17 | // +++-------------------------------------------------- | |
| 15 | 18 | |||
| 16 | // +---------------------------------------------------- | 19 | // +---------------------------------------------------- | |
| 17 | // 1フレーム分の描画 | 20 | // 1フレーム分の描画 | |
| 18 | // +---------------------------------------------------- | 21 | // +---------------------------------------------------- | |
| 19 | void ic2_DrawFrame (void) { | 22 | void ic2_DrawFrame (void) { | |
| 20 | // (1) 描画バッファの初期化 | 23 | // (1) 描画バッファの初期化 | |
| 21 | // 以前にglClearColor()で指定した色で塗り潰す | 24 | // 以前にglClearColor()で指定した色で塗り潰す | |
| 22 | glClear(GL_COLOR_BUFFER_BIT); | 25 | glClear(GL_COLOR_BUFFER_BIT); | |
| 23 | 26 | |||
| 24 | // (2) カメラの設定 | 27 | // (2) カメラの設定 | |
| 25 | ic2_SetUpCamera_Ortho(); | 28 | ic2_SetUpCamera_Ortho(); | |
| 26 | 29 | |||
| 27 | // (3) 光源の設置 | 30 | // (3) 光源の設置 | |
| 28 | 31 | |||
| 29 | // (4) 物体の描画 | 32 | // (4) 物体の描画 | |
| 30 | ic2_OpenGLLogo(0.95); | 33 | ic2_OpenGLLogo(0.95); | |
| 31 | 34 | |||
| 32 | // (5) 描画バッファの切替 | 35 | // (5) 描画バッファの切替 | |
| 33 | glutSwapBuffers(); | 36 | glutSwapBuffers(); | |
| 34 | } | 37 | } | |
| 35 | 38 |