opengl-bindings2 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16be3a81c5fbf96a20cc33fcd549bbd48c68199abf9548cd9be79f4bf578a021
4
- data.tar.gz: 3031242acfe6f9305f6bd136b759aec59b05e58eec5e3980645e4b288a64c43e
3
+ metadata.gz: 0cc3a4c9147b1736b13cb490c65daef1a9348f11637f2efeb9690890e142fd51
4
+ data.tar.gz: 1273c3f25c0371ee6a9dc9bab7cedef088bca63a2b6c3adb29de4278e32168f3
5
5
  SHA512:
6
- metadata.gz: 27541cbd15a3fcf5f2f4870e02a6428b8539194e8a8cc6016d13346c7d316b35f73bf5727a978d1368be3928301c89e219886039da44d0a56916a991f8892682
7
- data.tar.gz: 66e60199e351756db7e10d00adbf71e35198df57776d8f4d9fc8ef2944c317a532f3102629f8ef32811511cd696d00871be5fd09143d9354b72c0bd5b36be3bf
6
+ metadata.gz: b2bbcbc8731a2c48a21b2e4bab46655fc5e77382544ed93471de7d8794050ea9f6013d4f6449b5e526d7e265006837432675bf343de6c4b897a957c2b85a2808
7
+ data.tar.gz: 298d05790c1434a9f3f1e48c9eb6a2a57f6a9c215f5e1f5a203bb8ba103d4cd9c1fcd68b494344706a89fcb4f5c554e0349120091aea873a12f81233fb3cb26a
data/ChangeLog CHANGED
@@ -1,3 +1,11 @@
1
+ 2025-01-01 vaiorabbit <http://twitter.com/vaiorabbit>
2
+
3
+ * Updated documents
4
+
5
+ 2024-02-25 vaiorabbit <http://twitter.com/vaiorabbit>
6
+
7
+ * GLFW 3.4
8
+
1
9
  2024-01-05 vaiorabbit <http://twitter.com/vaiorabbit>
2
10
 
3
11
  * Updated using latest gl.xml
data/LICENSE.txt CHANGED
@@ -1,5 +1,5 @@
1
1
  Ruby-OpenGL : Yet another OpenGL wrapper for Ruby (and wrapper code generator)
2
- Copyright (c) 2013-2024 vaiorabbit <http://twitter.com/vaiorabbit>
2
+ Copyright (c) 2013-2025 vaiorabbit <http://twitter.com/vaiorabbit>
3
3
 
4
4
  This software is provided 'as-is', without any express or implied
5
5
  warranty. In no event will the authors be held liable for any damages
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 : 2024-01-05
8
+ * Last modified : 2025-01-01
9
9
 
10
10
  <img src="https://raw.githubusercontent.com/vaiorabbit/ruby-opengl/master/doc/simple_rb.jpg" width="200"> <img src="https://raw.githubusercontent.com/vaiorabbit/ruby-opengl/master/doc/nehe_lesson36_rb.jpg" width="200"> <img src="https://raw.githubusercontent.com/vaiorabbit/ruby-opengl/master/doc/brick_rb.jpg" width="200"> <img src="https://raw.githubusercontent.com/vaiorabbit/ruby-opengl/master/doc/glxs_rb.jpg" width="200">
11
11
 
