opengl 0.8.0.pre1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/History.rdoc CHANGED
@@ -1,6 +1,24 @@
1
- === 0.8 / master HEAD
1
+ === 0.8.0 / 2013-02-03
2
2
 
3
- * drop support for Ruby 1.8
3
+ * Drop support for Ruby 1.8.
4
+ * Wrap glut callbacks in GVL release/acquire for better thread support.
5
+ * Add OpenGL::Buffer for mapped buffers that allows writing.
6
+
7
+ === 0.7.0 / 2013-02-03
8
+
9
+ * Better support of 64 bit systems.
10
+ * Replace mkrf with extconf.rb, hoe and rake-compiler.
11
+ * Switch to dlopen() from deprecated NSAddImage() and friends for OS X.
12
+ * glBegin, glPushMatrix, glEnable and glEnableClientState now accept a block.
13
+ * glEnable/glDisable and glEnableClientState/glDisableClientState now accept
14
+ multiple arguments.
15
+ * Allow to_a-able objects for glColor*v, glRasterPos*v, glRect*v, glTexCoord*v,
16
+ glMaterial, glNormal and glVertex.
17
+ * Fix unused param count in ARY2CMAT.
18
+ * Fix a lot of bugs in the test suite.
19
+ * Merge opengl C extensions into a single extension to avoid code duplication
20
+ in extconf.rb and simplify rebuilding based on header changes.
21
+ * Add cross compilation tasks with download of freeglut for binary windows gems
4
22
 
5
23
  === 0.60.1 / 2009-02-16
6
24
 
data/README.rdoc CHANGED
@@ -27,7 +27,7 @@ GLU and GLUT libraries.
27
27
 
28
28
  == Install
29
29
 
30
- gem install opengl --pre
30
+ gem install opengl
31
31
 
32
32
  == Developers
33
33
 
data/ext/opengl/glut.c CHANGED
@@ -53,9 +53,9 @@ static VALUE glut_Init( int argc, VALUE * argv, VALUE obj)
53
53
 
54
54
  if (rb_scan_args(argc, argv, "01", &orig_arg) == 0)
55
55
  orig_arg = rb_eval_string("[$0] + ARGV");
56
- else
56
+ else
57
57
  Check_Type(orig_arg, T_ARRAY);
58
-
58
+
59
59
  /* converts commandline parameters from ruby to C, passes them
60
60
  to glutInit and returns the parameters stripped of glut-specific
61
61
  commands ("-display","-geometry" etc.) */
@@ -63,9 +63,9 @@ static VALUE glut_Init( int argc, VALUE * argv, VALUE obj)
63
63
  largv = ALLOCA_N(char*, largc);
64
64
  for (i = 0; i < largc; i++)
65
65
  largv[i] = StringValueCStr(RARRAY_PTR(orig_arg)[i]);
66
-
66
+
67
67
  glutInit(&largc, largv);
68
-
68
+
69
69
  new_argv = rb_ary_new2(largc);
70
70
  for (i = 0; i < largc; i++)
71
71
  rb_ary_push(new_argv,rb_str_new2(largv[i]));
@@ -137,7 +137,7 @@ glut_CheckLoop(void) {
137
137
  return Qnil;
138
138
  }
139
139
 
140
- /* GLUT window sub-API. */
140
+ /* GLUT window sub-API. */
141
141
  static VALUE glut_CreateWindow(argc, argv, obj)
142
142
  int argc;
143
143
  VALUE* argv;
