opengl-bindings 1.3.14 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dbdfee5064f14e45e8dfc94b6e0bffa40b1e6f0e
4
- data.tar.gz: 62225c886837d71e197884ad6367b6332f8f5edc
3
+ metadata.gz: ed6103cc13f12beab2bc9469d74015da4f4baede
4
+ data.tar.gz: a5ee6f158b3fea87c1c53b3021a263c3e25b2b55
5
5
  SHA512:
6
- metadata.gz: 032181abf5f741bcdd3a46139a8856ed20e9b114ed4bb09305ce85ef5e735e3ce56b6230c76dfa40202a10d8cc68386606094b7af4b7fbb348142dac642b905a
7
- data.tar.gz: 0665ff4df299ce52dec96388b6aa66e95af2e120b5ff6da8e797cbc272d4a65a0f3190c24d6e591ad4ee7e1f9cadbdee585f24b2c25cef4419fb1cbfaca07e99
6
+ metadata.gz: 8d37bbac56463b483da209abb07775319abef4b3d0ec56a4101c8fd5bc885c7151207d0b15203d0ab485402ac6a586ef7d62df23049e02c881d9cda3e868c245
7
+ data.tar.gz: 28bec8c164efdc4bf8b25ce6a56897165e983b1c85402edc9a393252abf4e698e84d92c28cf9e142bdf4498290a9d9fedb1253b6b2e9b17b93509b1ee587ec4c
data/ChangeLog CHANGED
@@ -1,3 +1,16 @@
1
+ 2015-07-30 vaiorabbit <http://twitter.com/vaiorabbit>
2
+
3
+ * sample/util/setup_dll.rb, README.md: This library is tested on Linux. (Thanks: @cedlemo (https://github.com/cedlemo))
4
+ * lib/opengl_common.rb, etc. (self.load_lib): All load_dll's are renamed to load_lib. (Thanks: @cedlemo (https://github.com/cedlemo))
5
+
6
+ 2015-07-21 vaiorabbit <http://twitter.com/vaiorabbit>
7
+
8
+ * Updated using latest gl.xml.
9
+
10
+ 2015-07-16 vaiorabbit <http://twitter.com/vaiorabbit>
11
+
12
+ * glfw.rb, glfw30.rb (glfwGetCursorPos): Fixed signature ((void*, void*, void*) -> (void*, double*, double*))
13
+
1
14
  2015-07-08 vaiorabbit <http://twitter.com/vaiorabbit>
2
15
 
3
16
  * Updated using latest gl.xml.
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ...and wrapper code generator.
6
6
 
7
7
  * Created : 2013-08-28
8
- * Last modified : 2015-07-08
8
+ * Last modified : 2015-07-30
9
9
 
10
10
 
11
11
  ## Features ##
@@ -116,6 +116,7 @@ Use GLFW or GLUT for creating windows and OpenGL rendering contexts.
116
116
  * ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin12.0]
117
117
  * ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin13.0.0]
118
118
  * ruby 2.0.0p247 (2013-06-27) [i386-mingw32]
119
+ * ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
119
120
 
120
121
  * Windows 7 Home Premium, 64-bit (Service Pack 1)
121
122
  * NVIDIA GeForce GTX 560
@@ -131,10 +132,18 @@ Use GLFW or GLUT for creating windows and OpenGL rendering contexts.
131
132
  $ ruby report_env.rb
132
133
  2.1 NVIDIA-8.12.47 310.40.00.05f01
133
134
 
134
- * Though I have not tested on Linux yet, it should work with proper 'OpenGL.load_dll' settings like:
135
- * OpenGL.load_dll( 'libGL.so', '/usr/lib' )
136
- * GLFW.load_dll( 'libGLFW.so', '.' )
135
+ * Arch Linux kernel 4.1.2-2-ARCH, x86_64
136
+ * NVIDIA GeForce GTS 450
137
+ * 4.5.0
137
138
 