@@ -79,7 +79,7 @@ module GL
79
79
  * Version 2 [![Gem Version](https://badge.fury.io/rb/opengl-bindings2.svg)](https://badge.fury.io/rb/opengl-bindings2) [![Gem](https://img.shields.io/gem/dt/opengl-bindings2.svg)](opengl-bindings2)
80
80
  * Version 1 [![Gem Version](https://badge.fury.io/rb/opengl-bindings.svg)](https://badge.fury.io/rb/opengl-bindings) [![Gem](https://img.shields.io/gem/dt/opengl-bindings.svg)](opengl-bindings)
81
81
 
82
- * Uses Fiddle (One of the Ruby standard libraries that wraps libffi)
82
+ * Uses Fiddle (One of the Ruby libraries that wraps libffi)
83
83
  * Unlike opengl ( https://rubygems.org/gems/opengl ), you don't need to build C extension library
84
84
 
85
85
  * Uses Khronos XML API registry ( https://github.com/KhronosGroup/OpenGL-Registry )
@@ -154,7 +154,6 @@ https://github.com/vaiorabbit/ruby-opengl
154
154
 
155
155
  * Fiddle
156
156
  * A libffi wrapper
157
- * Standard library since Ruby 2.0.0
158
157
  * I recommend you to use Ruby 2.1.2 and later, which fixed Fiddle's memory leak issue (https://bugs.ruby-lang.org/issues/9599).
159
158
 
160
159
  ### For sample ###
@@ -173,27 +172,24 @@ Use GLFW or GLUT for creating windows and OpenGL rendering contexts.
173
172
  ## Tested Environment ##
174
173
 
175
174
  * Ruby
176
- * ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
175
+ * ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x64-mingw-ucrt]
176
+ * ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [arm64-darwin24]
177
177
 
178
- * Windows 10 Home, 64-bit (Version 1909, OS Build 18363.778)
179
- * NVIDIA GeForce RTX 2060 SUPER
180
- * OpenGL 4.5
178
+ * Windows 11 Pro (Version 24H2, OS Build 26100.2605)
181
179
 
182
- > ruby report_env.rb
183
- Version : 4.5.0 NVIDIA 436.30
184
- Vendor : NVIDIA Corporation
185
- Renderer : GeForce RTX 2060 SUPER/PCIe/SSE2
186
- Shader : 4.50 NVIDIA
180
+ > ruby report_env.rb
181
+ Version : 4.5.0 NVIDIA 560.94
182
+ Vendor : NVIDIA Corporation
183
+ Renderer : NVIDIA GeForce RTX 4080 Laptop GPU/PCIe/SSE2
184
+ Shader : 4.50 NVIDIA
187
185
 
188
- * macOS 12.5.1, 64-bit
189
- * Mac mini (M1 2020)
190
- * OpenGL 4.1
186
+ * macOS 15.2 / Mac mini (M1 2020)
191
187
 
192
- $ ruby report_env.rb
193
- Version : 4.1 Metal - 76.3
194
- Vendor : Apple
195
- Renderer : Apple M1
196
- Shader : 4.10
188
+ $ ruby report_env.rb
189
+ Version : 4.1 Metal - 89.3
190
+ Vendor : Apple
191
+ Renderer : Apple M1
192
+ Shader : 4.10
197
193
 
198
194
  * Arch Linux kernel 4.1.2-2-ARCH, Nvidia Driver, x86_64
199
195
  * NVIDIA GeForce GTS 450
@@ -213,6 +209,7 @@ Use GLFW or GLUT for creating windows and OpenGL rendering contexts.
213
209
  <summary>Older versions</summary>
214
210
 
215
211
  * Ruby
212
+ * ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
216
213
  * ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin21]
217
214
  * ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin20]
218
215
  * ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x64-mingw32]
@@ -244,6 +241,16 @@ Use GLFW or GLUT for creating windows and OpenGL rendering contexts.
244
241
  * ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin13.0.0]
245
242
  * ruby 2.0.0p247 (2013-06-27) [i386-mingw32]
246
243
 
244
+ * Windows 10 Home, 64-bit (Version 1909, OS Build 18363.778)
245
+ * NVIDIA GeForce RTX 2060 SUPER
246
+ * OpenGL 4.5
247
+
248
+ > ruby report_env.rb
249
+ Version : 4.5.0 NVIDIA 436.30
250
+ Vendor : NVIDIA Corporation
251
+ Renderer : GeForce RTX 2060 SUPER/PCIe/SSE2
252
+ Shader : 4.50 NVIDIA
253
+
247
254
  * Windows 10 Home, 64-bit (Version 1511, OS Build 10586.164)
248
255
  * NVIDIA GeForce GTX 960
249
256
  * OpenGL 4.5
@@ -289,6 +296,16 @@ Use GLFW or GLUT for creating windows and OpenGL rendering contexts.
289
296
  Renderer : Intel Iris OpenGL Engine
290
297
  Shader : 4.10
291
298
 
299
+ * macOS 12.5.1, 64-bit
300
+ * Mac mini (M1 2020)
301
+ * OpenGL 4.1
302
+
303
+ $ ruby report_env.rb
304
+ Version : 4.1 Metal - 76.3
305
+ Vendor : Apple
306
+ Renderer : Apple M1
307
+ Shader : 4.10
308
+
292
309
  </details>
293
310
 
294
311
  ## Note ##
@@ -322,7 +339,7 @@ Use GLFW or GLUT for creating windows and OpenGL rendering contexts.
322
339
  * https://github.com/mirichi/dxsdl2r
323
340
  * mittsu - A direct port of THREE.js from JavaScript/WebGL to Ruby/OpenGL
324
341
  * https://rubygems.org/gems/mittsu
325
- * https://github.com/jellymann/mittsu
342
+ * https://github.com/danini-the-panini/mittsu
326
343
  * open.gl.rb - A port of the https://open.gl/ tutorials to Ruby
327
344
  * https://github.com/mechazoidal/opendotgl_rb
328
345
  * opencl-bindings - A Ruby binding for OpenCL 1.2
@@ -350,7 +367,7 @@ Use GLFW or GLUT for creating windows and OpenGL rendering contexts.
350
367
 
351
368
  The zlib/libpng License ( http://opensource.org/licenses/Zlib ).
352
369
 
353
- Copyright (c) 2013-2024 vaiorabbit <http://twitter.com/vaiorabbit>
370
+ Copyright (c) 2013-2025 vaiorabbit <http://twitter.com/vaiorabbit>
354
371
 
355
372
  This software is provided 'as-is', without any express or implied
356
373
  warranty. In no event will the authors be held liable for any damages
@@ -446,7 +463,7 @@ module GL
446
463
 
447
464
  ## 特徴 ##
448
465
 
449
- * 標準ライブラリ Fiddle を使っています ⇒ opengl ( https://rubygems.org/gems/opengl ) のように拡張ライブラリをビルドする必要がありません
466
+ * Fiddle を使っています ⇒ opengl ( https://rubygems.org/gems/opengl ) のように拡張ライブラリをビルドする必要がありません
450
467
  * 関数とenumのラッパーコードは Khronos の XML API registry ( https://github.com/KhronosGroup/OpenGL-Registry ) の gl.xml から自動生成しています
451
468
 
452
469
 
@@ -518,7 +535,6 @@ https://github.com/vaiorabbit/ruby-opengl
518
535
 
519
536
  * Fiddle
520
537
  * libffi のラッパーです
521
- * Ruby 2.0.0 以降で標準ライブラリになりました
522
538
  * Fiddle のメモリリーク問題 (https://bugs.ruby-lang.org/issues/9599) が修正された Ruby 2.1.2 以降での利用を推奨します
523
539
 
524
540
  ### サンプル用 ###
@@ -537,27 +553,24 @@ GLFW か GLUT を用意してください。ウィンドウやレンダリング
537
553
  ## テストした環境 ##
538
554
 
539
555
  * Ruby
540
- * ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
556
+ * ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x64-mingw-ucrt]
557
+ * ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [arm64-darwin24]
541
558
 
542
- * Windows 10 Home, 64-bit (Version 1909, OS Build 18363.778)
543
- * NVIDIA GeForce RTX 2060 SUPER
544
- * OpenGL 4.5
559
+ * Windows 11 Pro (Version 24H2, OS Build 26100.2605)
545
560
 
546
- > ruby report_env.rb
547
- Version : 4.5.0 NVIDIA 436.30
548
- Vendor : NVIDIA Corporation
549
- Renderer : GeForce RTX 2060 SUPER/PCIe/SSE2
550
- Shader : 4.50 NVIDIA
561
+ > ruby report_env.rb
562
+ Version : 4.5.0 NVIDIA 560.94
563
+ Vendor : NVIDIA Corporation
564
+ Renderer : NVIDIA GeForce RTX 4080 Laptop GPU/PCIe/SSE2
565
+ Shader : 4.50 NVIDIA
551
566
 
552
- * macOS 12.5.1, 64-bit
553
- * Mac mini (M1 2020)
554
- * OpenGL 4.1
567
+ * macOS 15.2 / Mac mini (M1 2020)
555
568
 
556
- $ ruby report_env.rb
557
- Version : 4.1 Metal - 76.3
558
- Vendor : Apple
559
- Renderer : Apple M1
560
- Shader : 4.10
569
+ $ ruby report_env.rb
570
+ Version : 4.1 Metal - 89.3
571
+ Vendor : Apple
572
+ Renderer : Apple M1
573
+ Shader : 4.10
561
574
 
562
575
  * Arch Linux kernel 4.1.2-2-ARCH, Nvidia Driver, x86_64
563
576
  * NVIDIA GeForce GTS 450
@@ -577,6 +590,7 @@ GLFW か GLUT を用意してください。ウィンドウやレンダリング
577
590
  <summary>以前のバージョン</summary>
578
591
 
579
592
  * Ruby
593
+ * ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
580
594
  * ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin21]
581
595
  * ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin20]
582
596
  * ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x64-mingw32]
@@ -608,6 +622,16 @@ GLFW か GLUT を用意してください。ウィンドウやレンダリング
608
622
  * ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin13.0.0]
609
623
  * ruby 2.0.0p247 (2013-06-27) [i386-mingw32]
610
624
 
625
+ * Windows 10 Home, 64-bit (Version 1909, OS Build 18363.778)
626
+ * NVIDIA GeForce RTX 2060 SUPER
627
+ * OpenGL 4.5
628
+
629
+ > ruby report_env.rb
630
+ Version : 4.5.0 NVIDIA 436.30
631
+ Vendor : NVIDIA Corporation
632
+ Renderer : GeForce RTX 2060 SUPER/PCIe/SSE2
633
+ Shader : 4.50 NVIDIA
634
+
611
635
  * Windows 10 Home, 64-bit (Version 1511, OS Build 10586.164)
612
636
  * NVIDIA GeForce GTX 960
613
637
  * OpenGL 4.5
@@ -653,6 +677,16 @@ GLFW か GLUT を用意してください。ウィンドウやレンダリング
653
677
  Renderer : Intel Iris OpenGL Engine
654
678
  Shader : 4.10
655
679
 
680
+ * macOS 12.5.1, 64-bit
681
+ * Mac mini (M1 2020)
682
+ * OpenGL 4.1
683
+
684
+ $ ruby report_env.rb
685
+ Version : 4.1 Metal - 76.3
686
+ Vendor : Apple
687
+ Renderer : Apple M1
688
+ Shader : 4.10
689
+
656
690
  </details>
657
691
 
658
692
  ## メモ ##
data/lib/glfw.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # A GLFW wrapper (for version 3.0 - 3.3)
2
+ # A GLFW wrapper (for version 3.4)
3
3
  require 'fiddle/import'
4
4
 
5
5
  module GLFW
@@ -217,17 +217,21 @@ module GLFW
217
217
  GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER = 5 # Available since GLFW 3.3
218
218
  GLFW_GAMEPAD_AXIS_LAST = GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER # Available since GLFW 3.3
219
219
 
220
- GLFW_NO_ERROR = 0 # Available since GLFW 3.3
221
- GLFW_NOT_INITIALIZED = 0x00010001
222
- GLFW_NO_CURRENT_CONTEXT = 0x00010002
223
- GLFW_INVALID_ENUM = 0x00010003
224
- GLFW_INVALID_VALUE = 0x00010004
225
- GLFW_OUT_OF_MEMORY = 0x00010005
226
- GLFW_API_UNAVAILABLE = 0x00010006
227
- GLFW_VERSION_UNAVAILABLE = 0x00010007
228
- GLFW_PLATFORM_ERROR = 0x00010008
229
- GLFW_FORMAT_UNAVAILABLE = 0x00010009
230
- GLFW_NO_WINDOW_CONTEXT = 0x0001000A # Available since GLFW 3.2
220
+ GLFW_NO_ERROR = 0 # Available since GLFW 3.3
221
+ GLFW_NOT_INITIALIZED = 0x00010001
222
+ GLFW_NO_CURRENT_CONTEXT = 0x00010002
223
+ GLFW_INVALID_ENUM = 0x00010003
224
+ GLFW_INVALID_VALUE = 0x00010004
225
+ GLFW_OUT_OF_MEMORY = 0x00010005
226
+ GLFW_API_UNAVAILABLE = 0x00010006
227
+ GLFW_VERSION_UNAVAILABLE = 0x00010007
228
+ GLFW_PLATFORM_ERROR = 0x00010008
229
+ GLFW_FORMAT_UNAVAILABLE = 0x00010009
230
+ GLFW_NO_WINDOW_CONTEXT = 0x0001000A # Available since GLFW 3.2
231
+ GLFW_CURSOR_UNAVAILABLE = 0x0001000B # Available since GLFW 3.4
232
+ GLFW_FEATURE_UNAVAILABLE = 0x0001000C # Available since GLFW 3.4
233
+ GLFW_FEATURE_UNIMPLEMENTED = 0x0001000D # Available since GLFW 3.4
234
+ GLFW_PLATFORM_UNAVAILABLE = 0x0001000E # Available since GLFW 3.4
231
235
 
232
236
  GLFW_FOCUSED = 0x00020001
233
237
  GLFW_ICONIFIED = 0x00020002
@@ -241,6 +245,9 @@ module GLFW
241
245
  GLFW_TRANSPARENT_FRAMEBUFFER = 0x0002000A # Available since GLFW 3.3
242
246
  GLFW_HOVERED = 0x0002000B # Available since GLFW 3.3
243
247
  GLFW_FOCUS_ON_SHOW = 0x0002000C # Available since GLFW 3.3
248
+ GLFW_MOUSE_PASSTHROUGH = 0x0002000D # Available since GLFW 3.4
249
+ GLFW_POSITION_X = 0x0002000E # Available since GLFW 3.4
250
+ GLFW_POSITION_Y = 0x0002000F # Available since GLFW 3.4
244
251
 
245
252
  GLFW_RED_BITS = 0x00021001
246
253
  GLFW_GREEN_BITS = 0x00021002
@@ -265,12 +272,14 @@ module GLFW
265
272
  GLFW_CONTEXT_REVISION = 0x00022004
266
273
  GLFW_CONTEXT_ROBUSTNESS = 0x00022005
267
274
  GLFW_OPENGL_FORWARD_COMPAT = 0x00022006
268
- GLFW_OPENGL_DEBUG_CONTEXT = 0x00022007
275
+ GLFW_CONTEXT_DEBUG = 0x00022007 # Renamed from GLFW_OPENGL_DEBUG_CONTEXT since GLFW 3.4
276
+ GLFW_OPENGL_DEBUG_CONTEXT = GLFW_CONTEXT_DEBUG # Legacy name for compatibility added since GLFW 3.4
269
277
  GLFW_OPENGL_PROFILE = 0x00022008
270
278
  GLFW_CONTEXT_RELEASE_BEHAVIOR = 0x00022009
271
279
  GLFW_CONTEXT_NO_ERROR = 0x0002200A
272
280
  GLFW_CONTEXT_CREATION_API = 0x0002200B # Available since GLFW 3.2
273
281
  GLFW_SCALE_TO_MONITOR = 0x0002200C # Available since GLFW 3.3
282
+ GLFW_SCALE_FRAMEBUFFER = 0x0002200D # Available since GLFW 3.4
274
283
 
275
284
  GLFW_COCOA_RETINA_FRAMEBUFFER = 0x00023001 # Available since GLFW 3.3
276
285
  GLFW_COCOA_FRAME_NAME = 0x00023002 # Available since GLFW 3.3
@@ -278,6 +287,9 @@ module GLFW
278
287
 
279
288
  GLFW_X11_CLASS_NAME = 0x00024001 # Available since GLFW 3.3
280
289
  GLFW_X11_INSTANCE_NAME = 0x00024002 # Available since GLFW 3.3
290
+ GLFW_WIN32_KEYBOARD_MENU = 0x00025001 # Available since GLFW 3.4
291
+ GLFW_WIN32_SHOWDEFAULT = 0x00025002 # Available since GLFW 3.4
292
+ GLFW_WAYLAND_APP_ID = 0x00026001 # Available since GLFW 3.4
281
293
 
282
294
  GLFW_NO_API = 0 # Available since GLFW 3.2
283
295
  GLFW_OPENGL_API = 0x00030001
@@ -300,6 +312,7 @@ module GLFW
300
312
  GLFW_CURSOR_NORMAL = 0x00034001
301
313
  GLFW_CURSOR_HIDDEN = 0x00034002
302
314
  GLFW_CURSOR_DISABLED = 0x00034003
315
+ GLFW_CURSOR_CAPTURED = 0x00034004 # Available since GLFW 3.4
303
316
 
304
317
  GLFW_ANY_RELEASE_BEHAVIOR = 0
305
318
  GLFW_RELEASE_BEHAVIOR_FLUSH = 0x00035001
@@ -309,26 +322,56 @@ module GLFW
309
322
  GLFW_EGL_CONTEXT_API = 0x00036002 # Available since GLFW 3.2
310
323
  GLFW_OSMESA_CONTEXT_API = 0x00036003 # Available since GLFW 3.3
311
324
 
325
+ GLFW_ANGLE_PLATFORM_TYPE_NONE = 0x00037001 # Available since GLFW 3.4
326
+ GLFW_ANGLE_PLATFORM_TYPE_OPENGL = 0x00037002 # Available since GLFW 3.4
327
+ GLFW_ANGLE_PLATFORM_TYPE_OPENGLES = 0x00037003 # Available since GLFW 3.4
328
+ GLFW_ANGLE_PLATFORM_TYPE_D3D9 = 0x00037004 # Available since GLFW 3.4
329
+ GLFW_ANGLE_PLATFORM_TYPE_D3D11 = 0x00037005 # Available since GLFW 3.4
330
+ GLFW_ANGLE_PLATFORM_TYPE_VULKAN = 0x00037007 # Available since GLFW 3.4
331
+ GLFW_ANGLE_PLATFORM_TYPE_METAL = 0x00037008 # Available since GLFW 3.4
332
+
312
333
  GLFW_WAYLAND_PREFER_LIBDECOR = 0x00038001 # Available since GLFW 3.3.9
313
334
  GLFW_WAYLAND_DISABLE_LIBDECOR = 0x00038002 # Available since GLFW 3.3.9
314
335
 
315
- GLFW_ARROW_CURSOR = 0x00036001
316
- GLFW_IBEAM_CURSOR = 0x00036002
317
- GLFW_CROSSHAIR_CURSOR = 0x00036003
318
- GLFW_HAND_CURSOR = 0x00036004
319
- GLFW_HRESIZE_CURSOR = 0x00036005
320
- GLFW_VRESIZE_CURSOR = 0x00036006
336
+ GLFW_ANY_POSITION = 0x80000000 # Available since GLFW 3.4
337
+
338
+ GLFW_ARROW_CURSOR = 0x00036001
339
+ GLFW_IBEAM_CURSOR = 0x00036002
340
+ GLFW_CROSSHAIR_CURSOR = 0x00036003
341
+ GLFW_POINTING_HAND_CURSOR = 0x00036004 # Renamed from GLFW_HAND_CURSOR since GLFW 3.4
342
+ GLFW_RESIZE_EW_CURSOR = 0x00036005 # Renamed from GLFW_HRESIZE_CURSOR since GLFW 3.4
343
+ GLFW_RESIZE_NS_CURSOR = 0x00036006 # Renamed from GLFW_VRESIZE_CURSOR since GLFW 3.4
344
+ GLFW_RESIZE_NWSE_CURSOR = 0x00036007 # Available since GLFW 3.4
345
+ GLFW_RESIZE_NESW_CURSOR = 0x00036008 # Available since GLFW 3.4
346
+ GLFW_RESIZE_ALL_CURSOR = 0x00036009 # Available since GLFW 3.4
347
+ GLFW_NOT_ALLOWED_CURSOR = 0x0003600A # Available since GLFW 3.4
348
+
349
+ GLFW_HRESIZE_CURSOR = GLFW_RESIZE_EW_CURSOR # Legacy name for compatibility added since GLFW 3.4
350
+ GLFW_VRESIZE_CURSOR = GLFW_RESIZE_NS_CURSOR # Legacy name for compatibility added since GLFW 3.4
351
+ GLFW_HAND_CURSOR = GLFW_POINTING_HAND_CURSOR # Legacy name for compatibility added since GLFW 3.4
321
352
 
322
353
  GLFW_CONNECTED = 0x00040001
323
354
  GLFW_DISCONNECTED = 0x00040002
324
355
 
325
356
  GLFW_JOYSTICK_HAT_BUTTONS = 0x00050001 # Available since GLFW 3.3
357
+ GLFW_ANGLE_PLATFORM_TYPE = 0x00050002 # Available since GLFW 3.4
358
+ GLFW_PLATFORM = 0x00050003 # Available since GLFW 3.4
359
+
326
360
 
327
361
  GLFW_COCOA_CHDIR_RESOURCES = 0x00051001 # Available since GLFW 3.3
328
362
  GLFW_COCOA_MENUBAR = 0x00051002 # Available since GLFW 3.3
329
363
 
364
+ GLFW_X11_XCB_VULKAN_SURFACE = 0x00052001 # Available since GLFW 3.4
365
+
330
366
  GLFW_WAYLAND_LIBDECOR = 0x00053001 # Available since GLFW 3.3.9
331
367
 
368
+ GLFW_ANY_PLATFORM = 0x00060000 # Available since GLFW 3.4
369
+ GLFW_PLATFORM_WIN32 = 0x00060001 # Available since GLFW 3.4
370
+ GLFW_PLATFORM_COCOA = 0x00060002 # Available since GLFW 3.4
371
+ GLFW_PLATFORM_WAYLAND = 0x00060003 # Available since GLFW 3.4
372
+ GLFW_PLATFORM_X11 = 0x00060004 # Available since GLFW 3.4
373
+ GLFW_PLATFORM_NULL = 0x00060005 # Available since GLFW 3.4
374
+
332
375
  GLFW_DONT_CARE = -1
333
376
 
334
377
  # typedefs
@@ -441,6 +484,10 @@ module GLFW
441
484
  return self.create_callback_closure( sym, proc, &blk )
442
485
  end
443
486
 
487
+ # NOTE : Memory allocation callbacks addin in GLFW 3.4
488
+ # (GLFWallocatefun, GLFWreallocatefun, GLFWdeallocatefun and struct GLFWallocator)
489
+ # will not be supported in this bindings.
490
+
444
491
  # struct
445
492
  GLFWvidmode = struct(["int width",
446
493
  "int height",
@@ -491,6 +538,8 @@ module GLFW
491
538
  'const char* glfwGetVersionString()',
492
539
  'int glfwGetError(const char**)', # Available since GLFW 3.3
493
540
  'void* glfwSetErrorCallback(void*)',
541
+ 'int glfwGetPlatform()', # Available since GLFW 3.4
542
+ 'int glfwPlatformSupported(int)', # Available since GLFW 3.4
494
543
  'void** glfwGetMonitors(int*)',
495
544
  'void* glfwGetPrimaryMonitor()',
496
545
  'void glfwGetMonitorPos(void*, int*, int*)',
@@ -512,7 +561,8 @@ module GLFW
512
561
  'void* glfwCreateWindow(int, int, const char*, void*, void*)', # Available since GLFW 3.0
513
562
  'void glfwDestroyWindow(void*)', # Available since GLFW 3.0
514
563
  'int glfwWindowShouldClose(void*)', # Available since GLFW 3.0
515
- 'void glfwSetWindowShouldClose(void* window, int)', # Available since GLFW 3.0
564
+ 'void glfwSetWindowShouldClose(void*, int)', # Available since GLFW 3.0
565
+ 'const char* glfwGetWindowTitle(void*)', # Available since GLFW 3.4
516
566
  'void glfwSetWindowTitle(void*, const char*)',
517
567
  'void glfwSetWindowIcon(void*, int, void*)', # Available since GLFW 3.2
518
568
  'void glfwGetWindowPos(void*, int*, int*)', # Available since GLFW 3.0
@@ -605,7 +655,11 @@ module GLFW
605
655
  # 'GLFWvkproc glfwGetInstanceProcAddress(void*, const char*)',
606
656
  # 'int glfwGetPhysicalDevicePresentationSupport(void*, void*, unsigned int)',
607
657
  # 'VkResult glfwCreateWindowSurface(void*, void*, const void*, void*)',
658
+ # 'void glfwInitVulkanLoader(void*)',
608
659
  # <<< Vulkan <<<
660
+ # >>> Allocator >>>
661
+ # 'void glfwInitAllocator(void*)',
662
+ # <<< Allocator <<<
609
663
  ]
610
664
 
611
665
  case GL.get_platform
@@ -617,6 +671,7 @@ module GLFW
617
671
  when :OPENGL_PLATFORM_MACOSX
618
672
  @@lib_signature << 'unsigned int glfwGetCocoaMonitor(void*)'
619
673
  @@lib_signature << 'void* glfwGetCocoaWindow(void*)'
674
+ @@lib_signature << 'void* glfwGetCocoaView(void*)'
620
675
  @@lib_signature << 'void* glfwGetNSGLContext(void*)'
621
676
  when :OPENGL_PLATFORM_LINUX
622
677
  @@lib_signature << 'void* glfwGetX11Display()'
@@ -680,7 +735,7 @@ end
680
735
 
681
736
  =begin
682
737
  Ruby-OpenGL : Yet another OpenGL wrapper for Ruby (and wrapper code generator)
683
- Copyright (c) 2013-2024 vaiorabbit <http://twitter.com/vaiorabbit>
738
+ Copyright (c) 2013-2025 vaiorabbit <http://twitter.com/vaiorabbit>
684
739
 
685
740
  This software is provided 'as-is', without any express or implied
686
741
  warranty. In no event will the authors be held liable for any damages