opengl 0.7.0.pre1-x86-mingw32 → 0.7.0.pre2-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. data/.autotest +29 -0
  2. data/.gitignore +5 -8
  3. data/History.rdoc +33 -0
  4. data/Manifest.txt +72 -57
  5. data/README.rdoc +72 -25
  6. data/Rakefile +60 -72
  7. data/Rakefile.cross +5 -2
  8. data/{doc → docs}/build_install.txt +0 -0
  9. data/{doc → docs}/extensions.txt.in +0 -0
  10. data/{doc → docs}/history.txt +0 -0
  11. data/{doc → docs}/requirements_and_design.txt +0 -0
  12. data/{doc → docs}/roadmap.txt +0 -0
  13. data/{doc → docs}/scientific_use.txt +0 -0
  14. data/{doc → docs}/supplies/page_template.html +0 -0
  15. data/{doc → docs}/thanks.txt +0 -0
  16. data/{doc → docs}/tutorial.txt +0 -0
  17. data/examples/NeHe/NeHe.png +0 -0
  18. data/examples/NeHe/crate.png +0 -0
  19. data/examples/NeHe/glass.png +0 -0
  20. data/examples/NeHe/nehe_lesson02.rb +82 -83
  21. data/examples/NeHe/nehe_lesson03.rb +88 -88
  22. data/examples/NeHe/nehe_lesson04.rb +93 -96
  23. data/examples/NeHe/nehe_lesson05.rb +137 -144
  24. data/examples/NeHe/nehe_lesson06.rb +183 -0
  25. data/examples/NeHe/nehe_lesson07.rb +237 -0
  26. data/examples/NeHe/nehe_lesson08.rb +252 -0
  27. data/examples/NeHe/nehe_lesson09.rb +199 -0
  28. data/examples/NeHe/nehe_lesson11.rb +173 -0
  29. data/examples/NeHe/nehe_lesson12.rb +200 -0
  30. data/examples/NeHe/nehe_lesson16.rb +208 -0
  31. data/examples/NeHe/nehe_lesson19.rb +206 -0
  32. data/examples/NeHe/particle.png +0 -0
  33. data/examples/NeHe/star.png +0 -0
  34. data/examples/NeHe/tim.png +0 -0
  35. data/examples/RedBook/light.rb +154 -0
  36. data/examples/misc/OGLBench.rb +2 -2
  37. data/examples/misc/trislam.rb +2 -2
  38. data/ext/{common → opengl}/common.h +2 -11
  39. data/ext/{common → opengl}/conv.h +43 -31
  40. data/ext/{glut → opengl}/extconf.rb +14 -7
  41. data/ext/{common → opengl}/funcdef.h +155 -125
  42. data/ext/{gl → opengl}/gl-1.0-1.1.c +426 -162
  43. data/ext/{gl → opengl}/gl-1.2.c +70 -66
  44. data/ext/{gl → opengl}/gl-1.3.c +19 -19
  45. data/ext/{gl → opengl}/gl-1.4.c +23 -23
  46. data/ext/{gl → opengl}/gl-1.5.c +46 -47
  47. data/ext/{gl → opengl}/gl-2.0.c +66 -60
  48. data/ext/{gl → opengl}/gl-2.1.c +4 -4
  49. data/ext/{gl → opengl}/gl-enums.c +2 -1
  50. data/ext/{common → opengl}/gl-enums.h +0 -0
  51. data/ext/{gl → opengl}/gl-error.c +12 -4
  52. data/ext/{common → opengl}/gl-error.h +7 -2
  53. data/ext/{gl → opengl}/gl-ext-3dfx.c +1 -1
  54. data/ext/{gl → opengl}/gl-ext-arb.c +75 -70
  55. data/ext/{gl → opengl}/gl-ext-ati.c +3 -3
  56. data/ext/{gl → opengl}/gl-ext-ext.c +54 -54
  57. data/ext/{gl → opengl}/gl-ext-gremedy.c +3 -3
  58. data/ext/{gl → opengl}/gl-ext-nv.c +49 -48
  59. data/ext/{common → opengl}/gl-types.h +0 -0
  60. data/ext/{gl → opengl}/gl.c +8 -10
  61. data/ext/{glu → opengl}/glu-enums.c +1 -1
  62. data/ext/{common → opengl}/glu-enums.h +0 -0
  63. data/ext/{glu → opengl}/glu.c +7 -3
  64. data/ext/{glut → opengl}/glut.c +98 -48
  65. data/ext/opengl/opengl.c +11 -0
  66. data/lib/gl.rb +1 -0
  67. data/lib/glu.rb +1 -0
  68. data/lib/glut.rb +1 -0
  69. data/lib/opengl.rb +13 -14
  70. data/lib/opengl/opengl.so +0 -0
  71. data/lib/opengl/test_case.rb +87 -0
  72. data/test/{tc_misc.rb → test_gl.rb} +2 -14
  73. data/test/test_gl_10_11.rb +1363 -0
  74. data/test/test_gl_12.rb +182 -0
  75. data/test/{tc_func_13.rb → test_gl_13.rb} +14 -14
  76. data/test/test_gl_14.rb +221 -0
  77. data/test/test_gl_15.rb +260 -0
  78. data/test/test_gl_20.rb +430 -0
  79. data/test/test_gl_21.rb +553 -0
  80. data/test/test_gl_ext_arb.rb +526 -0
  81. data/test/{tc_ext_ati.rb → test_gl_ext_ati.rb} +11 -14
  82. data/test/test_gl_ext_ext.rb +608 -0
  83. data/test/{tc_ext_gremedy.rb → test_gl_ext_gremedy.rb} +6 -6
  84. data/test/test_gl_ext_nv.rb +352 -0
  85. data/test/test_glu.rb +309 -0
  86. metadata +159 -102
  87. data/History.txt +0 -36
  88. data/ext/gl/extconf.rb +0 -43
  89. data/ext/glu/extconf.rb +0 -51
  90. data/test/README +0 -10
  91. data/test/tc_common.rb +0 -98
  92. data/test/tc_ext_arb.rb +0 -467
  93. data/test/tc_ext_ext.rb +0 -551
  94. data/test/tc_ext_nv.rb +0 -357
  95. data/test/tc_func_10_11.rb +0 -1281
  96. data/test/tc_func_12.rb +0 -186
  97. data/test/tc_func_14.rb +0 -197
  98. data/test/tc_func_15.rb +0 -270
  99. data/test/tc_func_20.rb +0 -346
  100. data/test/tc_func_21.rb +0 -541
  101. data/test/tc_glu.rb +0 -310
  102. data/test/tc_include_gl.rb +0 -35
  103. data/test/tc_require_gl.rb +0 -34
