sgl 0.4.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. data/ChangeLog +254 -234
  2. data/History.txt +6 -0
  3. data/Manifest.txt +10 -0
  4. data/Rakefile +27 -7
  5. data/examples/cocoa1-basic.rb +14 -14
  6. data/examples/cocoa10-transparent.rb +26 -26
  7. data/examples/cocoa11-application.rb +13 -13
  8. data/examples/cocoa2-draw.rb +23 -23
  9. data/examples/cocoa3-affine.rb +29 -29
  10. data/examples/cocoa4-font.rb +24 -24
  11. data/examples/cocoa5-image.rb +22 -22
  12. data/examples/cocoa6-sound.rb +24 -24
  13. data/examples/cocoa7-movie.rb +40 -40
  14. data/examples/cocoa8-movieoverlay.rb +42 -42
  15. data/examples/cocoa9-streaming.rb +40 -40
  16. data/examples/opengl1-basic.rb +14 -14
  17. data/examples/opengl11-application.rb +13 -13
  18. data/examples/opengl2-draw.rb +23 -23
  19. data/examples/opengl3-affine.rb +29 -29
  20. data/examples/sample1.rb +11 -11
  21. data/examples/sample10.rb +16 -16
  22. data/examples/sample11.rb +22 -22
  23. data/examples/sample11a.rb +33 -33
  24. data/examples/sample12.rb +30 -30
  25. data/examples/sample12a.rb +35 -35
  26. data/examples/sample13.rb +116 -116
  27. data/examples/sample15.rb +24 -24
  28. data/examples/sample16.rb +31 -31
  29. data/examples/sample16a.rb +35 -35
  30. data/examples/sample6.rb +18 -18
  31. data/examples/sample7.rb +16 -16
  32. data/examples/sample9.rb +20 -20
  33. data/examples/testgl.rb +169 -169
  34. data/lib/sgl/bass.rb +46 -46
  35. data/lib/sgl/cocoa-app.rb +43 -43
  36. data/lib/sgl/cocoa-color.rb +65 -65
  37. data/lib/sgl/cocoa-draw.rb +72 -72
  38. data/lib/sgl/cocoa-event.rb +229 -229
  39. data/lib/sgl/cocoa-media.rb +144 -144
  40. data/lib/sgl/cocoa-notuse.rb +493 -493
  41. data/lib/sgl/cocoa-window.rb +203 -203
  42. data/lib/sgl/cocoa.rb +8 -8
  43. data/lib/sgl/opengl-app.rb +38 -38
  44. data/lib/sgl/opengl-color.rb +44 -44
  45. data/lib/sgl/opengl-draw.rb +260 -260
  46. data/lib/sgl/opengl-event.rb +325 -325
  47. data/lib/sgl/opengl-modules.rb +22 -22
  48. data/lib/sgl/opengl-window.rb +224 -224
  49. data/lib/sgl/opengl.rb +7 -7
  50. data/lib/sgl/sgl-button.rb +135 -135
  51. data/lib/sgl/sgl-client.rb +21 -21
  52. data/lib/sgl/sgl-color.rb +68 -82
  53. data/lib/sgl/sgl-connect.rb +9 -9
  54. data/lib/sgl/sgl-server.rb +58 -58
  55. data/lib/sgl/sgl-spring.rb +216 -216
  56. data/lib/sgl/version.rb +2 -2
  57. data/scripts/lib-txt2html.rb +130 -0
  58. data/scripts/txt2html +2 -63
  59. data/spec/sgl_spec.rb +13 -0
  60. data/spec/spec.opts +1 -0
  61. data/spec/spec_helper.rb +1 -0
  62. data/test/test_cocoa_app.rb +291 -291
  63. data/test/test_module_ruby16.rb +30 -30
  64. data/test/test_opengl_app.rb +147 -147
  65. data/test/test_opengl_basic.rb +22 -22
  66. data/test/test_opengl_fullscreen.rb +23 -23
  67. data/test/test_opengl_novice.rb +35 -35
  68. data/website/challenge1.html +91 -91
  69. data/website/challenge1.txt +3 -3
  70. data/website/challenge2.html +143 -144
  71. data/website/challenge2.txt +13 -14
  72. data/website/challenge3.html +66 -63
  73. data/website/challenge3.txt +7 -7
  74. data/website/cocoa.html +85 -88
  75. data/website/cocoa.txt +2 -4
  76. data/website/description.html +138 -138
  77. data/website/description.txt +1 -1
  78. data/website/exercise1.html +262 -264
  79. data/website/exercise1.txt +58 -53
  80. data/website/exercise2.html +241 -683
  81. data/website/exercise2.txt +11 -427
  82. data/website/exercise3.html +206 -0
  83. data/website/exercise3.txt +155 -0
  84. data/website/exercise4.html +198 -0
  85. data/website/exercise4.txt +151 -0
  86. data/website/exercise5.html +162 -0
  87. data/website/exercise5.txt +113 -0
  88. data/website/exhibition.html +84 -84
  89. data/website/howto.html +146 -134
  90. data/website/howto.txt +9 -0
  91. data/website/index.html +178 -178
  92. data/website/index.txt +20 -19
  93. data/website/sound.html +141 -141
  94. metadata +16 -3