139
+ $ ruby report_env.rb
140
+ Version: 4.5.0 NVIDIA 352.21
141
+
142
+ * You can use any lib/path names by passing as arguments like:
143
+ * OpenGL.load_lib( 'libGL.so', '/usr/lib' )
144
+ * GLFW.load_lib( 'libglfw.so', '/usr/lib' )
145
+ * GLU.load_lib( 'libGLU.so', '/usr/lib' )
146
+ * GLUT.load_lib( 'libglut.so', '/usr/lib' )
138
147
 
139
148
  ## Note ##
140
149
 
@@ -302,6 +311,7 @@ GLFW か GLUT を用意してください。ウィンドウやレンダリング
302
311
  * ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin12.0]
303
312
  * ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin13.0.0]
304
313
  * ruby 2.0.0p247 (2013-06-27) [i386-mingw32]
314
+ * ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
305
315
 
306
316
  * Windows 7 Home Premium, 64-bit (Service Pack 1)
307
317
  * NVIDIA GeForce GTX 560
@@ -317,9 +327,18 @@ GLFW か GLUT を用意してください。ウィンドウやレンダリング
317
327
  $ ruby report_env.rb
318
328
  2.1 NVIDIA-8.12.47 310.40.00.05f01
319
329
 
320
- * まだ Linux では動作確認していませんが、'OpenGL.load_dll' などの引数が正しければ動くはず…
321
- * OpenGL.load_dll( 'libGL.so', '/usr/lib' )
322
- * GLFW.load_dll( 'libGLFW.so', '.' )
330
+ * Arch Linux kernel 4.1.2-2-ARCH, x86_64
331
+ * NVIDIA GeForce GTS 450
332
+ * 4.5.0
333
+
334
+ $ ruby report_env.rb
335
+ Version: 4.5.0 NVIDIA 352.21
336
+
337
+ * 引数として渡すことで任意のライブラリ名/パス名を利用できます:
338
+ * OpenGL.load_lib( 'libGL.so', '/usr/lib' )
339
+ * GLFW.load_lib( 'libglfw.so', '/usr/lib' )
340
+ * GLU.load_lib( 'libGLU.so', '/usr/lib' )
341
+ * GLUT.load_lib( 'libglut.so', '/usr/lib' )
323
342
 
324
343
 
325
344
  ## メモ ##
data/lib/glfw.rb CHANGED
@@ -333,7 +333,7 @@ module GLFW
333
333
  @@glfw_import_done = false
334
334
 
335
335
  # Load native library.
336
- def self.load_dll(lib = nil, path = nil)
336
+ def self.load_lib(lib = nil, path = nil)
337
337
  if lib == nil && path == nil
338
338
  case OpenGL.get_platform
339
339
  when :OPENGL_PLATFORM_WINDOWS
@@ -349,6 +349,11 @@ module GLFW
349
349
  import_symbols() unless @@glfw_import_done
350
350
  end
351
351
 
352
+ def self.load_dll(lib = nil, path = nil)
353
+ puts "Warning GLFW.load_dll is deprecated, use GLFW.load_lib instead"
354
+ self.load_lib(lib, path)
355
+ end
356
+
352
357
  def self.import_symbols
353
358
  # function
354
359
  extern 'int glfwInit()'
@@ -402,7 +407,7 @@ module GLFW
402
407
  extern 'void glfwSetInputMode(void*, int, int)'
403
408
  extern 'int glfwGetKey(void*, int)'
404
409
  extern 'int glfwGetMouseButton(void*, int)'
405
- extern 'void glfwGetCursorPos(void*, void*, void*)'
410
+ extern 'void glfwGetCursorPos(void*, double*, double*)'
406
411
  extern 'void glfwSetCursorPos(void*, double, double)'
407
412
  extern 'void* glfwCreateCursor(void*, int, int)'
408
413
  extern 'void* glfwCreateStandardCursor(int)'
data/lib/glfw30.rb CHANGED
@@ -310,7 +310,7 @@ module GLFW
310
310
  @@glfw_import_done = false
311
311
 
312
312
  # Load native library.
313
- def self.load_dll(lib = nil, path = nil)
313
+ def self.load_lib(lib = nil, path = nil)
314
314
  if lib == nil && path == nil
315
315
  case OpenGL.get_platform
316
316
  when :OPENGL_PLATFORM_WINDOWS
