ruby-opengl2 0.60.5 → 0.60.6

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -60,14 +60,14 @@ task :test_all => [:test]
60
60
  # common specification for source and binary gems
61
61
  spec = Gem::Specification.new do |s|
62
62
  s.name = "ruby-opengl2"
63
- s.version = "0.60.5"
63
+ s.version = "0.60.6"
64
64
  s.authors = [ "Alain Hoang", "Jan Dvorak", "Minh Thu Vo", "James Adam", "Paolo Bosetti" ]
65
65
  s.homepage = "http://github.com/pbosetti/ruby-opengl"
66
66
  s.email = "p4010@me.com"
67
67
  s.rubyforge_project = 'ruby-opengl2'
68
68
  s.platform = Gem::Platform::RUBY
69
69
  s.summary = "OpenGL Interface for Ruby"
70
- s.description = "This is a modernization of the glorious but unmaintained ruby-opengl version, aimed at making it compatible with ruby 1.9.x series. At the moment, it successfully compiles on OS X Lion and Debian 6.0.3"
70
+ s.description = "This is a modernization of the glorious but unmaintained ruby-opengl version, aimed at making it compatible with ruby 1.9.x series. At the moment, it successfully compiles on OS X Mountain Lion and Debian 6.0.3"
71
71
  s.require_path = "lib"
72
72
  s.has_rdoc = false
73
73
  s.files = FileList.new("{lib,ext,examples,test}/**/*") do |fl|
@@ -81,11 +81,14 @@ spec = Gem::Specification.new do |s|
81
81
 
82
82
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
83
83
  s.add_runtime_dependency(%q<mkrf>, [">= 0.2.3"])
84
+ s.add_runtime_dependency(%q<rake>, [">= 10.0"])
84
85
  else
85
86
  s.add_dependency(%q<mkrf>, [">= 0.2.3"])
87
+ s.add_dependency(%q<rake>, [">= 10.0"])
86
88
  end
87
89
  else
88
90
  s.add_dependency(%q<mkrf>, [">= 0.2.3"])
91
+ s.add_dependency(%q<rake>, [">= 10.0"])
89
92
  end
90
93
  end
91
94
 
@@ -27,6 +27,7 @@
27
27
  #include <ctype.h>
28
28
 
29
29
  #ifdef __APPLE__
30
+ #include <dlfcn.h>
30
31
  #include <OpenGL/gl.h>
31
32
  #include <OpenGL/glu.h>
32
33
  #include <GLUT/glut.h>
@@ -357,27 +358,14 @@ static inline void *load_gl_function(const char *name,int raise)
357
358
  void *func_ptr = NULL;
358
359
 
359
360
  #if defined(__APPLE__)
360
- static const struct mach_header* library = NULL;
361
- char* symbolName;
362
- NSSymbol symbol;
363
- if (library == NULL)
364
- library = NSAddImage("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL",NSADDIMAGE_OPTION_RETURN_ON_ERROR);
365
-
366
- if (library == NULL)
367
- rb_raise(rb_eRuntimeError,"Can't load OpenGL library for dynamic loading");
368
-
361
+ void* theImage = dlopen("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", RTLD_LAZY);
369
362
  /* prepend a '_' for the Unix C symbol mangling convention */
363
+ char * symbolName;
370
364
  symbolName = ALLOC_N(char,strlen(name) + 2);
371
365
  symbolName[0] = '_';
372
366
  strcpy(symbolName+1, name);
373
-
374
- symbol = NSLookupSymbolInImage(library,symbolName,NSLOOKUPSYMBOLINIMAGE_OPTION_BIND | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR);
367
+ func_ptr = dlsym(theImage, &(symbolName[1]));
375
368
  xfree(symbolName);
376
-
377
- if (symbol == NULL)
378
- func_ptr = NULL;
379
- else
380
- func_ptr = NSAddressOfSymbol(symbol);
381
369
  #elif defined(WIN32) || defined(_WIN32)
382
370
  func_ptr = wglGetProcAddress((LPCSTR)name);
383
371
  #elif defined(GLX_VERSION_1_4)
@@ -155,7 +155,7 @@ ARY2CTYPE(double,NUM2DBL)
155
155
 
156
156
  /* Converts either array or object responding to #to_a to C-style array */
157
157
  #define ARY2CMAT(_type_) \
158
- static inline void ary2cmat##_type_(rary, cary, cols, rows, count) \
158
+ static inline void ary2cmat##_type_(rary, cary, cols, rows) \
159
159
  VALUE rary; \
