rubysdl 2.1.2 → 2.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. data/NEWS.en +8 -0
  2. data/NEWS.ja +8 -0
  3. data/README.en +22 -15
  4. data/README.ja +31 -20
  5. data/depend +2 -0
  6. data/doc-en/event.rsd +3 -0
  7. data/doc-en/time.rsd +1 -1
  8. data/doc-en/video.rsd +8 -8
  9. data/doc.txt +32 -0
  10. data/doc/event.rsd +5 -0
  11. data/doc/opengl.rsd +160 -0
  12. data/doc/rsd.rb +4 -3
  13. data/doc/time.rsd +1 -1
  14. data/doc/video.rsd +8 -8
  15. data/extconf.rb +30 -15
  16. data/lib/sdl.rb +2 -1
  17. data/lib/sdl1_compatible.rb +20 -0
  18. data/mkpkg.sh +28 -0
  19. data/rubysdl.gemspec +21 -0
  20. data/rubysdl.h +1 -0
  21. data/rubysdl_cdrom.c +0 -10
  22. data/rubysdl_event.c +30 -11
  23. data/rubysdl_event_key.c +0 -5
  24. data/rubysdl_image.c +2 -2
  25. data/rubysdl_joystick.c +0 -18
  26. data/rubysdl_kanji.c +0 -5
  27. data/rubysdl_main.c +0 -2
  28. data/rubysdl_mixer.c +2 -18
  29. data/rubysdl_mouse.c +0 -4
  30. data/rubysdl_rwops.c +4 -0
  31. data/rubysdl_sdlskk.c +0 -3
  32. data/rubysdl_sge_video.c +0 -14
  33. data/rubysdl_smpeg.c +0 -1
  34. data/rubysdl_time.c +0 -10
  35. data/rubysdl_ttf.c +0 -3
  36. data/rubysdl_video.c +2 -30
  37. data/rubysdl_wm.c +0 -5
  38. data/sample/caption.rb +21 -0
  39. data/sge/INSTALL +72 -0
  40. data/sge/LICENSE +504 -0
  41. data/sge/Makefile +83 -0
  42. data/sge/Makefile.conf +63 -0
  43. data/sge/README +219 -0
  44. data/sge/Todo +7 -0
  45. data/sge/WhatsNew +224 -0
  46. data/sge/sge.h +31 -0
  47. data/sge/sge_blib.cpp +1939 -0
  48. data/sge/sge_blib.h +68 -0
  49. data/sge/sge_bm_text.cpp +451 -0
  50. data/sge/sge_bm_text.h +71 -0
  51. data/sge/sge_collision.cpp +388 -0
  52. data/sge/sge_collision.h +54 -0
  53. data/sge/sge_config.h +6 -0
  54. data/sge/sge_internal.h +152 -0
  55. data/sge/sge_misc.cpp +92 -0
  56. data/sge/sge_misc.h +37 -0
  57. data/sge/sge_primitives.cpp +2516 -0
  58. data/sge/sge_primitives.h +111 -0
  59. data/sge/sge_rotation.cpp +683 -0
  60. data/sge/sge_rotation.h +46 -0
  61. data/sge/sge_shape.cpp +762 -0
  62. data/sge/sge_shape.h +365 -0
  63. data/sge/sge_surface.cpp +1090 -0
  64. data/sge/sge_surface.h +100 -0
  65. data/sge/sge_textpp.cpp +785 -0
  66. data/sge/sge_textpp.h +270 -0
  67. data/sge/sge_tt_text.cpp +1456 -0
  68. data/sge/sge_tt_text.h +114 -0
  69. data/utils/buildtest.sh +29 -0
  70. data/win32/README.en.win32 +72 -0
  71. data/win32/README.ja.win32 +80 -0
  72. data/win32/install_rubysdl.rb +30 -0
  73. data/win32/mkpkg.sh +72 -0
  74. metadata +136 -113
  75. data/rubysdl_ref.en.html +0 -5879
  76. data/rubysdl_ref.en.rd +0 -6601
  77. data/rubysdl_ref.html +0 -6194
  78. data/rubysdl_ref.rd +0 -6950
data/NEWS.en CHANGED
@@ -1,3 +1,11 @@
1
+ version 2.1.3
2
+ Fix following methods
3
+ * SDL::TTF#draw*
4
+ Update documents
5
+ Fix compilation problem on FreeBSD(Thanks Rusmir Dusko)
6
+ Fix codes about multi-thread
7
+ Bundle SGE(Please do not use this bundled SGE if you have other way to use SGE)
8
+
1
9
  version 2.1.2