data/website/howto.html CHANGED
@@ -1,134 +1,146 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
6
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
- <title>
8
- 便利情報
9
- </title>
10
- <script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
11
- <style>
12
-
13
- </style>
14
- <script type="text/javascript">
15
- window.onload = function() {
16
- settings = {
17
- tl: { radius: 10 },
18
- tr: { radius: 10 },
19
- bl: { radius: 10 },
20
- br: { radius: 10 },
21
- antiAlias: true,
22
- autoPad: true,
23
- validTags: ["div"]
24
- }
25
- var versionBox = new curvyCorners(settings, document.getElementById("version"));
26
- versionBox.applyCornersToAll();
27
- }
28
- </script>
29
- </head>
30
- <body>
31
- <div id="main">
32
-
33
- <h1>便利情報</h1>
34
- <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/sgl"; return false'>
35
- <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/sgl" class="numbers">0.4.0</a>
37
- </div>
38
- <p>Ruby初心者のための,知ってると便利に使える情報です.</p>
39
-
40
-
41
- <h2>コメントアウトを活用する</h2>
42
-
43
-
44
- <p>ある行だけ実行しないようにしたいが,消してしまいたくはないというとき,
45
- コメントアウトという方法がある.行の最初に<code>#</code>を入れると,その行だけを
46
- 実行しないようにできる.</p>
47
-
48
-
49
- <p>コメントアウトを活用することはとても大事だ.プログラムをかいてみてうま
50
- く動かなくなったときは,その行を消してしまうのではなくコメントアウトす
51
- ることによって,情報を保存しつつ動作させないようにする.なにをやったら
52
- うまくいかなかったのかを記録として残すようにすることが大事である.</p>
53
-
54
-
55
- <h2>notepadの使い方: コピー&#38;ペースト</h2>
56
-
57
-
58
- <ul>
59
- <li>コピーしたい領域をマウスをドラッグして反転させる.</li>
60
- <li>Ctrlを押しながらCを押す.その領域がコピーバッファに入る.</li>
61
- <li>挿入したいところにカーソルを合わせ,Ctrlを押しながらVを押すとペーストされる.</li>
62
- </ul>
63
-
64
-
65
- <h2>notepadの使い方: ショートカットキー</h2>
66
-
67
-
68
- <ul>
69
- <li>Ctrl+Sで,ファイルをセーブする.</li>
70
- </ul>
71
-
72
-
73
- <h2>コマンドプロンプトの使い方</h2>
74
-
75
-
76
- <ul>
77
- <li>上キーを押すと,一つ前のコマンドを表示する.同じコマンドを繰り返す時に便利.</li>
78
- <li><code>dir</code>で,現在のディレクトリーにあるファイルの一覧を表示する.</li>
79
- <li><code>dir *.rb</code>で,ファイルの終わりに<code>.rb</code>がついたファイル一覧を表示する.
80
- <ul>
81
- <li>このコマンドでちゃんとセーブされているかを確認する.</li>
82
- </ul></li>
83
- </ul>
84
-
85
-
86
- <h2>Rubyとは?</h2>
87
-
88
-
89
- <p>sglはオブジェクト指向スクリプト言語Rubyを基盤として用いている.もしプ
90
- ログラミング言語としてのRubyを学びたい場合は直接Ruby についての本を参
91
- 照する.</p>
92
-
93
-
94
- <ul>
95
- <li><a href="http://www.ruby-lang.org/ja/">Ruby</a></li>
96
- </ul>
97
-
98
-
99
- <p>下記の書籍をおすすめする.</p>
100
-
101
-
102
- <ul>
103
- <li><a href="http://www.amazon.co.jp/dp/4274066428/etocom05-22">プログラミングRuby 第2版 言語編</a></li>
104
- <li><a href="http://www.amazon.co.jp/dp/4274066436/etocom05-22">プログラミングRuby 第2版 ライブラリ編</a></li>
105
- </ul>
106
-
107
-
108
- <h2>OpenGLとは?</h2>
109
-
110
-
111
- <p>OpenGLとはグラフィックを描画するためのプログラミングにおける方法の一つ
112
- である.sglはグラフィック描画の仕組みとして内部的にOpenGLを使っている.
113
- もしsglの提供するグラフィックを超えてグラフィックを使いたい場合は,直
114
- 接OpenGLを使うこともできる.</p>
115
-
116
-
117
- <p>OpenGLの使い方は,下記のテキストをおすすめする.</p>
118
-
119
-
120
- <ul>
121
- <li><a href="http://www.exa-corp.co.jp/solution/UBIQ/OpenGL/index.shtml">OpenGLプログラミングコース</a>
122
- <ul>
123
- <li><a href="http://www.exa-corp.co.jp/solution/UBIQ/OpenGL/OpenGL-text-091.pdf">OpenGLプログラミングテキスト</a></li>
124
- </ul></li>
125
- </ul>
126
- <p class="coda">
127
- 25th June 2007<br>
128
- </p>
129
- </div>
130
-
131
- <!-- insert site tracking codes here, like Google Urchin -->
132
-
133
- </body>
134
- </html>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <title>
8
+ 便利情報
9
+ </title>
10
+ <script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
11
+ <style>
12
+
13
+ </style>
14
+ <script type="text/javascript">
15
+ window.onload = function() {
16
+ settings = {
17
+ tl: { radius: 10 },
18
+ tr: { radius: 10 },
19
+ bl: { radius: 10 },
20
+ br: { radius: 10 },
21
+ antiAlias: true,
22
+ autoPad: true,
23
+ validTags: ["div"]
24
+ }
25
+ var versionBox = new curvyCorners(settings, document.getElementById("version"));
26
+ versionBox.applyCornersToAll();
27
+ }
28
+ </script>
29
+ </head>
30
+ <body>
31
+ <div id="main">
32
+
33
+ <h1>便利情報</h1>
34
+ <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/sgl"; return false'>
35
+ <p>Get Version</p>
36
+ <a href="http://rubyforge.org/projects/sgl" class="numbers">1.0.0</a>
37
+ </div>
38
+ <p>Ruby初心者のための,知ってると便利に使える情報です.</p>
39
+
40
+
41
+ <h2>コメントアウトを活用する</h2>
42
+
43
+
44
+ <p>ある行だけ実行しないようにしたいが,消してしまいたくはないというとき,
45
+ コメントアウトという方法がある.行の最初に<code>#</code>を入れると,その行だけを
46
+ 実行しないようにできる.</p>
47
+
48
+
49
+ <p>コメントアウトを活用することはとても大事だ.プログラムをかいてみてうま
50
+ く動かなくなったときは,その行を消してしまうのではなくコメントアウトす
51
+ ることによって,情報を保存しつつ動作させないようにする.なにをやったら
52
+ うまくいかなかったのかを記録として残すようにすることが大事である.</p>
53
+
54
+
55
+ <h2>notepadの使い方: コピー&#38;ペースト</h2>
56
+
57
+
58
+ <ul>
59
+ <li>コピーしたい領域をマウスをドラッグして反転させる.</li>
60
+ <li>Ctrlを押しながらCを押す.その領域がコピーバッファに入る.</li>
61
+ <li>挿入したいところにカーソルを合わせ,Ctrlを押しながらVを押すとペーストされる.</li>
62
+ </ul>
63
+
64
+
65
+ <h2>notepadの使い方: ショートカットキー</h2>
66
+
67
+
68
+ <ul>
69
+ <li>Ctrl+Sで,ファイルをセーブする.</li>
70
+ </ul>
71
+
72
+
73
+ <h2>コマンドプロンプトの使い方</h2>
74
+
75
+
76
+ <ul>
77
+ <li>上キーを押すと,一つ前のコマンドを表示する.同じコマンドを繰り返す時に便利.</li>
78
+ <li><code>dir</code>で,現在のディレクトリーにあるファイルの一覧を表示する.</li>
79
+ <li><code>dir *.rb</code>で,ファイルの終わりに<code>.rb</code>がついたファイル一覧を表示する.
80
+ <ul>
81
+ <li>このコマンドでちゃんとセーブされているかを確認する.</li>
82
+ </ul></li>
83
+ </ul>
84
+
85
+
86
+ <h2>課題の注意点</h2>
87
+
88
+
89
+ <p>課題はいずれもwindowサイズなどは自由.課題例は100,100のサイズになって
90
+ いるが,より大きいwindowサイズを選択してもよい.</p>
91
+
92
+
93
+ <p>ファイル名は必ず指定のものにし,Z:に保存する.指定のファイル名のファイ
94
+ ルが保存されているかどうかで課題提出を判定する.ファイル名が違う場合は
95
+ 提出してないことになってしまうので,注意する.</p>
96
+
97
+
98
+ <h2>Rubyとは?</h2>
99
+
100
+
101
+ <p>sglはオブジェクト指向スクリプト言語Rubyを基盤として用いている.もしプ
102
+ ログラミング言語としてのRubyを学びたい場合は直接Ruby についての本を参
103
+ 照する.</p>
104
+
105
+
106
+ <ul>
107
+ <li><a href="http://www.ruby-lang.org/ja/">Ruby</a></li>
108
+ </ul>
109
+
110
+
111
+ <p>下記の書籍をおすすめする.</p>
112
+
113
+
114
+ <ul>
115
+ <li><a href="http://www.amazon.co.jp/dp/4274066428/etocom05-22">プログラミングRuby 第2版 言語編</a></li>
116
+ <li><a href="http://www.amazon.co.jp/dp/4274066436/etocom05-22">プログラミングRuby 第2版 ライブラリ編</a></li>
117
+ </ul>
118
+
119
+
120
+ <h2>OpenGLとは?</h2>
121
+
122
+
123
+ <p>OpenGLとはグラフィックを描画するためのプログラミングにおける方法の一つ
124
+ である.sglはグラフィック描画の仕組みとして内部的にOpenGLを使っている.
125
+ もしsglの提供するグラフィックを超えてグラフィックを使いたい場合は,直
126
+ 接OpenGLを使うこともできる.</p>
127
+
128
+
129
+ <p>OpenGLの使い方は,下記のテキストをおすすめする.</p>
130
+
131
+
132
+ <ul>
133
+ <li><a href="http://www.exa-corp.co.jp/solution/UBIQ/OpenGL/index.shtml">OpenGLプログラミングコース</a>
134
+ <ul>
135
+ <li><a href="http://www.exa-corp.co.jp/solution/UBIQ/OpenGL/OpenGL-text-091.pdf">OpenGLプログラミングテキスト</a></li>
136
+ </ul></li>
137
+ </ul>
138
+ <p class="coda">
139
+ 30th June 2007<br>
140
+ </p>
141
+ </div>
142
+
143
+ <!-- insert site tracking codes here, like Google Urchin -->
144
+
145
+ </body>
146
+ </html>
data/website/howto.txt CHANGED
@@ -30,6 +30,15 @@ h2. コマンドプロンプトの使い方
30
30
  * @dir *.rb@で,ファイルの終わりに@.rb@がついたファイル一覧を表示する.