@@ -504,7 +504,7 @@ static inline void * bitmap_font_map(int f)
504
504
  switch (f) {
505
505
  case 0: return (void *)GLUT_BITMAP_9_BY_15;
506
506
  case 1: return (void *)GLUT_BITMAP_8_BY_13;
507
- case 2: return (void *)GLUT_BITMAP_TIMES_ROMAN_10;
507
+ case 2: return (void *)GLUT_BITMAP_TIMES_ROMAN_10;
508
508
  case 3: return (void *)GLUT_BITMAP_TIMES_ROMAN_24;
509
509
  case 4: return (void *)GLUT_BITMAP_HELVETICA_10;
510
510
  case 5: return (void *)GLUT_BITMAP_HELVETICA_12;
@@ -956,7 +956,7 @@ void Init_glut() {
956
956
  rb_define_module_function(mGlut, "glutIgnoreKeyRepeat", glut_IgnoreKeyRepeat, 1);
957
957
  rb_define_module_function(mGlut, "glutPostWindowOverlayRedisplay", glut_PostWindowOverlayRedisplay, 1);
958
958
  rb_define_module_function(mGlut, "glutPostWindowRedisplay", glut_PostWindowRedisplay, 1);
959
-
959
+
960
960
  rb_define_const(mGlut, "GLUT_API_VERSION", INT2NUM(GLUT_API_VERSION));
961
961
  rb_define_const(mGlut, "GLUT_XLIB_IMPLEMENTATION", INT2NUM(GLUT_XLIB_IMPLEMENTATION));
962
962
  rb_define_const(mGlut, "GLUT_RGB", INT2NUM(GLUT_RGB));
@@ -1133,5 +1133,13 @@ void Init_glut() {
1133
1133
  rb_define_const(mGlut, "GLUT_GAME_MODE_PIXEL_DEPTH", INT2NUM(GLUT_GAME_MODE_PIXEL_DEPTH));
1134
1134
  rb_define_const(mGlut, "GLUT_GAME_MODE_REFRESH_RATE", INT2NUM(GLUT_GAME_MODE_REFRESH_RATE));
1135
1135
  rb_define_const(mGlut, "GLUT_GAME_MODE_DISPLAY_CHANGED", INT2NUM(GLUT_GAME_MODE_DISPLAY_CHANGED));
1136
+
1137
+ // Some OSX specific constants
1138
+ #ifdef GLUT_NO_RECOVERY
1139
+ rb_define_const(mGlut, "GLUT_NO_RECOVERY", INT2NUM(GLUT_NO_RECOVERY));
1140
+ #endif
1141
+ #ifdef GLUT_3_2_CORE_PROFILE
1142
+ rb_define_const(mGlut, "GLUT_3_2_CORE_PROFILE", INT2NUM(GLUT_3_2_CORE_PROFILE));
1143
+ #endif
1136
1144
  }
1137
1145
 
@@ -185,7 +185,7 @@ glut_KeyboardFuncCallback(struct callback_args *args) {
185
185
  #if HAVE_SINGLE_BYTE_STRINGS
186
186
  VALUE key = rb_str_new((char *)&args->arg0.key, 1);
187
187
  #else
188
- VALUE key = UINT2FIX((unsigned char)args->arg0.key);
188
+ VALUE key = UINT2NUM((unsigned char)args->arg0.key);
189
189
  #endif
190
190
  VALUE x = INT2FIX(args->arg1.x);
191
191
  VALUE y = INT2FIX(args->arg2.y);
@@ -215,7 +215,7 @@ glut_KeyboardUpFuncCallback(struct callback_args *args) {
215
215
  #if HAVE_SINGLE_BYTE_STRINGS
216
216
  VALUE key = rb_str_new((char *)args->arg0.key, 1);
217
217
  #else
218
- VALUE key = UINT2FIX((unsigned char)args->arg0.key);
218
+ VALUE key = UINT2NUM((unsigned char)args->arg0.key);
219
219
  #endif
220
220
  VALUE x = INT2FIX((int)args->arg1.x);
221
221
  VALUE y = INT2FIX((int)args->arg2.y);
@@ -275,7 +275,7 @@ glut_MotionFuncCallback(struct callback_args *args) {
275
275
  VALUE y = INT2FIX(args->arg1.y);
276
276
 
277
277
  if (!NIL_P(func))
278
- rb_funcall(func, call_id, 2, x, y);
278
+ rb_funcall(func, call_id, 2, x, y);
279
279
 
280
280
  return NULL;
281
281
  }
data/lib/opengl.rb CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  module OpenGL
24
24
 
25
- VERSION = '0.8.0.pre1'
25
+ VERSION = '0.8.0'
26
26
 
27
27
  end
28
28
 
@@ -77,6 +77,7 @@ module GLUT
77
77
 
78
78
  Glut.constants.each do |cn|
79
79
  n = cn.to_s.sub(/^GLUT_/,'')
80
+ next if n =~ /^[0-9]/
80
81
  const_set( n, Glut.const_get( cn ) )
81
82
  end
82
83
 
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opengl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0.pre1
5
- prerelease: 6
4
+ version: 0.8.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Eric Hodel
@@ -13,11 +13,27 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2012-06-14 00:00:00.000000000 Z
16
+ date: 2013-02-03 00:00:00.000000000 Z
17
17
  dependencies:
18
+ - !ruby/object:Gem::Dependency
19
+ name: rdoc
20
+ requirement: !ruby/object:Gem::Requirement
21
+ none: false
22
+ requirements:
23
+ - - ~>
24
+ - !ruby/object:Gem::Version
25
+ version: '3.10'
26
+ type: :development
27
+ prerelease: false
28
+ version_requirements: !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '3.10'
18
34
  - !ruby/object:Gem::Dependency
19
35
  name: rake-compiler
20
- requirement: &6409680 !ruby/object:Gem::Requirement
36
+ requirement: !ruby/object:Gem::Requirement
21
37
  none: false
22
38
  requirements:
23
39
  - - ~>
@@ -28,29 +44,31 @@ dependencies:
28
44
  version: 0.7.9
29
45
  type: :development
30
46
  prerelease: false
31
- version_requirements: *6409680
32
- - !ruby/object:Gem::Dependency
33
- name: rdoc
34
- requirement: &6406920 !ruby/object:Gem::Requirement
47
+ version_requirements: !ruby/object:Gem::Requirement
35
48
  none: false
36
49
  requirements:
37
50
  - - ~>
38
51
  - !ruby/object:Gem::Version
39
- version: '3.10'
40
- type: :development
41
- prerelease: false
42
- version_requirements: *6406920
52
+ version: '0.7'
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: 0.7.9
43
56
  - !ruby/object:Gem::Dependency
44
57
  name: hoe
45
- requirement: &6420080 !ruby/object:Gem::Requirement
58
+ requirement: !ruby/object:Gem::Requirement
46
59
  none: false
47
60
  requirements:
48
61
  - - ~>
49
62
  - !ruby/object:Gem::Version
50
- version: '2.16'
63
+ version: '3.3'
51
64
  type: :development
52
65
  prerelease: false
53
- version_requirements: *6420080
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ none: false
68
+ requirements:
69
+ - - ~>
70
+ - !ruby/object:Gem::Version
71
+ version: '3.3'
54
72
  description: ! 'An OpenGL wrapper for Ruby. ruby-opengl contains bindings for OpenGL
55
73
  and the
56
74
 
@@ -252,28 +270,28 @@ required_ruby_version: !ruby/object:Gem::Requirement
252
270
  required_rubygems_version: !ruby/object:Gem::Requirement
253
271
  none: false
254
272
  requirements:
255
- - - ! '>'
273
+ - - ! '>='
256
274
  - !ruby/object:Gem::Version
257
- version: 1.3.1
275
+ version: '0'
258
276
  requirements: []
259
277
  rubyforge_project: opengl
260
- rubygems_version: 1.8.17
278
+ rubygems_version: 1.8.24
261
279
  signing_key:
262
280
  specification_version: 3
263
281
  summary: An OpenGL wrapper for Ruby
264
282
  test_files:
265
- - test/test_gl_13.rb
266
- - test/test_gl_10_11.rb
283
+ - test/test_gl_ext_ext.rb
267
284
  - test/test_gl_12.rb
268
- - test/test_gl_14.rb
269
- - test/test_glu.rb
270
- - test/test_opengl_buffer.rb
271
285
  - test/test_gl_15.rb
272
- - test/test_gl_ext_nv.rb
273
- - test/test_gl_ext_ati.rb
274
- - test/test_gl_ext_ext.rb
275
- - test/test_gl_21.rb
286
+ - test/test_glu.rb
276
287
  - test/test_gl_20.rb
288
+ - test/test_gl_13.rb
277
289
  - test/test_gl_ext_gremedy.rb
278
290
  - test/test_gl.rb
291
+ - test/test_gl_ext_nv.rb
279
292
  - test/test_gl_ext_arb.rb
293
+ - test/test_gl_10_11.rb
294
+ - test/test_opengl_buffer.rb
295
+ - test/test_gl_ext_ati.rb
296
+ - test/test_gl_14.rb
297
+ - test/test_gl_21.rb