@@ -326,6 +326,11 @@ module GLFW
326
326
  import_symbols() unless @@glfw_import_done
327
327
  end
328
328
 
329
+ def self.load_dll(lib = nil, path = nil)
330
+ puts "Warning GLFW.load_dll is deprecated, use GLFW.load_lib instead"
331
+ self.load_lib(lib, path)
332
+ end
333
+
329
334
  def self.import_symbols
330
335
  # function
331
336
  extern 'int glfwInit()'
@@ -377,7 +382,7 @@ module GLFW
377
382
  extern 'void glfwSetInputMode(void*, int, int)'
378
383
  extern 'int glfwGetKey(void*, int)'
379
384
  extern 'int glfwGetMouseButton(void*, int)'
380
- extern 'void glfwGetCursorPos(void*, void*, void*)'
385
+ extern 'void glfwGetCursorPos(void*, double*, double*)'
381
386
  extern 'void glfwSetCursorPos(void*, double, double)'
382
387
  extern 'void* glfwSetKeyCallback(void*, void*)'
383
388
  extern 'void* glfwSetCharCallback(void*, void*)'
data/lib/glu.rb CHANGED
@@ -250,7 +250,7 @@ module GLU
250
250
  @@glu_import_done = false
251
251
 
252
252
  # Load native library.
253
- def self.load_dll(lib = nil, path = nil)
253
+ def self.load_lib(lib = nil, path = nil)
254
254
  if lib == nil && path == nil
255
255
  case OpenGL.get_platform
256
256
  when :OPENGL_PLATFORM_WINDOWS
@@ -269,6 +269,11 @@ module GLU
269
269
  import_symbols() unless @@glu_import_done
270
270
  end
271
271
 
272
+ def self.load_dll(lib = nil, path = nil)
273
+ puts "Warning GLU.load_dll is deprecated, use GLU.load_lib instead"
274
+ self.load_lib(lib, path)
275
+ end
276
+
272
277
  def self.import_symbols
273
278
  # function
274
279
  extern 'void gluBeginCurve (void*)'
data/lib/glut.rb CHANGED
@@ -262,7 +262,7 @@ module GLUT
262
262
  @@glut_import_done = false
263
263
 
264
264
  # Load native library.
265
- def self.load_dll(lib = nil, path = nil)
265
+ def self.load_lib(lib = nil, path = nil)
266
266
  if lib == nil && path == nil
267
267
  case OpenGL.get_platform
268
268
  when :OPENGL_PLATFORM_WINDOWS
@@ -281,6 +281,11 @@ module GLUT
281
281
  import_symbols() unless @@glut_import_done
282
282
  end
283
283
 
284
+ def self.load_dll(lib = nil, path = nil)
285
+ puts "Warning GLUT.load_dll is deprecated, use GLUT.load_lib instead"
286
+ self.load_lib(lib, path)
287
+ end
288
+
284
289
  def self.import_symbols
285
290
  # defines
286
291
  if OpenGL.get_platform == :OPENGL_PLATFORM_WINDOWS
data/lib/opengl_common.rb CHANGED
@@ -5,7 +5,7 @@ module OpenGL
5
5
  GL_FUNCTIONS_RETVAL_MAP = {}
6
6
  @@gl_dll = nil
7
7
 
8
- def self.load_dll(lib = nil, path = nil)
8
+ def self.load_lib(lib = nil, path = nil)
9
9
  if lib == nil && path == nil
10
10
  case self.get_platform
11
11
  when :OPENGL_PLATFORM_WINDOWS
@@ -23,6 +23,11 @@ module OpenGL
23
23
  end
24
24
  end
25
25
 
26
+ def self.load_dll(lib = nil, path = nil)
27
+ puts "Warning OpenGl.load_dll is deprecated, use OpenGL.load_lib instead"
28
+ self.load_lib(lib, path)
29
+ end
30
+
26
31
  def self.get_command( sym )
27
32
  if GL_FUNCTIONS_MAP[sym] == nil
28
33
  bind_command( sym )
@@ -15704,6 +15704,17 @@ module OpenGL
15704
15704
  SRC_GL_NV_conservative_raster
15705
15705
  end # define_ext_command_GL_NV_conservative_raster