31
31
  ** このコマンドでちゃんとセーブされているかを確認する.
32
32
 
33
+ h2. 課題の注意点
34
+
35
+ 課題はいずれもwindowサイズなどは自由.課題例は100,100のサイズになって
36
+ いるが,より大きいwindowサイズを選択してもよい.
37
+
38
+ ファイル名は必ず指定のものにし,Z:に保存する.指定のファイル名のファイ
39
+ ルが保存されているかどうかで課題提出を判定する.ファイル名が違う場合は
40
+ 提出してないことになってしまうので,注意する.
41
+
33
42
  h2. Rubyとは?
34
43
 
35
44
  sglはオブジェクト指向スクリプト言語Rubyを基盤として用いている.もしプ
data/website/index.html CHANGED
@@ -1,178 +1,178 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
6
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
- <title>
8
- sgl &#x2192; simple generic library
9
- </title>
10
- <script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
11
- <style>
12
-
13
- </style>
14
- <script type="text/javascript">
15
- window.onload = function() {
16
- settings = {
17
- tl: { radius: 10 },
18
- tr: { radius: 10 },
19
- bl: { radius: 10 },
20
- br: { radius: 10 },
21
- antiAlias: true,
22
- autoPad: true,
23
- validTags: ["div"]
24
- }
25
- var versionBox = new curvyCorners(settings, document.getElementById("version"));
26
- versionBox.applyCornersToAll();
27
- }
28
- </script>
29
- </head>
30
- <body>
31
- <div id="main">
32
-
33
- <h1>sgl &#x2192; simple generic library</h1>
34
- <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/sgl"; return false'>
35
- <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/sgl" class="numbers">0.4.0</a>
37
- </div>
38
- <h2>What is sgl?</h2>
39
-
40
-
41
- <p>&#8216;sgl&#8217; is a simgple generic library to create a program with graphics and sound.</p>
42
-
43
-
44
- <h2>Requirement</h2>
45
-
46
-
47
- <h3>Windows</h3>
48
-
49
-
50
- <ul>
51
- <li>Ruby 1.8.5 or later</li>
52
- <li>Ruby/OpenGL</li>
53
- <li>Ruby/Math3D</li>
54
- <li>Ruby/SDL</li>
55
- </ul>
56
-
57
-
58
- <p>You can see <a href="http://eto.com/d/RubySDLonWindows.html">Ruby/SDL on Windows</a>
59
- to install these libraries.</p>
60
-
61
-
62
- <h3>Mac <span class="caps">OS X</span></h3>
63
-
64
-
65
- <ul>
66
- <li>Mac <span class="caps">OS X 10</span>.3 or later</li>
67
- <li>Ruby 1.8.5 or later</li>
68
- <li>X Window system</li>
69
- </ul>
70
-
71
-
72
- <h2>Installing</h2>
73
-
74
-
75
- <pre syntax="ruby">sudo gem install sgl</pre>
76
-
77
- <h2>The basics</h2>
78
-
79
-
80
- Save this progarm as <code>test1.rb</code>.
81
- <pre syntax="ruby">
82
- require "sgl"
83
- window 100, 100
84
- line 0, 0, 100, 100
85
- wait
86
- </pre>
87
-
88
- <p>Run the program with <code>ruby test1.rb</code>.</p>
89
-
90
-
91
- <code>test2.rb</code>.
92
- <pre syntax="ruby">
93
- require "sgl"
94
- window 100, 100
95
- background 0
96
- color 100
97
- line 0, 0, 100, 100
98
- wait
99
- </pre>
100
-
101
- <code>test3.rb</code>.
102
- <pre syntax="ruby">
103
- require "sgl"
104
-
105
- def setup
106
- window 100, 100
107
- end
108
-
109
- def display
110
- line 0, 0, 100, 100
111
- end
112
-
113
- mainloop
114
- </pre>
115
-
116
- <h2>Pages</h2>
117
-
118
-
119
- <ul>
120
- <li><a href="../doc/index.html" title="Rdoc"><span class="caps">API</span> Documnet</a></li>
121
- <li><a href="cocoa.html">cocoa version</a></li>
122
- </ul>
123
-
124
-
125
- <ul>
126
- <li>Pages below are in Japanese
127
- <ul>
128
- <li><a href="description.html">description</a></li>
129
- <li><a href="howto.html">How to for beginner</a></li>
130
- <li><a href="sound.html">How to use Sound function</a></li>
131
- </ul></li>
132
- </ul>
133
-
134
-
135
- <h2>Classes</h2>
136
-
137
-
138
- <p>We did some classes using sgl in art schools.
139
- You&#8217;ll see the materials for the classes.</p>
140
-
141
-
142
- <ul>
143
- <li>Pages below are in Japanese
144
- <ul>
145
- <li><a href="exercise1.html">exercise 1 to 10</a></li>
146
- <li><a href="exercise2.html">exercise 11 to 21</a></li>
147
- <li><a href="challenge1.html">special exercise 1</a></li>
148
- <li><a href="challenge2.html">special exercise 2</a></li>
149
- <li><a href="challenge3.html">final exercise</a></li>
150
- </ul></li>
151
- </ul>
152
-
153
-
154
- <h2>Repositry</h2>
155
-
156
-
157
- <p>The trunk repository is <code>svn://rubyforge.org/var/svn/sgl/trunk</code> for anonymous access.</p>
158
-
159
-
160
- <h2>License</h2>
161
-
162
-
163
- <p>Ruby License.</p>
164
-
165
-
166
- <h2>Contact</h2>
167
-
168
-
169
- <p>Comments are welcome. Send an email to &#8220;Kouichirou Eto&#8221; <eto at rubyforge dot org>.</p>
170
- <p class="coda">
171
- 25th June 2007<br>
172
- </p>
173
- </div>
174
-
175
- <!-- insert site tracking codes here, like Google Urchin -->
176
-
177
- </body>
178
- </html>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <title>
8
+ sgl &#x2192; simple generic library
9
+ </title>
10
+ <script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
11
+ <style>
12
+
13
+ </style>
14
+ <script type="text/javascript">
15
+ window.onload = function() {
16
+ settings = {
17
+ tl: { radius: 10 },
18
+ tr: { radius: 10 },
19
+ bl: { radius: 10 },
20
+ br: { radius: 10 },
21
+ antiAlias: true,
22
+ autoPad: true,
23
+ validTags: ["div"]
24
+ }
25
+ var versionBox = new curvyCorners(settings, document.getElementById("version"));
26
+ versionBox.applyCornersToAll();
27
+ }
28
+ </script>
29
+ </head>
30
+ <body>
31
+ <div id="main">
32
+
33
+ <h1>sgl &#x2192; simple generic library</h1>
34
+ <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/sgl"; return false'>
35
+ <p>Get Version</p>
36
+ <a href="http://rubyforge.org/projects/sgl" class="numbers">1.0.0</a>
37
+ </div>
38
+ <h2>What is sgl?</h2>
39
+
40
+
41
+ <p>&#8216;sgl&#8217; is a simgple generic library to create a program with graphics and sound.</p>
42
+
43
+
44
+ <h2>Requirement</h2>
45
+
46
+
47
+ <h3>Windows</h3>
48
+
49
+
50
+ <ul>
51
+ <li>Ruby 1.8.5 or later</li>
52
+ <li>Ruby/OpenGL</li>
53
+ <li>Ruby/Math3D</li>
54
+ <li>Ruby/SDL</li>
55
+ </ul>
56
+
57
+
58
+ <p>You can see <a href="http://eto.com/d/RubySDLonWindows.html">Ruby/SDL on Windows</a>
59
+ install documnet.</p>
60
+
61
+
62
+ <h3>Mac <span class="caps">OS X</span></h3>
63
+
64
+
65
+ <ul>
66
+ <li>Mac <span class="caps">OS X 10</span>.3 or later</li>
67
+ <li>Ruby 1.8.5 or later</li>
68
+ <li>X Window system</li>
69
+ </ul>
70
+
71
+
72
+ <h2>Installing</h2>
73
+
74
+
75
+ <pre syntax="ruby">sudo gem install sgl</pre>
76
+
77
+ <h2>The basics</h2>
78
+
79
+
80
+ <pre syntax="ruby">
81
+ # test1.rb
82
+ require "sgl"
83
+ window 100, 100
84
+ line 0, 0, 100, 100
85
+ wait
86
+ </pre>
87
+
88
+ <pre syntax="ruby">
89
+ # test2.rb
90
+ require "sgl"
91
+ window 100, 100
92
+ background 0
93
+ color 100
94
+ line 0, 0, 100, 100
95
+ wait
96
+ </pre>
97
+
98
+ <pre syntax="ruby">
99
+ # test3.rb
100
+ require "sgl"
101
+
102
+ def setup
103
+ window 100, 100
104
+ end
105
+
106
+ def display
107
+ line 0, 0, 100, 100
108
+ end
109
+
110
+ mainloop
111
+ </pre>
112
+
113
+ <h2>Documents</h2>
114
+
115
+
116
+ <ul>
117
+ <li><a href="rdoc/"><span class="caps">API</span> Reference</a></li>
118
+ <li><a href="cocoa.html">Description of sgl-cocoa</a></li>
119
+ </ul>
120
+
121
+
122
+ <ul>
123
+ <li>Pages below are in Japanese
124
+ <ul>
125
+ <li><a href="description.html">Description</a></li>
126
+ <li><a href="howto.html">How to for Beginner</a></li>
127
+ <li><a href="sound.html">How to use Sound function</a></li>
128
+ </ul></li>
129
+ </ul>
130
+
131
+
132
+ <h2>Classes</h2>
133
+
134
+
135
+ <p>We did some classes using sgl in some art schools.
136
+ You can see some materials for the classes.</p>
137
+
138
+
139
+ <ul>
140
+ <li>Pages below are in Japanese
141
+ <ul>
142
+ <li><a href="exercise1.html">Exercise 1</a></li>
143
+ <li><a href="exercise2.html">Exercise 2</a></li>
144
+ <li><a href="exercise3.html">Exercise 3</a></li>
145
+ <li><a href="exercise4.html">Exercise 4</a></li>
146
+ <li><a href="exercise5.html">Exercise 5</a></li>
147
+ <li><a href="challenge1.html">Special Exercise 1</a></li>
148
+ <li><a href="challenge2.html">Special Exercise 2</a></li>
149
+ <li><a href="challenge3.html">Final Exercise</a></li>
150
+ </ul></li>
151
+ </ul>
152
+
153
+
154
+ <h2>Repositry</h2>
155
+
156
+
157
+ <p>The trunk repository is <code>svn://rubyforge.org/var/svn/sgl/trunk</code> for anonymous access.</p>
158
+
159
+
160
+ <h2>License</h2>
161
+
162
+
163
+ <p>Ruby License.</p>
164
+
165
+
166
+ <h2>Contact</h2>
167
+
168
+
169
+ <p>Comments are welcome. Send an email to Kouichirou Eto &#8220;eto at rubyforge dot org&#8221;.</p>
170
+ <p class="coda">
171
+ 1st July 2007<br>
172
+ </p>
173
+ </div>
174
+
175
+ <!-- insert site tracking codes here, like Google Urchin -->
176
+
177
+ </body>
178
+ </html>