2
10
  Improbe the handling of strings
3
11
  Fix following methods
data/NEWS.ja CHANGED
@@ -1,3 +1,11 @@
1
+ version 2.1.3
2
+ $B0J2<$N%a%=%C%I$N%P%0$r=$@5(B
3
+ * SDL::TTF#draw*
4
+ $B%I%-%e%a%s%H$N=$@5(B
5
+ FreeBSD$B$G%3%s%Q%$%k;~$K%(%i!<$,@8$8$kLdBj$r=$@5(B(Thanks Rusmir Dusko)
6
+ $B%9%l%C%I$^$o$j$N5sF0$r=$@5(B
7
+ SGE $B$r%P%s%I%k(B($B$G$-$k8B$j;H$o$J$$$G$/$@$5$$(B)
8
+
1
9
  version 2.1.2
2
10
  Ruby$B$NJ8;zNs$H(BC$B$NJ8;zNs$NJQ49$r87L)$K$9$k$h$&$K$7$?(B
3
11
  $B0J2<$N%a%=%C%I$N%P%0$r=$@5(B
data/README.en CHANGED
@@ -1,21 +1,21 @@
1
1
 
2
- Ruby/SDL 2.1.2
2
+ Ruby/SDL 2.1.3
3
3
  Ohbayashi Ippei
4
4
 
5
- 1 What's Ruby/SDL
5
+ = What's Ruby/SDL
6
6
 
7
7
  Ruby/SDL is the ruby extension library to use SDL.
8
8
  SDL(Simple DirectMedia Layer) is a cross-platform multimedia library
9
9
  designed to provide fast access to the graphics framebuffer and audio
10
10
  devices. See http://www.libsdl.org/ if you want to know SDL in detail.
11
11
 
12
- 2 Platform
12
+ = Platform
13
13
  This library supports Linux, Win32, MacOS X.
14
14
 
15
15
  This library perhaps works on FreeBSD and other standard
16
16
  Unix-like systems.
17
17
 
18
- 3 Library Needed
18
+ = Library Needed
19
19
 
20
20
  Ruby/SDL needs Ruby and SDL and optionally uses SDL_image, SDL_mixer,
21
21
  SDL_ttf, SGE, OpenGL and SMPEG.
@@ -32,7 +32,7 @@ SGE http://www.etek.chalmers.se/~e8cal1/sge/
32
32
  SMPEG http://www.icculus.org/smpeg/
33
33
  SDLSKK http://www.kmc.gr.jp/~ohai/sdlskk.en.html
34
34
 
35
- 4 INSTALL
35
+ = INSTALL
36
36
 
37
37
  Some packages are available: Debian's .deb, FreeBSD's ports,
38
38
  or Windows' zipfile.
@@ -46,10 +46,7 @@ You can install from source code as follows:
46
46
  See Ruby's document and install.
47
47
 
48
48
  (2)install SDL
49
- Extract SDL's source and run './configure' with '--disable-pthreads'
50
- option.
51
- On Linux using pthread with Ruby/SDL makes a problem.
52
- You can avoid this problem by other way (Please see rubysdl_doc.en.rd).
49
+ Extract SDL's source and run './configure'.
53
50
  And run 'make','make install'.
54
51
 
55
52
  (3)install SGE
@@ -66,7 +63,16 @@ You can install from source code as follows:
66
63
  rsdl is a wrapper of the Ruby interpreter. This wrapper
67
64
  prepares Cocoa framework before running the interpreter.
68
65
 
69
- 5 USE Ruby/SDL
66
+ = Use SGE without installing the library
67
+ You can use SGE without intalling:
68
+ gem install rubysdl -- --enable-imported-sge
69
+ or
70
+ ruby extconf.rb --enable-imported-sge
71
+
72
+ However, please do not use this option if you have
73
+ other way. Please install SGE separately if possible.
74
+
75
+ = USE Ruby/SDL
70
76
  Write "require 'sdl'" in your Ruby script.
71
77
  If your system is OS X, you must use rsdl command
72
78
  as an interpreter instead of ruby command.
@@ -85,7 +91,7 @@ You can install from source code as follows:
85
91
  Please read this when you want to know what does't describe
86
92
  these documents.
87
93
 
88
- 6 OpenGL
94
+ = OpenGL
89
95
  You can use OpenGL with this library.
90
96
 
91
97
  (1) Setup OpenGL and SDL.
@@ -96,13 +102,13 @@ You can install from source code as follows:
96
102
  We use OpenGL through ruby-opengl.
97
103
  Please see SDL's document,OpenGL document and sample/testgl.rb .
98
104
 
99
- 7 LICENSE
105
+ = LICENSE
100
106
  This library is distributed under GNU LGPL version 2.1 or later,
101
107
  which can be found in the file "LICENSE".
102
108
  But samples, the Ruby scripts sample/*.rb, are not under LGPL, and
103
109
  you can use their files freely.
104
110
 
105
- 8 Thanks
111
+ = Thanks
106
112
  Thanks to ...
107
113
  Tamura : some patches and advertising
108
114
  Akinori MUSHA : Porting on FreeBSD
@@ -117,12 +123,13 @@ You can install from source code as follows:
117
123
  Hara Yutaka: Sample TrueTypeFont, MacOS X support
118
124
  Members of #sdl-fan-jp @ FriendChat: bug reports and advices
119
125
  Cyross Makoto: Windows support
126
+ Dwayne C. Litzenberger: Some patches
120
127
 
121
- 9 OTHER
128
+ = OTHER
122
129
  Some functions, especially SDL::MPEG methods and pallete handling methods,
123
130
  are not tested.
124
131
 
125
- 10 AUTHORS
132
+ = AUTHORS
126
133
  Ippei Obayashi: main developer
127
134
  Cyross Makoto: Windows suppport
128
135
  yhara: MacOS X support
data/README.ja CHANGED
@@ -1,20 +1,20 @@
1
1
 
2
- Ruby/SDL 2.1.2
2
+ Ruby/SDL 2.1.3
3
3
  ���Ӱ�ʿ
4
4
 
5
- 1 ����
5
+ = ����
6
6
 
7
7
  ����ϡ�Ruby����SDL�ε�ǽ��Ȥ�����γ�ĥ�饤�֥��Ǥ���
8
8
  SDL�Ȥϡ�Win32,Linux,BeOS,MacOS,FreeBSD,Solaris����ư�����������ץ�åȥե�����ʥ����೫ȯ�ѥ饤�֥��Ǥ���
9
9
 
10
- 2 ư��Ķ�
10
+ = ư��Ķ�
11
11
  Linux��X�塢Win32
12
12
  �ޤ���FreeBSD��ư���ǧ���졢Ports�����줿�����Ǥ���
13
13
  BeOS��Ǥ�ư�������Ǥ���
14
14
  MacOSX�Ǥ�ư���������Ǥ���������Ruby�˼�������ɬ�פ�����褦�Ǥ���
15
15
  ����ʳ��Ǥϳ�ǧ���Ƥ��ޤ���
16
16
 
17
- 3 ɬ�פʥ饤�֥��
17
+ = ɬ�פʥ饤�֥��
18
18
 
19
19
  ���Υ饤�֥��ϡ�ruby�ν����Ϥ�¾���ʲ��Υ饤�֥���ɬ�פȤ��ޤ���
20
20
  SDL_mixer,SDL_ttf,SDL_image,SGE,smpeg,SDLSKK�Ϥʤ��Ƥ⤫�ޤ��ޤ���
@@ -32,26 +32,20 @@ SDLSKK(
32
32
  �ޤ���SDL_kanji�����Ѥ��Ƥ��ޤ���������ϥ��������֤˴ޤ�Ƥ���Τ�
33
33
  �̤��Ѱդ���ɬ�פϤ���ޤ���
34
34
 
35
- 4 ���󥹥ȡ���
35
+ = ���󥹥ȡ���
36
36
  Linux��ǤΥ��󥹥ȡ�����������ޤ���Unix�Ϥ�OS�ʤ�ɤ�Ǥ�Ʊ���褦
37
37
  �ˤǤ���Ȼפ��ޤ���
38
38
  Debian��Vine������¾�͡��ʥǥ����ȥ�ӥ塼�����ˤ�Ruby/SDL�Υѥå�����
39
39
  ������ΤǤ�������Ѥ��Ƥ�褤�Ǥ��礦��
40
40
  Windows��Ǥ��̤��Ѱդ��Ƥ���Х��ʥ����Ѥ����ۤ����ڤǤ��礦��
41
41
  FreeBSD�ˤ�Port������ΤǤ�������Ѥ��Ƥ���������
42
- ��Ԥ�Windows�δĶ��Ǥϡ�extconf.rb����Ѥ���Makefile���ǽ񤤤�
43
- ����ѥ��뤷�Ƥ����ꤷ�ޤ���
44
42
 
45
43
  (1)ruby�Υ��󥹥ȡ���
46
44
  ruby�Υɥ���������˽��äƥ��󥹥ȡ��뤷�Ƥ���������
47
45
 
48
46
  (2)SDL�Υ��󥹥ȡ���
49
47
  ��������Ÿ�����ƥ���ѥ��뤹����ϡ��ʲ����̤�ˤ��Ƥ���������
50
- ./configure --disable-pthreads
51
- (������--disable-pthreads���ץ�����Ĥ��ʤ��Ȥ��ޤ�ư���ޤ���)
52
- (���Υ��ץ�����Ĥ��Ƥ⡢SDL������ǽ�Ȥ���褦�Ǥ�)
53
- (Linux�ʳ��Ǥ�ɬ�פ���ޤ���)
54
- (rubysdl_doc.rd�κǸ��--disable-pthreads���դ��ʤ��Ȥ��ɤ���ˡ��񤤤Ƥ���ޤ�)
48
+ ./configure
55
49
  make
56
50
  make install
57
51
 
@@ -70,8 +64,24 @@ FreeBSD
70
64
 
71
65
  (6) (MacOS X�Τ�) rsdl �Υ��󥹥ȡ���
72
66
  gem install rsdl �� rsdl �򥤥󥹥ȡ��뤷�Ƥ���������
73
-
74
- 5 �Ȥ���
67
+
68
+ = Gem�ˤ�륤�󥹥ȡ���
69
+
70
+ gem �Ǥ⥤�󥹥ȡ���Ǥ��ޤ���
71
+ gem install rubysdl
72
+ �Ǥ���
73
+
74
+ = SGE�򥤥󥹥ȡ��뤻���˻Ȥ�
75
+ Ruby/SDL�������� SGE ����äƤ��ޤ���
76
+ gem install rubysdl -- --enable-imported-sge
77
+ �⤷����
78
+ ruby extconf.rb --enable-imported-sge
79
+ �ǻȤ��ޤ���
80
+
81
+ �����������λ��ȤߤϤǤ���лȤ�ʤ��Ǥ���������
82
+ SGE���̤˥��󥹥ȡ����ǽ�ʤ餽�����ȤäƤ���������
83
+
84
+ = �Ȥ���
75
85
  require 'sdl'�ǻȤ��ޤ���
76
86
  MacOS X�ξ��Τߡ� ruby ���ޥ�ɤǤʤ� rsdl ���ޥ�ɤ�
77
87
  ���󥿥ץ꥿��ư���Ƥ���������
@@ -114,7 +124,7 @@ FreeBSD
114
124
  *.rsd
115
125
  ��ե���󥹥ޥ˥奢��θ��ǡ����Ǥ���
116
126
 
117
- 6 OpenGL�ˤĤ���
127
+ = OpenGL�ˤĤ���
118
128
  ���Υ饤�֥��ˤ�ä�OpenGL�ؤΥ�����������ǽ�ˤʤ�ޤ���
119
129
 
120
130
  (1) SDL����OpenGL��Ȥ���褦�����ꤹ�롣
@@ -127,13 +137,13 @@ FreeBSD
127
137
  ����λȤ������ϡ�SDL�Υɥ�����ȡ�OpenGL�Υɥ�����ȡ�
128
138
  ����� sample/testgl.rb �򸫤�Ĵ�٤Ƥ���������
129
139
 
130
- 7 �饤����
140
+ = �饤����
131
141
  GNU LGPL(GNU Lesser General Public License) version 2.1 �ʹߤ˽����ޤ���
132
142
  �ܤ�����LICENSE�򸫤Ƥ���������
133
143
  ��������sample/ �ʲ��ˤ��륵��ץ�ץ������Ϥ���ˤϽ��鷺��
134
144
  ��ͳ�����Ѥ��Ƥ褤�Ǥ���
135
145
 
136
- 8 �ռ�
146
+ = �ռ�
137
147
  �ʲ��ο�ã�˴��դ��ޤ���
138
148
  * FreeBSD�Ǥ�ư���ǧ�򤷡�Ports���äƤ���������Akinori MUSHA����
139
149
  * ���ޤ��ޤʰո������äƤ������ꡢ�����Ĥ�Υѥå������äƤ������ä���
@@ -146,17 +156,18 @@ FreeBSD
146
156
  Keffin Barnaby����
147
157
  * ����ץ���󶡤��Ƥ������ä� Simon Strandgaard ����
148
158
  * ͭ�Ѥʾ��󡢥Х���ݡ��Ȥ򤯤����ä� Rorien Dunn����Dennis Ranke����
149
- Keita Urashima����
159
+ Keita Urashima, Dwayne C. Litzenberger ����
150
160
  * SDL��¸�ߤ򶵤��Ƥ��졢Ruby/SDL���뤭�ä�����Ϳ���Ƥ��줿��Ȫ����
151
161
  * SDLdoc ���ܸ������ץ��������Ȥˤ�����ä��ߤʤ���
152
162
  * ����ץ��ѤΥե���Ȥ��󶡤��Ƥ��줿������
153
163
  * #sdl-fan-jp@friend chat �Τߤʤ���
154
164
  * Windows�Ǥδ����򤷤Ƥ������륵����������
155
- 9 ����¾
165
+
166
+ = ����¾
156
167
  �ޤ��ƥ��Ȥ���Ƥ��ʤ���ǽ��¿������ޤ�(�ѥ�åȴ�Ϣ
157
168
  ��MPEG��Ϣ�Υ᥽�åɤ����Ĥ��ʤ�)��
158
169
 
159
- 10. ���
170
+ = ���
160
171
  ���Ӱ�ʿ: ��������
161
172
  ����������: Windows���ݡ���
162
173
  yhara: MacOS X���ݡ���
data/depend CHANGED
@@ -16,3 +16,5 @@ rubysdl_smpeg.o: rubysdl_smpeg.c rubysdl.h
16
16
  rubysdl_sdlskk.o: rubysdl_sdlskk.c rubysdl.h
17
17
  rubysdl_kanji.o: rubysdl_kanji.c rubysdl.h SDL_kanji.h
18
18
  SDL_kanji.o: SDL_kanji.c SDL_kanji.h
19
+
20
+ CLEANOBJS += sge/*.o
@@ -458,6 +458,9 @@ continue executing while waiting for an event.
458
458
  In Ruby 1.8 and below, there is no way to release the GVL, so all Ruby threads
459
459
  suspend execution until this method finishes.
460
460
 
461
+ This method may return nil when Ruby/SDL encounters an unknown type of event.
462
+ You should treat this case.
463
+
461
464
  SEEALSO
462
465
  Event.poll
463
466
 
@@ -43,4 +43,4 @@ platforms have shorter clock ticks but this is the most
43
43
  common.
44
44
 
45
45
  Ruby's threads cannot preempt while waiting with this method.
46
- You can use Kernel#sleep instead.
46
+ You should use Kernel#sleep instead.
@@ -2342,8 +2342,8 @@ LOCK
2342
2342
  PURPOSE Draw a line
2343
2343
 
2344
2344
  PROTO
2345
- draw_line(x1,x2,y1,y2,color, aa=false, alpha=nil)
2346
- drawLine(x1,x2,y1,y2,color, aa=false, alpha=nil)
2345
+ draw_line(x1,y1,x2,y2,color, aa=false, alpha=nil)
2346
+ drawLine(x1,y1,x2,y2,color, aa=false, alpha=nil)
2347
2347
 
2348
2348
  DESC
2349
2349
  Draws a $[color] line from ($[x1], $[y1]) to ($[x2], $[y2]).
@@ -2364,8 +2364,8 @@ LOCK
2364
2364
  PURPOSE Draw an antialiased line
2365
2365
 
2366
2366
  PROTO
2367
- draw_aa_line(x1,x2,y1,y2,color)
2368
- drawAALine(x1,x2,y1,y2,color)
2367
+ draw_aa_line(x1,y1,x2,y2,color)
2368
+ drawAALine(x1,y1,x2,y2,color)
2369
2369
 
2370
2370
  OBSOLETE Surface#draw_line
2371
2371
  DESC
@@ -2384,8 +2384,8 @@ PURPOSE Draw a blended line
2384
2384
  OBSOLETE Surface#draw_line
2385
2385
 
2386
2386
  PROTO
2387
- draw_line_alpha(x1,x2,y1,y2,color,alpha)
2388
- drawLineAlpha(x1,x2,y1,y2,color,alpha)
2387
+ draw_line_alpha(x1,y1,x2,y2,color,alpha)
2388
+ drawLineAlpha(x1,y1,x2,y2,color,alpha)
2389
2389
 
2390
2390
  DESC
2391
2391
  Draws a $[color] line from ($[x1], $[y1]) to ($[x2], $[y2])
@@ -2404,8 +2404,8 @@ PURPOSE Draw an antialiased line with blending.
2404
2404
  OBSOLETE Surface#draw_line
2405
2405
 
2406
2406
  PROTO
2407
- draw_aa_line_alpha(x1,x2,y1,y2,color,alpha)
2408
- drawAALineAlpha(x1,x2,y1,y2,color,alpha)
2407
+ draw_aa_line_alpha(x1,y1,x2,y2,color,alpha)
2408
+ drawAALineAlpha(x1,y1,x2,y2,color,alpha)
2409
2409
 
2410
2410
  DESC
2411
2411
  Draws a antialiased $[color] line from
data/doc.txt ADDED
@@ -0,0 +1,32 @@
1
+ module SDL
2
+ init
3
+
4
+ blitSurface
5
+
6
+ class Surface
7
+ loadBMP
8
+ displayFormat
9
+ setColorKey
10
+ fillRect
11
+ class Screen
12
+ setVideoMode
13
+ updateRect
14
+
15
+
16
+ �������ʤ�method���ƤФ줿�Ȥ����㳰��ȯ�������롣
17
+ class Event
18
+ new
19
+ pollEvent
20
+ type
21
+
22
+ scancode
23
+ keysym
24
+ mod
25
+
26
+ gain?
27
+ state
28
+
29
+
30
+
31
+
32
+
@@ -447,6 +447,11 @@ Ruby 1.8
447
447
  Ruby 1.9�Ǥϥ��٥�Ȥ��ԤäƤ���֤�¾��Ruby�Υ���å�
448
448
  ���ڤ��ؤ�뤳�Ȥ���ǽ�Ǥ���
449
449
 
450
+
451
+ Ruby/SDL ���б����Ƥ��ʤ����٥�Ȥ����������ʤɡ�
452
+ ���Υ᥽�åɤ� nil ���֤���礬����ޤ���
453
+ ��� Event ���֥������Ȥ��֤����Ȥ�������Ϥ��ʤ��Ǥ���������
454
+
450
455
  SEEALSO
451
456
  Event.poll
452
457
 
@@ -0,0 +1,160 @@
1
+ = OpenGL��Ϣ
2
+ * ((<OpenGL ��Ϣ��ǽ����>))
3
+
4
+ * OpenGL��Ϣ�᥽�å�
5
+ TOC
6
+
7
+ == OpenGL ��Ϣ��ǽ����
8
+ Ruby/SDL �ϡ������Ĥ��Υץ�åȥե�����(Linux/X11,
9
+ Win32, MacOS X, etc)�ˤ����ơ�
10
+ OpenGL ����ƥ����Ȥ��������Ȥ����Ȥ��Ǥ��ޤ���
11
+ ����ˤ�ꡢOpenGL��Ʊ����
12
+ Ruby/SDL�Υ����ǥ��������٥�Ƚ�����
13
+ �����ޡ���Ȥ����Ȥ��Ǥ��ޤ���
14
+
15
+ Ruby/SDL ���Τ�Τ� OpenGL �ѤΥ᥽�åɤ���äƤ��ޤ���
16
+ ((<ruby-opengl|URL:http://ruby-opengl.rubyforge.org/>)),
17
+ ((<riko|URL:http://www.kumaryu.net/?(Ruby)+Riko>))
18
+ �ʤɤ����Ѥ��Ƥ���������
19
+
20
+ === �����
21
+ OpenGL ��Ȥ������ Ruby/SDL�ν�����ϡ�
22
+ ���̤� Ruby/SDL ����������Τ�
23
+ �礭�ʰ㤤�Ϥ���ޤ���3 �Ĥΰ㤤������ޤ���
24
+ @[Screen.open]��SDL::OPENGL���Ϥ�ɬ�פ����ꡢ
25
+ @[GL.set_attr]��Ȥä�
26
+ �����Ĥ��� GL °��(�ǥץ��Хåե��Υ�������
27
+ �ե졼��Хåե��Υ�����)����ꤹ��ɬ�פ����ꡢ
28
+ �����ƺǸ�˥��֥�Хåե���Ȥ������ʤ�
29
+ @[Screen.open]��SDL::DOUBLEBUF
30
+ �ե饰���Ϥ����Ȥˤ�ä�((*�ǤϤʤ�*))��
31
+ GL ���ȥ�ӥ塼�ȤȤ��ƻ��ꤹ��ɬ�פ�����ޤ���
32
+
33
+ EXAMPLE
34
+ # �ޤ����ӥǥ����֥����ƥ������
35
+ SDL.init(SDL::INIT_VIDEO)
36
+ # �����Ĥ��Υӥǥ���������
37
+ info = SDL::Screen.info
38
+ # ���̤�640x480�˥��å�
39
+ width = 640;
40
+ height = 480;
41
+ # ���̤����׵ᤷ�Ƥ����ԥ����뿼�٤������
42
+ bpp = info.bpp
43
+ # �����ǡ�OpenGL ������ɥ��Τ����
44
+ # �׵ᤵ�줿������ɥ�°�������ꤷ������
45
+ # RGB �ƥ����ͥ�� *���ʤ��Ȥ�* 5 �ӥå��ߤ�����
46
+ # �ޤ������ʤ��Ȥ� 16 �ӥåȤΥǥץ��Хåե����ߤ�����
47
+ #
48
+ # �Ǹ�ˤ�����ϥ��֥�Хåե�������ɥ����׵�Ǥ��롣
49
+ # '1' �ǥ��֥�Хåե���ͭ���ˤʤꡢ
50
+ # '0' ��̵���ˤʤ롣
51
+ #
52
+ # SDL::Screen.open �ؤΥե饰�ˤ�����
53
+ # SDL::DOUBLEBUF ��Ȥ�ʤ��������ա�
54
+ # ����� GL ���ȥ�ӥ塼�Ȥ˱ƶ�������
55
+ # ɸ��� 2D blit ž������������˱ƶ����롣
56
+ SDL::GL.set_attr(SDL::GL::RED_SIZE, 5)
57
+ SDL::GL.set_attr(SDL::GL::GREEN_SIZE, 5)
58
+ SDL::GL.set_attr(SDL::GL::BLUE_SIZE, 5)
59
+ SDL::GL.set_attr(SDL::GL::DEPTH_SIZE, 16)
60
+ SDL::GL.set_attr(SDL::GL::DOUBLEBUFFER, 1)
61
+
62
+ # SDL ���ե륹���꡼��ӥǥ��⡼�ɤˤ�����
63
+ # OpenGL ������ɥ����󶡤��Ƥ����褦�׵ᤷ������
64
+ flags = SDL:;OPENGL | SDL::FULLSCREEN
65
+
66
+ # �ӥǥ��⡼�ɤ����ꡣ
67
+ SDL::Screen.open(width, height, bpp, flags)
68
+
69
+ === GL°��
70
+ @[GL.get_attr] �� @[GL.set_attr] �Ǥϰʲ���°��������
71
+ �Ǥ��ޤ���
72
+ * SDL::GL::RED_SIZE �ե졼��Хåե����֥����ͥ�Υ�����(�ӥåȿ�)
73
+ * SDL::GL::GREEN_SIZE �ե졼��Хåե����Х����ͥ�Υ�����(�ӥåȿ�)
74
+ * SDL::GL::BLUE_SIZE �ե졼��Хåե����ĥ����ͥ�Υ�����(�ӥåȿ�)
75
+ * SDL::GL::ALPHA_SIZE �ե졼��Хåե��Φ������ͥ�Υ�����(�ӥåȿ�)
76
+ * SDL::GL::DOUBLEBUFFER 0 �ޤ��� 1 ���ͤ��ꡢ���֥�Хåե���ͭ���ޤ���̵���ˤ��롣
77
+ * SDL::GL::BUFFER_SIZE �ե졼��Хåե��Υ�����(�ӥåȿ�)
78
+ * SDL::GL::DEPTH_SIZE �ǥץ��Хåե��Υ�����(�ӥåȿ�)
79
+ * SDL::GL::STENCIL_SIZE ���ƥ󥷥�Хåե��Υ�����(�ӥåȿ�)
80
+ * SDL::GL::ACCUM_RED_SIZE �������졼�����Хåե����֥����ͥ�Υ�����(�ӥåȿ�)
81
+ * SDL::GL::ACCUM_GREEN_SIZE �������졼�����Хåե����Х����ͥ�Υ�����(�ӥåȿ�)
82
+ * SDL::GL::ACCUM_BLUE_SIZE �������졼�����Хåե����ĥ����ͥ�Υ�����(�ӥåȿ�)
83
+ * SDL::GL::ACCUM_ALPHA_SIZE �������졼�����Хåե��Φ������ͥ�Υ�����(�ӥåȿ�)
84
+
85
+ === ����
86
+ ����ϴ���Ū�� OpenGL ��API�����Τޤ޻Ȥ��ޤ���
87
+ �����������֥�Хåե����̤�Ȥ��Ȥ��ϡ�
88
+ �Хåե���򴹤����̤򹹿����뤿���
89
+ @[GL.swap_buffers]��Ȥ�ɬ�פ�����ޤ���
90
+ OpenGL �ǥ��֥�Хåե����׵᤹�뤿��ˤϡ�
91
+ @[GL.set_attr](SDL::GL::DOUBLEBUFFER, 1)
92
+ �Ȥ���ɬ�פ����ꡢ�ºݤ�����줿���ɤ������ǧ���뤿���
93
+ @[GL.get_attr](SDL::GL::DOUBLEBUFFER)
94
+ �Ȥ��ޤ���
95
+
96
+ == Methods
97
+ %%%
98
+ NAME get_attr
99
+ MOD GL
100
+ TYPE .
101
+ PURPOSE �ü�� SDL/OpenGL °�����ͤ�������ޤ���
102
+ RVAL Integer
103
+
104
+ PROTO
105
+ get_attr(attr)
106
+ getAttr(attr)
107
+
108
+ DESC
109
+ ((<OpenGL°��|GL°��>)) attr ���ͤ��֤��ޤ���
110
+ ����ϡ�@[Screen#open]�θƤӽФ��θ�ˡ����ʤ��λ��ꤷ��
111
+ °���������̤�˥��åȤ��줿���ɤ���������å�����Τ�ͭ��
112
+ �Ǥ���
113
+
114
+ EXCEPTION *
115
+ SEEALSO
116
+ GL.set_attr
117
+
118
+ %%
119
+ NAME set_attr
120
+ MOD GL
121
+ TYPE .
122
+ PURPOSE �ü�� SDL/OpenGL °���򥻥åȤ��ޤ���
123
+
124
+ PROTO
125
+ set_attr(attr, val)
126
+ setAttr(attr, val)
127
+
128
+ DESC
129
+ OpenGL��((<°��|GL°��>)) attr �� val �˥��åȤ��ޤ���
130
+ ���åȤ���°���ϡ�@[Screen.open]
131
+ �θƤӽФ��ޤǤ�ͭ���ˤʤ�ޤ���
132
+ @[Screen.open]�θƤӽФ��θ�ϡ�@[GL.get_attr]
133
+ ��Ȥä��ͤ�����å����٤��Ǥ���
134
+
135
+ EXCEPTION *
136
+ NOTES
137
+ OpenGL �ӥǥ��⡼�ɤ򥻥åȤ������
138
+ ���֥�Хåե���ͭ���ˤ��뤿��ˤ�
139
+ SDL;;DOUBLEBUF ��ɬ�פǤϤ���ޤ���
140
+ ���֥�Хåե��� SDL::GL::DOUBLEBUFFER °����Ȥ����Ȥ�
141
+ ͭ���ޤ���̵���ˤʤ�ޤ���
142
+
143
+ SEEALSO
144
+ GL.get_attr
145
+
146
+ %%
147
+ NAME swap_buffers
148
+ MOD GL
149
+ TYPE .
150
+ PURPOSE OpenGL �Υե졼��Хåե��������ؤ��ޤ�/ɽ���򹹿����ޤ���
151
+ PROTO
152
+ swap_buffers()
153
+ swapBuffers()
154
+
155
+ DESC
156
+ ���֥�Хåե������ݡ��Ȥ���Ƥ������ OpenGL �ΥХåե��������ؤ��ޤ���
157
+
158
+ SEEALSO
159
+ GL.set_attr
160
+ GL::Screen.open