15706
15706
 
15707
+ def define_ext_command_GL_NV_conservative_raster_dilate
15708
+ GL_FUNCTIONS_ARGS_MAP[:glConservativeRasterParameterfNV] = [-Fiddle::TYPE_INT, Fiddle::TYPE_FLOAT]
15709
+ GL_FUNCTIONS_RETVAL_MAP[:glConservativeRasterParameterfNV] = Fiddle::TYPE_VOID
15710
+ module_eval(<<-SRC_GL_NV_conservative_raster_dilate)
15711
+ def glConservativeRasterParameterfNV(_pname_, _value_)
15712
+ f = OpenGL::get_command(:glConservativeRasterParameterfNV)
15713
+ f.call(_pname_, _value_)
15714
+ end
15715
+ SRC_GL_NV_conservative_raster_dilate
15716
+ end # define_ext_command_GL_NV_conservative_raster_dilate
15717
+
15707
15718
  def define_ext_command_GL_NV_copy_depth_to_color
15708
15719
  end # define_ext_command_GL_NV_copy_depth_to_color
15709
15720
 
@@ -4001,6 +4001,12 @@ module OpenGL
4001
4001
  const_set('GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV', 0x9349) unless defined?(GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV)
4002
4002
  end # define_ext_enum_GL_NV_conservative_raster
4003
4003
 
4004
+ def define_ext_enum_GL_NV_conservative_raster_dilate
4005
+ const_set('GL_CONSERVATIVE_RASTER_DILATE_NV', 0x9379) unless defined?(GL_CONSERVATIVE_RASTER_DILATE_NV)
4006
+ const_set('GL_CONSERVATIVE_RASTER_DILATE_RANGE_NV', 0x937A) unless defined?(GL_CONSERVATIVE_RASTER_DILATE_RANGE_NV)
4007
+ const_set('GL_CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV', 0x937B) unless defined?(GL_CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV)
4008
+ end # define_ext_enum_GL_NV_conservative_raster_dilate
4009
+
4004
4010
  def define_ext_enum_GL_NV_copy_depth_to_color
4005
4011
  const_set('GL_DEPTH_STENCIL_TO_RGBA_NV', 0x886E) unless defined?(GL_DEPTH_STENCIL_TO_RGBA_NV)
4006
4012
  const_set('GL_DEPTH_STENCIL_TO_BGRA_NV', 0x886F) unless defined?(GL_DEPTH_STENCIL_TO_BGRA_NV)
data/sample/report_env.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  require 'opengl'
2
2
  require 'glfw'
3
3
 
4
- OpenGL.load_dll()
5
- GLFW.load_dll()
4
+ OpenGL.load_lib()
5
+ GLFW.load_lib()
6
6
 
7
7
  include OpenGL
8
8
  include GLFW
@@ -1,8 +1,8 @@
1
1
  require 'opengl_es'
2
2
  require 'glfw'
3
3
 
4
- OpenGL.load_dll()
5
- GLFW.load_dll()
4
+ OpenGL.load_lib()
5
+ GLFW.load_lib()
6
6
 
7
7
  include OpenGL
8
8
  include GLFW
data/sample/simple.rb CHANGED
@@ -6,8 +6,8 @@
6
6
  require 'opengl'
7
7
  require 'glfw'
8
8
 
9
- OpenGL.load_dll()
10
- GLFW.load_dll()
9
+ OpenGL.load_lib()
10
+ GLFW.load_lib()
11
11
 
12
12
  include OpenGL
13
13
  include GLFW
@@ -6,8 +6,8 @@
6
6
  require 'opengl'
7
7
  require 'glut'
8
8
 
9
- OpenGL.load_dll()
10
- GLUT.load_dll()
9
+ OpenGL.load_lib()
10
+ GLUT.load_lib()
11
11
 
12
12
  include OpenGL
13
13
  include GLUT
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opengl-bindings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.14
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaiorabbit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-08 00:00:00.000000000 Z
11
+ date: 2015-08-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  Ruby bindings for OpenGL - 4.5, OpenGL ES - 3.1 and all extensions using Fiddle (For MRI >= 2.0.0).