160
160
  _type_ cary[]; \
161
161
  int cols,rows; \
@@ -222,10 +222,9 @@ static VALUE gl_##_name_(VALUE obj,VALUE arg1) \
222
222
  #define GL_FUNC_GENOBJECTS(_name_) \
223
223
  static VALUE gl_##_name_(VALUE obj,VALUE arg1) \
224
224
  { \
225
- GLsizei n; \
225
+ GLsizei i, n; \
226
226
  GLuint *objects; \
227
227
  VALUE ret; \
228
- unsigned int i; \
229
228
  n = CONV_GLsizei(arg1); \
230
229
  objects = ALLOC_N(GLuint, n); \
231
230
  gl##_name_(n,objects); \
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,3 +1,5 @@
1
- # Logfile created on 2012-08-03 16:02:49 +0200 by logger.rb/31641
2
- I, [2012-08-03T16:02:49.356924 #22495] INFO -- : Rakefile written
3
- I, [2012-08-21T11:15:29.294819 #19765] INFO -- : Rakefile written
1
+ # Logfile created on 2012-11-27 00:58:33 +0100 by logger.rb/31641
2
+ I, [2012-11-27T00:58:33.139438 #16076] INFO -- : Checking for library: GL
3
+ I, [2012-11-27T00:58:33.194372 #16076] INFO -- : Function found: glVertex3d()
4
+ I, [2012-11-27T00:58:33.194481 #16076] INFO -- : Library found: GL
5
+ I, [2012-11-27T00:58:33.194697 #16076] INFO -- : Rakefile written
@@ -22,7 +22,7 @@ RUBYVER = " -DRUBY_VERSION=" + RUBY_VERSION.split(".").join
22
22
  Mkrf::Generator.new( 'gl' ) do |g|
23
23
  puts "*" * 10
24
24
  #Config::CONFIG["CC"] = `which gcc`.chomp
25
- p RbConfig::CONFIG
25
+ #p RbConfig::CONFIG
26
26
  puts "*" * 10
27
27
  case RUBY_PLATFORM
28
28
  when /darwin/
Binary file
Binary file
Binary file
@@ -1,2 +1,8 @@
1
- # Logfile created on 2012-08-03 17:30:27 +0200 by logger.rb/31641
2
- I, [2012-08-03T17:30:27.827119 #23428] INFO -- : Rakefile written
1
+ # Logfile created on 2012-11-27 00:58:40 +0100 by logger.rb/31641
2
+ I, [2012-11-27T00:58:40.773695 #16156] INFO -- : Checking for library: GLU
3
+ I, [2012-11-27T00:58:40.837804 #16156] INFO -- : Function found: gluLookAt()
4
+ I, [2012-11-27T00:58:40.837912 #16156] INFO -- : Library found: GLU
5
+ I, [2012-11-27T00:58:40.837966 #16156] INFO -- : Checking for library: GL
6
+ I, [2012-11-27T00:58:40.915023 #16156] INFO -- : Function found: glVertex3d()
7
+ I, [2012-11-27T00:58:40.915145 #16156] INFO -- : Library found: GL
8
+ I, [2012-11-27T00:58:40.915380 #16156] INFO -- : Rakefile written
@@ -521,9 +521,7 @@ int width, height;
521
521
 
522
522
 
523
523
  static void GLUTCALLBACK
524
- glut_KeyboardFuncCallback(key, x, y)
525
- unsigned char key;
526
- int x,y;
524
+ glut_KeyboardFuncCallback(unsigned char key, int x, int y)
527
525
  {
528
526
  VALUE func;
529
527
  func = rb_ary_entry(KeyboardFunc, glutGetWindow());
@@ -806,9 +804,7 @@ int x,y,z;
806
804
  }
807
805
 
808
806
  static void GLUTCALLBACK
809
- glut_KeyboardUpFuncCallback(key,x,y)
810
- unsigned char key;
811
- int x,y;
807
+ glut_KeyboardUpFuncCallback(unsigned char key, int x, int y)
812
808
  {
813
809
  VALUE func;
814
810
  func = rb_ary_entry(KeyboardUpFunc, glutGetWindow());
Binary file
Binary file
@@ -1,2 +1,11 @@
1
- # Logfile created on 2012-08-03 17:33:19 +0200 by logger.rb/31641
2
- I, [2012-08-03T17:33:19.280315 #23473] INFO -- : Rakefile written
1
+ # Logfile created on 2012-11-27 00:58:41 +0100 by logger.rb/31641
2
+ I, [2012-11-27T00:58:41.773496 #16186] INFO -- : Checking for library: glut
3
+ I, [2012-11-27T00:58:41.819402 #16186] INFO -- : Function found: glutSolidTeapot()
4
+ I, [2012-11-27T00:58:41.819505 #16186] INFO -- : Library found: glut
5
+ I, [2012-11-27T00:58:41.819558 #16186] INFO -- : Checking for library: GLU
6
+ I, [2012-11-27T00:58:41.900479 #16186] INFO -- : Function found: gluLookAt()
7
+ I, [2012-11-27T00:58:41.900581 #16186] INFO -- : Library found: GLU
8
+ I, [2012-11-27T00:58:41.900634 #16186] INFO -- : Checking for library: GL
9
+ I, [2012-11-27T00:58:41.969228 #16186] INFO -- : Function found: glVertex3d()
10
+ I, [2012-11-27T00:58:41.969330 #16186] INFO -- : Library found: GL
11
+ I, [2012-11-27T00:58:41.969598 #16186] INFO -- : Rakefile written
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-opengl2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.60.5
4
+ version: 0.60.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2012-08-21 00:00:00.000000000 Z
16
+ date: 2012-11-26 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: mkrf
@@ -31,82 +31,31 @@ dependencies:
31
31
  - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.2.3
34
+ - !ruby/object:Gem::Dependency
35
+ name: rake
36
+ requirement: !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirements:
39
+ - - ! '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '10.0'
42
+ type: :runtime
43
+ prerelease: false
44
+ version_requirements: !ruby/object:Gem::Requirement
45
+ none: false
46
+ requirements:
47
+ - - ! '>='
48
+ - !ruby/object:Gem::Version
49
+ version: '10.0'
34
50
  description: This is a modernization of the glorious but unmaintained ruby-opengl
35
51
  version, aimed at making it compatible with ruby 1.9.x series. At the moment, it
36
- successfully compiles on OS X Lion and Debian 6.0.3
52
+ successfully compiles on OS X Mountain Lion and Debian 6.0.3
37
53
  email: p4010@me.com
38
54
  executables: []
39
55
  extensions:
40
56
  - Rakefile
41
57
  extra_rdoc_files: []
42
58
  files:
43
- - lib/gl.bundle
44
- - lib/glu.bundle
45
- - lib/glut.bundle
46
- - lib/opengl.rb
47
- - ext/common/common.h
48
- - ext/common/conv.h
49
- - ext/common/funcdef.h
50
- - ext/common/gl-enums.h
51
- - ext/common/gl-error.h
52
- - ext/common/gl-types.h
53
- - ext/common/glu-enums.h
54
- - ext/gl/gl-1.0-1.1.c
55
- - ext/gl/gl-1.0-1.1.o
56
- - ext/gl/gl-1.2.c
57
- - ext/gl/gl-1.2.o
58
- - ext/gl/gl-1.3.c
59
- - ext/gl/gl-1.3.o
60
- - ext/gl/gl-1.4.c
61
- - ext/gl/gl-1.4.o
62
- - ext/gl/gl-1.5.c
63
- - ext/gl/gl-1.5.o
64
- - ext/gl/gl-2.0.c
65
- - ext/gl/gl-2.0.o
66
- - ext/gl/gl-2.1.c
67
- - ext/gl/gl-2.1.o
68
- - ext/gl/gl-enums.c
69
- - ext/gl/gl-enums.o
70
- - ext/gl/gl-error.c
71
- - ext/gl/gl-error.o
72
- - ext/gl/gl-ext-3dfx.c
73
- - ext/gl/gl-ext-3dfx.o
74
- - ext/gl/gl-ext-arb.c
75
- - ext/gl/gl-ext-arb.o
76
- - ext/gl/gl-ext-ati.c
77
- - ext/gl/gl-ext-ati.o
78
- - ext/gl/gl-ext-ext.c
79
- - ext/gl/gl-ext-ext.o
80
- - ext/gl/gl-ext-gremedy.c
81
- - ext/gl/gl-ext-gremedy.o
82
- - ext/gl/gl-ext-nv.c
83
- - ext/gl/gl-ext-nv.o
84
- - ext/gl/gl.bundle
85
- - ext/gl/gl.c
86
- - ext/gl/gl.o
87
- - ext/gl/mkrf.log
88
- - ext/gl/mkrf_conf.rb
89
- - ext/glu/glu-enums.c
90
- - ext/glu/glu-enums.o
91
- - ext/glu/glu.bundle
92
- - ext/glu/glu.c
93
- - ext/glu/glu.o
94
- - ext/glu/mkrf.log
95
- - ext/glu/mkrf_conf.rb
96
- - ext/glut/glut.bundle
97
- - ext/glut/glut.c
98
- - ext/glut/glut.o
99
- - ext/glut/mkrf.log
100
- - ext/glut/mkrf_conf.rb
101
- - examples/misc/anisotropic.rb
102
- - examples/misc/fbo_test.rb
103
- - examples/misc/font-glut.rb
104
- - examples/misc/glfwtest.rb
105
- - examples/misc/OGLBench.rb
106
- - examples/misc/plane.rb
107
- - examples/misc/readpixel.rb
108
- - examples/misc/sdltest.rb
109
- - examples/misc/trislam.rb
110
59
  - examples/NeHe/nehe_lesson02.rb
111
60
  - examples/NeHe/nehe_lesson03.rb
112
61
  - examples/NeHe/nehe_lesson04.rb
@@ -165,6 +114,73 @@ files:
165
114
  - examples/RedBook/texturesurf.rb
166
115
  - examples/RedBook/varray.rb
167
116
  - examples/RedBook/wrap.rb
117
+ - examples/misc/OGLBench.rb
118
+ - examples/misc/anisotropic.rb
119
+ - examples/misc/fbo_test.rb
120
+ - examples/misc/font-glut.rb
121
+ - examples/misc/glfwtest.rb
122
+ - examples/misc/plane.rb
123
+ - examples/misc/readpixel.rb
124
+ - examples/misc/sdltest.rb
125
+ - examples/misc/trislam.rb
126
+ - ext/common/common.h
127
+ - ext/common/conv.h
128
+ - ext/common/funcdef.h
129
+ - ext/common/gl-enums.h
130
+ - ext/common/gl-error.h
131
+ - ext/common/gl-types.h
132
+ - ext/common/glu-enums.h
133
+ - ext/gl/gl-1.0-1.1.c
134
+ - ext/gl/gl-1.0-1.1.o
135
+ - ext/gl/gl-1.2.c
136
+ - ext/gl/gl-1.2.o
137
+ - ext/gl/gl-1.3.c
138
+ - ext/gl/gl-1.3.o
139
+ - ext/gl/gl-1.4.c
140
+ - ext/gl/gl-1.4.o
141
+ - ext/gl/gl-1.5.c
142
+ - ext/gl/gl-1.5.o
143
+ - ext/gl/gl-2.0.c
144
+ - ext/gl/gl-2.0.o
145
+ - ext/gl/gl-2.1.c
146
+ - ext/gl/gl-2.1.o
147
+ - ext/gl/gl-enums.c
148
+ - ext/gl/gl-enums.o
149
+ - ext/gl/gl-error.c
150
+ - ext/gl/gl-error.o
151
+ - ext/gl/gl-ext-3dfx.c
152
+ - ext/gl/gl-ext-3dfx.o
153
+ - ext/gl/gl-ext-arb.c
154
+ - ext/gl/gl-ext-arb.o
155
+ - ext/gl/gl-ext-ati.c
156
+ - ext/gl/gl-ext-ati.o
157
+ - ext/gl/gl-ext-ext.c
158
+ - ext/gl/gl-ext-ext.o
159
+ - ext/gl/gl-ext-gremedy.c
160
+ - ext/gl/gl-ext-gremedy.o
161
+ - ext/gl/gl-ext-nv.c
162
+ - ext/gl/gl-ext-nv.o
163
+ - ext/gl/gl.c
164
+ - ext/gl/gl.o
165
+ - ext/gl/gl.so
166
+ - ext/gl/mkrf.log
167
+ - ext/gl/mkrf_conf.rb
168
+ - ext/glu/glu-enums.c
169
+ - ext/glu/glu-enums.o
170
+ - ext/glu/glu.c
171
+ - ext/glu/glu.o
172
+ - ext/glu/glu.so
173
+ - ext/glu/mkrf.log
174
+ - ext/glu/mkrf_conf.rb
175
+ - ext/glut/glut.c
176
+ - ext/glut/glut.o
177
+ - ext/glut/glut.so
178
+ - ext/glut/mkrf.log
179
+ - ext/glut/mkrf_conf.rb
180
+ - lib/gl.so
181
+ - lib/glu.so
182
+ - lib/glut.so
183
+ - lib/opengl.rb
168
184
  - test/README
169
185
  - test/tc_common.rb
170
186
  - test/tc_ext_arb.rb
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file