File without changes
@@ -15,9 +15,7 @@
15
15
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16
16
  */
17
17
 
18
- #include "../common/common.h"
19
-
20
- static const char *VERSION = "0.7.0.pre1";
18
+ #include "common.h"
21
19
 
22
20
  static VALUE module;
23
21
 
@@ -48,7 +46,7 @@ const int *GetOpenglVersion(void)
48
46
  {
49
47
  if (opengl_version[0]==0) { /* not cached, query */
50
48
  const char *vstr = (const char *) glGetString(GL_VERSION);
51
- CHECK_GLERROR
49
+ CHECK_GLERROR_FROM("glGetString");
52
50
  if (vstr)
53
51
  sscanf( vstr, "%d.%d", &opengl_version[0], &opengl_version[1] );
54
52
  }
@@ -78,7 +76,7 @@ const char *GetOpenglExtensions(void)
78
76
  {
79
77
  if (opengl_extensions == NULL) {
80
78
  const char *estr = (const char *) glGetString(GL_EXTENSIONS);
81
- CHECK_GLERROR
79
+ CHECK_GLERROR_FROM("glGetString");
82
80
  if (estr) {
83
81
  long len = strlen(estr);
84
82
  opengl_extensions = ALLOC_N(GLchar,len+1+1); /* terminating null and added space */
@@ -146,7 +144,7 @@ VALUE obj,arg1;
146
144
  VALUE s;
147
145
  GLboolean res;
148
146
 
149
- s = rb_funcall(arg1, rb_intern("to_s"),0);
147
+ s = rb_funcall(arg1, rb_intern("to_s"), 0);
150
148
  name = RSTRING_PTR(s);
151
149
 
152
150
  res = CheckVersionExtension(name);
@@ -178,18 +176,18 @@ GLint CheckBufferBinding(GLint buffer)
178
176
  break;
179
177
  }
180
178
  glGetIntegerv(buffer,&result);
181
- CHECK_GLERROR
179
+ CHECK_GLERROR_FROM("glGetIntegerv");
182
180
  return result;
183
181
  }
184
182
 
185
183
  DLLEXPORT void Init_gl()
186
184
  {
187
- VALUE vVERSION = rb_str_new2(VERSION);
185
+ VALUE VERSION = rb_str_new2("0.60");
188
186
 
189
187
  module = rb_define_module("Gl");
190
188
 
191
- rb_define_const(module, "BINDINGS_VERSION", vVERSION);
192
- rb_define_const(module, "RUBY_OPENGL_VERSION", vVERSION);
189
+ rb_define_const(module, "BINDINGS_VERSION", VERSION);
190
+ rb_define_const(module, "RUBY_OPENGL_VERSION", VERSION);
193
191
 
194
192
  gl_init_error(module);
195
193
  gl_init_enums(module);
@@ -2,7 +2,7 @@
2
2
  source: http://oss.sgi.com/cgi-bin/cvsweb.cgi/~checkout~/projects/ogl-sample/main/doc/registry/specs/enumglu.spec
3
3
  */
4
4
 
5
- #include "../common/common.h"
5
+ #include "common.h"
6
6
  void glu_init_enums(VALUE module)
7
7
  {
8
8
  rb_define_const(module, "GLU_TRUE", Qtrue);
File without changes
@@ -17,7 +17,7 @@
17
17
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18
18
  */
19
19
 
20
- #include "../common/common.h"
20
+ #include "common.h"
21
21
 
22
22
  static VALUE module;
23
23
 
@@ -749,7 +749,11 @@ VALUE obj, arg1, arg2, arg3;
749
749
  GLdouble value;
750
750
  GetTESS(arg1, tdata);
751
751
  property = (GLenum)NUM2INT(arg2);
752
- value = (GLdouble)NUM2DBL(arg3);
752
+ if (property == GLU_TESS_BOUNDARY_ONLY) {
753
+ value = (GLdouble)RUBYBOOL2GL(arg3);
754
+ } else {
755
+ value = (GLdouble)NUM2DBL(arg3);
756
+ }
753
757
  gluTessProperty(tdata->tobj, property, value);
754
758
 
755
759
  return Qnil;
@@ -1019,7 +1023,7 @@ VALUE obj, arg1, arg2;
1019
1023
  struct quaddata* qdata;
1020
1024
  GLboolean textureCoords;
1021
1025
  GetQUAD(arg1, qdata);
1022
- textureCoords = (GLboolean)NUM2INT(arg2);
1026
+ textureCoords = (GLboolean)RUBYBOOL2GL(arg2);
1023
1027
  gluQuadricTexture(qdata->qobj, textureCoords);
1024
1028
 
1025
1029
  return Qnil;
@@ -20,7 +20,7 @@
20
20
  *
21
21
  */
22
22
 
23
- #include "../common/common.h"
23
+ #include "common.h"
24
24
 
25
25
  static ID callId; /* 'call' method id */
26
26
 
@@ -36,17 +36,16 @@ static ID callId; /* 'call' method id */
36
36
  #define WINDOW_CALLBACK_SETUP(_funcname) \
37
37
  static VALUE _funcname = Qnil; \
38
38
  static VALUE \
39
- glut_ ## _funcname(obj,arg1) \
40
- VALUE obj,arg1; \
39
+ glut_ ## _funcname(obj, callback) \
40
+ VALUE obj, callback; \
41
41
  { \
42
42
  int win; \
43
- if (!rb_obj_is_kind_of(arg1,rb_cProc) && !NIL_P(arg1)) \
44
- rb_raise(rb_eTypeError, "glut%s:%s",#_funcname, rb_class2name(CLASS_OF(arg1))); \
43
+ callback = check_callback(obj, callback); \
45
44
  win = glutGetWindow(); \
46
45
  if (win == 0) \
47
46
  rb_raise(rb_eRuntimeError, "glut%s needs current window", #_funcname); \
48
- rb_ary_store(_funcname, win, arg1); \
49
- if(NIL_P(arg1)) \
47
+ rb_ary_store(_funcname, win, callback); \
48
+ if(NIL_P(callback)) \
50
49
  glut ## _funcname(NULL); \
51
50
  else \
52
51
  glut##_funcname(&glut_##_funcname##Callback); \
@@ -67,6 +66,23 @@ VALUE obj; \
67
66
  return Qnil; \
68
67
  }
69
68
 
69
+ static VALUE
70
+ check_callback(VALUE self, VALUE callback)
71
+ {
72
+ VALUE inspect;
73
+
74
+ if (NIL_P(callback))
75
+ return callback;
76
+
77
+ if (rb_respond_to(callback, callId))
78
+ return callback;
79
+
80
+ if (SYMBOL_P(callback))
81
+ return rb_obj_method(self, callback);
82
+
83
+ inspect = rb_inspect(callback);
84
+ rb_raise(rb_eArgError, "%s must respond to call", StringValueCStr(inspect));
85
+ }
70
86
 
71
87
  /*
72
88
  * GLUT Implementation
@@ -148,7 +164,28 @@ VALUE obj,arg1,arg2;
148
164
  return Qnil;
149
165
  }
150
166
 
151
- GLUT_SIMPLE_FUNCTION(MainLoop)
167
+ /*
168
+ * No way to unblock glutMainLoop, so fake it?
169
+ */
170
+ static void
171
+ glut_MainLoop_unblock(void *ignored) {
172
+ }
173
+
174
+ static VALUE glut_MainLoop0(void *ignored) {
175
+ glutMainLoop();
176
+
177
+ return Qnil;
178
+ }
179
+
180
+ static VALUE
181
+ glut_MainLoop(void) {
182
+ /* need to acquire GVL in callbacks */
183
+ /*rb_thread_blocking_region(glut_MainLoop0, (void *)NULL, glut_MainLoop_unblock, NULL);*/
184
+
185
+ glut_MainLoop0(NULL);
186
+
187
+ return Qnil; /* never reached */
188
+ }
152
189
 
153
190
  static void GLUTCALLBACK glut_DisplayFuncCallback(void);
154
191
  static void GLUTCALLBACK glut_ReshapeFuncCallback(int,int);
@@ -196,22 +233,26 @@ WINDOW_CALLBACK_SETUP(SpecialUpFunc)
196
233
  /* special case, 2 params */
197
234
  static VALUE JoystickFunc = Qnil;
198
235
  static VALUE
199
- glut_JoystickFunc(obj,arg1,arg2)
200
- VALUE obj,arg1,arg2;
236
+ glut_JoystickFunc(obj,callback,arg2)
237
+ VALUE obj,callback,arg2;
201
238
  {
202
239
  int win;
203
240
  int pollinterval;
204
- if (!rb_obj_is_kind_of(arg1,rb_cProc) && !NIL_P(arg1))
205
- rb_raise(rb_eTypeError, "glutJoystickFunc:%s", rb_class2name(CLASS_OF(arg1)));
241
+
242
+ callback = check_callback(obj, callback);
206
243
  pollinterval=NUM2INT(arg2);
207
244
  win = glutGetWindow();
245
+
208
246
  if (win == 0)
209
247
  rb_raise(rb_eRuntimeError, "glutJoystickFunc needs current window");
210
- rb_ary_store(JoystickFunc, win, arg1);
211
- if (NIL_P(arg1))
212
- glutJoystickFunc(NULL,pollinterval);
248
+
249
+ rb_ary_store(JoystickFunc, win, callback);
250
+
251
+ if (NIL_P(callback))
252
+ glutJoystickFunc(NULL, pollinterval);
213
253
  else
214
- glutJoystickFunc(glut_JoystickFuncCallback,pollinterval);
254
+ glutJoystickFunc(glut_JoystickFuncCallback, pollinterval);
255
+
215
256
  return Qnil;
216
257
  }
217
258
 
@@ -386,19 +427,20 @@ glut_CreateMenuCallback(int value)
386
427
 
387
428
 
388
429
  static VALUE
389
- glut_CreateMenu(obj,arg1)
390
- VALUE obj,arg1;
430
+ glut_CreateMenu(obj,callback)
431
+ VALUE obj,callback;
391
432
  {
392
433
  int menu;
393
- if (!rb_obj_is_kind_of(arg1,rb_cProc) && !NIL_P(arg1))
394
- rb_raise(rb_eTypeError, "glutCreateMenu:%s", rb_class2name(CLASS_OF(arg1)));
395
434
 
396
- if (NIL_P(arg1))
435
+ callback = check_callback(obj, callback);
436
+
437
+ if (NIL_P(callback))
397
438
  menu = glutCreateMenu(NULL);
398
439
  else
399
440
  menu = glutCreateMenu(glut_CreateMenuCallback);
400
441
 
401
- rb_ary_store(g_menucallback,menu,arg1);
442
+ rb_ary_store(g_menucallback, menu, callback);
443
+
402
444
  return INT2FIX(menu);
403
445
  }
404
446
 
@@ -525,10 +567,10 @@ glut_KeyboardFuncCallback(unsigned char key, int x, int y)
525
567
  VALUE func;
526
568
  func = rb_ary_entry(KeyboardFunc, glutGetWindow());
527
569
  if (!NIL_P(func))
528
- #if RUBY_VERSION <190
529
- rb_funcall(func, callId, 3, INT2FIX(key), INT2FIX(x), INT2FIX(y));
570
+ #if HAVE_SINGLE_BYTE_STRINGS
571
+ rb_funcall(func, callId, 3, rb_str_new((char *)&key, 1), INT2FIX(x), INT2FIX(y));
530
572
  #else
531
- rb_funcall(func, callId, 3, rb_funcall(INT2FIX(key),rb_intern("chr"),0), INT2FIX(x), INT2FIX(y));
573
+ rb_funcall(func, callId, 3, INT2FIX(key), INT2FIX(x), INT2FIX(y));
532
574
  #endif
533
575
  }
534
576
 
@@ -598,16 +640,18 @@ glut_IdleFuncCallback(void)
598
640
 
599
641
 
600
642
  static VALUE
601
- glut_IdleFunc(obj, arg1)
602
- VALUE obj,arg1;
643
+ glut_IdleFunc(obj, callback)
644
+ VALUE obj, callback;
603
645
  {
604
- if (!rb_obj_is_kind_of(arg1,rb_cProc) && !NIL_P(arg1))
605
- rb_raise(rb_eTypeError, "glutIdleFunc:%s", rb_class2name(CLASS_OF(arg1)));
606
- idle_func = arg1;
607
- if (NIL_P(arg1))
646
+ callback = check_callback(obj, callback);
647
+
648
+ idle_func = callback;
649
+
650
+ if (NIL_P(callback))
608
651
  glutIdleFunc(NULL);
609
652
  else
610
653
  glutIdleFunc(glut_IdleFuncCallback);
654
+
611
655
  return Qnil;
612
656
  }
613
657
 
@@ -622,17 +666,19 @@ glut_TimerFuncCallback(int value)
622
666
 
623
667
 
624
668
  static VALUE
625
- glut_TimerFunc(obj, arg1, arg2, arg3)
626
- VALUE obj,arg1,arg2,arg3;
669
+ glut_TimerFunc(obj, arg1, callback, arg3)
670
+ VALUE obj,arg1,callback,arg3;
627
671
  {
628
672
  unsigned int millis;
629
673
  int value;
630
674
  millis = (unsigned int)NUM2INT(arg1);
631
675
  value = NUM2INT(arg3);
632
- if (!rb_obj_is_kind_of(arg2,rb_cProc))
633
- rb_raise(rb_eTypeError, "glutTimerFunc:%s", rb_class2name(CLASS_OF(arg2)));
634
- timer_func = arg2;
676
+ callback = check_callback(obj, callback);
677
+
678
+ timer_func = callback;
679
+
635
680
  glutTimerFunc(millis, glut_TimerFuncCallback, value);
681
+
636
682
  return Qnil;
637
683
  }
638
684
 
@@ -647,16 +693,18 @@ glut_MenuStateFuncCallback(int state)
647
693
 
648
694
 
649
695
  static VALUE
650
- glut_MenuStateFunc(obj, arg1)
651
- VALUE obj,arg1;
696
+ glut_MenuStateFunc(obj, callback)
697
+ VALUE obj, callback;
652
698
  {
653
- if (!rb_obj_is_kind_of(arg1,rb_cProc) && !(NIL_P(arg1)))
654
- rb_raise(rb_eTypeError, "glutMenuStateFunc:%s", rb_class2name(CLASS_OF(arg1)));
655
- menustate_func = arg1;
656
- if (NIL_P(arg1))
699
+ callback = check_callback(obj, callback);
700
+
701
+ menustate_func = callback;
702
+
703
+ if (NIL_P(callback))
657
704
  glutMenuStateFunc(NULL);
658
705
  else
659
706
  glutMenuStateFunc(glut_MenuStateFuncCallback);
707
+
660
708
  return Qnil;
661
709
  }
662
710
 
@@ -669,16 +717,18 @@ glut_MenuStatusFuncCallback(int state,int x,int y)
669
717
  }
670
718
 
671
719
  static VALUE
672
- glut_MenuStatusFunc(obj, arg1)
673
- VALUE obj,arg1;
720
+ glut_MenuStatusFunc(obj, callback)
721
+ VALUE obj, callback;
674
722
  {
675
- if (!rb_obj_is_kind_of(arg1,rb_cProc) && !(NIL_P(arg1)))
676
- rb_raise(rb_eTypeError, "glutMenuStatusFunc:%s", rb_class2name(CLASS_OF(arg1)));
677
- menustatus_func = arg1;
678
- if (NIL_P(arg1))
723
+ callback = check_callback(obj, callback);
724
+
725
+ menustatus_func = callback;
726
+
727
+ if (NIL_P(callback))
679
728
  glutMenuStatusFunc(NULL);
680
729
  else
681
730
  glutMenuStatusFunc(glut_MenuStatusFuncCallback);
731
+
682
732
  return Qnil;
683
733
  }
684
734
 
@@ -0,0 +1,11 @@
1
+ #include "common.h"
2
+
3
+ void Init_gl(void);
4
+ void Init_glu(void);
5
+ void Init_glut(void);
6
+
7
+ DLLEXPORT void Init_opengl() {
8
+ Init_gl();
9
+ Init_glu();
10
+ Init_glut();
11
+ }
@@ -0,0 +1 @@
1
+ require 'opengl'
@@ -0,0 +1 @@
1
+ require 'opengl'
@@ -0,0 +1 @@
1
+ require 'opengl'
@@ -20,14 +20,13 @@
20
20
  # Thanks to Ilmari Heikkinen for a previous "reversed" version of this code,
21
21
  # and to Bill Kelly for a version before that one.
22
22
 
23
- # Extend the search path for Windows binary gem, depending of the current ruby version
24
- major_minor = RUBY_VERSION[ /^(\d+\.\d+)/ ] or
25
- raise "Oops, can't extract the major/minor version from #{RUBY_VERSION.dump}"
26
- $: << File.join(File.dirname(__FILE__), major_minor)
23
+ module OpenGL
27
24
 
28
- require 'gl'
29
- require 'glu'
30
- require 'glut'
25
+ VERSION = '0.7.0.pre2'
26
+
27
+ end
28
+
29
+ require 'opengl/opengl'
31
30
 
32
31
  include Gl,Glu,Glut
33
32
 
@@ -36,15 +35,15 @@ include Gl,Glu,Glut
36
35
  module GL
37
36
  extend self
38
37
  include Gl
39
-
38
+
40
39
  Gl.constants.each do |cn|
41
40
  n = cn.to_s.sub(/^GL_/,'')
42
41
  # due to ruby naming scheme, we can't export constants with leading decimal,
43
42
  # e.g. (Gl::)GL_2D would under old syntax become (GL::)2D which is illegal
44
- next if n =~ /^[0-9]/
43
+ next if n =~ /^[0-9]/
45
44
  const_set( n, Gl.const_get( cn ) )
46
45
  end
47
-
46
+
48
47
  Gl.methods( false ).each do |mn|
49
48
  n = mn.to_s.sub(/^gl/,'')
50
49
  alias_method( n, mn )
@@ -57,12 +56,12 @@ end
57
56
  module GLU
58
57
  extend self
59
58
  include Glu
60
-
59
+
61
60
  Glu.constants.each do |cn|
62
61
  n = cn.to_s.sub(/^GLU_/,'')
63
62
  const_set( n, Glu.const_get( cn ) )
64
63
  end
65
-
64
+
66
65
  Glu.methods( false ).each do |mn|
67
66
  n = mn.to_s.sub(/^glu/,'')
68
67
  alias_method( n, mn )
@@ -75,12 +74,12 @@ end
75
74
  module GLUT
76
75
  extend self
77
76
  include Glut
78
-
77
+
79
78
  Glut.constants.each do |cn|
80
79
  n = cn.to_s.sub(/^GLUT_/,'')
81
80
  const_set( n, Glut.const_get( cn ) )
82
81
  end
83
-
82
+
84
83
  Glut.methods( false ).each do |mn|
85
84
  n = mn.to_s.sub(/^glut/,'')
86
85
  alias_method( n, mn )