opengl-bindings2 2.0.1 → 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 +4 -4
- data/ChangeLog +20 -0
- data/LICENSE.txt +1 -1
- data/README.md +89 -45
- data/lib/glfw.rb +81 -21
- data/lib/glfw33.rb +704 -0
- data/lib/glu.rb +1 -1
- data/lib/glut.rb +1 -1
- data/lib/opengl.rb +1 -1
- data/lib/opengl_es.rb +1 -1
- data/lib/opengl_es_ext.rb +1 -1
- data/lib/opengl_es_ext_command.rb +223 -9
- data/lib/opengl_es_ext_enum.rb +100 -9
- data/lib/opengl_ext.rb +1 -1
- data/lib/opengl_ext_command.rb +125 -75
- data/lib/opengl_ext_enum.rb +27 -9
- data/lib/opengl_linux.rb +1 -1
- data/lib/opengl_macosx.rb +1 -1
- data/lib/opengl_platform.rb +1 -1
- data/lib/opengl_windows.rb +1 -1
- data/sample/glfw_get.bat +3 -3
- data/sample/glfw_get.sh +3 -3
- metadata +20 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cc3a4c9147b1736b13cb490c65daef1a9348f11637f2efeb9690890e142fd51
|
4
|
+
data.tar.gz: 1273c3f25c0371ee6a9dc9bab7cedef088bca63a2b6c3adb29de4278e32168f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2bbcbc8731a2c48a21b2e4bab46655fc5e77382544ed93471de7d8794050ea9f6013d4f6449b5e526d7e265006837432675bf343de6c4b897a957c2b85a2808
|
7
|
+
data.tar.gz: 298d05790c1434a9f3f1e48c9eb6a2a57f6a9c215f5e1f5a203bb8ba103d4cd9c1fcd68b494344706a89fcb4f5c554e0349120091aea873a12f81233fb3cb26a
|
data/ChangeLog
CHANGED
@@ -1,3 +1,23 @@
|
|
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
|
+
|
9
|
+
2024-01-05 vaiorabbit <http://twitter.com/vaiorabbit>
|
10
|
+
|
11
|
+
* Updated using latest gl.xml
|
12
|
+
|
13
|
+
2023-12-16 vaiorabbit <http://twitter.com/vaiorabbit>
|
14
|
+
|
15
|
+
* GLFW 3.3.9
|
16
|
+
|
17
|
+
2023-11-11 vaiorabbit <http://twitter.com/vaiorabbit>
|
18
|
+
|
19
|
+
* Updated using latest gl.xml
|
20
|
+
|
1
21
|
2022-12-10 vaiorabbit <http://twitter.com/vaiorabbit>
|
2
22
|
|
3
23
|
* Updated 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-
|
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 :
|
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 [](https://badge.fury.io/rb/opengl-bindings2) [](opengl-bindings2)
|
80
80
|
* Version 1 [](https://badge.fury.io/rb/opengl-bindings) [](opengl-bindings)
|
81
81
|
|
82
|
-
* Uses Fiddle (One of the Ruby
|
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.
|
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
|
179
|
-
* NVIDIA GeForce RTX 2060 SUPER
|
180
|
-
* OpenGL 4.5
|
178
|
+
* Windows 11 Pro (Version 24H2, OS Build 26100.2605)
|
181
179
|
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
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
|
189
|
-
* Mac mini (M1 2020)
|
190
|
-
* OpenGL 4.1
|
186
|
+
* macOS 15.2 / Mac mini (M1 2020)
|
191
187
|
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
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,8 @@ 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]
|
213
|
+
* ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin21]
|
216
214
|
* ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin20]
|
217
215
|
* ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x64-mingw32]
|
218
216
|
* ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [arm64-darwin20]
|
@@ -243,6 +241,16 @@ Use GLFW or GLUT for creating windows and OpenGL rendering contexts.
|
|
243
241
|
* ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin13.0.0]
|
244
242
|
* ruby 2.0.0p247 (2013-06-27) [i386-mingw32]
|
245
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
|
+
|
246
254
|
* Windows 10 Home, 64-bit (Version 1511, OS Build 10586.164)
|
247
255
|
* NVIDIA GeForce GTX 960
|
248
256
|
* OpenGL 4.5
|
@@ -288,6 +296,16 @@ Use GLFW or GLUT for creating windows and OpenGL rendering contexts.
|
|
288
296
|
Renderer : Intel Iris OpenGL Engine
|
289
297
|
Shader : 4.10
|
290
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
|
+
|
291
309
|
</details>
|
292
310
|
|
293
311
|
## Note ##
|
@@ -321,7 +339,7 @@ Use GLFW or GLUT for creating windows and OpenGL rendering contexts.
|
|
321
339
|
* https://github.com/mirichi/dxsdl2r
|
322
340
|
* mittsu - A direct port of THREE.js from JavaScript/WebGL to Ruby/OpenGL
|
323
341
|
* https://rubygems.org/gems/mittsu
|
324
|
-
* https://github.com/
|
342
|
+
* https://github.com/danini-the-panini/mittsu
|
325
343
|
* open.gl.rb - A port of the https://open.gl/ tutorials to Ruby
|
326
344
|
* https://github.com/mechazoidal/opendotgl_rb
|
327
345
|
* opencl-bindings - A Ruby binding for OpenCL 1.2
|
@@ -349,7 +367,7 @@ Use GLFW or GLUT for creating windows and OpenGL rendering contexts.
|
|
349
367
|
|
350
368
|
The zlib/libpng License ( http://opensource.org/licenses/Zlib ).
|
351
369
|
|
352
|
-
Copyright (c) 2013-
|
370
|
+
Copyright (c) 2013-2025 vaiorabbit <http://twitter.com/vaiorabbit>
|
353
371
|
|
354
372
|
This software is provided 'as-is', without any express or implied
|
355
373
|
warranty. In no event will the authors be held liable for any damages
|
@@ -445,7 +463,7 @@ module GL
|
|
445
463
|
|
446
464
|
## 特徴 ##
|
447
465
|
|
448
|
-
*
|
466
|
+
* Fiddle を使っています ⇒ opengl ( https://rubygems.org/gems/opengl ) のように拡張ライブラリをビルドする必要がありません
|
449
467
|
* 関数とenumのラッパーコードは Khronos の XML API registry ( https://github.com/KhronosGroup/OpenGL-Registry ) の gl.xml から自動生成しています
|
450
468
|
|
451
469
|
|
@@ -517,7 +535,6 @@ https://github.com/vaiorabbit/ruby-opengl
|
|
517
535
|
|
518
536
|
* Fiddle
|
519
537
|
* libffi のラッパーです
|
520
|
-
* Ruby 2.0.0 以降で標準ライブラリになりました
|
521
538
|
* Fiddle のメモリリーク問題 (https://bugs.ruby-lang.org/issues/9599) が修正された Ruby 2.1.2 以降での利用を推奨します
|
522
539
|
|
523
540
|
### サンプル用 ###
|
@@ -536,6 +553,45 @@ GLFW か GLUT を用意してください。ウィンドウやレンダリング
|
|
536
553
|
## テストした環境 ##
|
537
554
|
|
538
555
|
* Ruby
|
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]
|
558
|
+
|
559
|
+
* Windows 11 Pro (Version 24H2, OS Build 26100.2605)
|
560
|
+
|
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
|
566
|
+
|
567
|
+
* macOS 15.2 / Mac mini (M1 2020)
|
568
|
+
|
569
|
+
$ ruby report_env.rb
|
570
|
+
Version : 4.1 Metal - 89.3
|
571
|
+
Vendor : Apple
|
572
|
+
Renderer : Apple M1
|
573
|
+
Shader : 4.10
|
574
|
+
|
575
|
+
* Arch Linux kernel 4.1.2-2-ARCH, Nvidia Driver, x86_64
|
576
|
+
* NVIDIA GeForce GTS 450
|
577
|
+
* OpenGL 4.5.0
|
578
|
+
|
579
|
+
$ ruby report_env.rb
|
580
|
+
Version: 4.5.0 NVIDIA 352.21
|
581
|
+
|
582
|
+
* Arch Linux kernel 4.1.4-1-ARCH, Nouveau Driver, x86_64
|
583
|
+
* NVIDIA GeForce GTS 450
|
584
|
+
* OpenGL 3.0
|
585
|
+
|
586
|
+
$ ruby report_env.rb
|
587
|
+
Version: 3.0 Mesa 10.6.3
|
588
|
+
|
589
|
+
<details>
|
590
|
+
<summary>以前のバージョン</summary>
|
591
|
+
|
592
|
+
* Ruby
|
593
|
+
* ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
|
594
|
+
* ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin21]
|
539
595
|
* ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin20]
|
540
596
|
* ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x64-mingw32]
|
541
597
|
* ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [arm64-darwin20]
|
@@ -590,6 +646,13 @@ GLFW か GLUT を用意してください。ウィンドウやレンダリング
|
|
590
646
|
> ruby report_env.rb
|
591
647
|
4.3.0
|
592
648
|
|
649
|
+
* Windows 7 Home Premium, 64-bit (Service Pack 1)
|
650
|
+
* NVIDIA GeForce GTX 560
|
651
|
+
* OpenGL 4.3
|
652
|
+
|
653
|
+
> ruby report_env.rb
|
654
|
+
4.3.0
|
655
|
+
|
593
656
|
* Mac OS X 10.8.4, 64-bit
|
594
657
|
* NVIDIA GeForce 320M on Mac mini (Mid 2010)
|
595
658
|
* OpenGL 2.1
|
@@ -614,7 +677,7 @@ GLFW か GLUT を用意してください。ウィンドウやレンダリング
|
|
614
677
|
Renderer : Intel Iris OpenGL Engine
|
615
678
|
Shader : 4.10
|
616
679
|
|
617
|
-
* macOS 12.1, 64-bit
|
680
|
+
* macOS 12.5.1, 64-bit
|
618
681
|
* Mac mini (M1 2020)
|
619
682
|
* OpenGL 4.1
|
620
683
|
|
@@ -624,26 +687,7 @@ GLFW か GLUT を用意してください。ウィンドウやレンダリング
|
|
624
687
|
Renderer : Apple M1
|
625
688
|
Shader : 4.10
|
626
689
|
|
627
|
-
|
628
|
-
* NVIDIA GeForce GTS 450
|
629
|
-
* OpenGL 4.5.0
|
630
|
-
|
631
|
-
$ ruby report_env.rb
|
632
|
-
Version: 4.5.0 NVIDIA 352.21
|
633
|
-
|
634
|
-
* Arch Linux kernel 4.1.4-1-ARCH, Nouveau Driver, x86_64
|
635
|
-
* NVIDIA GeForce GTS 450
|
636
|
-
* OpenGL 3.0
|
637
|
-
|
638
|
-
$ ruby report_env.rb
|
639
|
-
Version: 3.0 Mesa 10.6.3
|
640
|
-
|
641
|
-
* 引数として渡すことで任意のライブラリ名/パス名を利用できます:
|
642
|
-
* OpenGL.load_lib( 'libGL.so', '/usr/lib' )
|
643
|
-
* GLFW.load_lib( 'libglfw.so', '/usr/lib' )
|
644
|
-
* GLU.load_lib( 'libGLU.so', '/usr/lib' )
|
645
|
-
* GLUT.load_lib( 'libglut.so', '/usr/lib' )
|
646
|
-
|
690
|
+
</details>
|
647
691
|
|
648
692
|
## メモ ##
|
649
693
|
|
data/lib/glfw.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
|
-
# A GLFW wrapper (for version 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
|
221
|
-
GLFW_NOT_INITIALIZED
|
222
|
-
GLFW_NO_CURRENT_CONTEXT
|
223
|
-
GLFW_INVALID_ENUM
|
224
|
-
GLFW_INVALID_VALUE
|
225
|
-
GLFW_OUT_OF_MEMORY
|
226
|
-
GLFW_API_UNAVAILABLE
|
227
|
-
GLFW_VERSION_UNAVAILABLE
|
228
|
-
GLFW_PLATFORM_ERROR
|
229
|
-
GLFW_FORMAT_UNAVAILABLE
|
230
|
-
GLFW_NO_WINDOW_CONTEXT
|
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
|
-
|
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,21 +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
|
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
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
|
+
|
333
|
+
GLFW_WAYLAND_PREFER_LIBDECOR = 0x00038001 # Available since GLFW 3.3.9
|
334
|
+
GLFW_WAYLAND_DISABLE_LIBDECOR = 0x00038002 # Available since GLFW 3.3.9
|
335
|
+
|
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
|
318
352
|
|
319
353
|
GLFW_CONNECTED = 0x00040001
|
320
354
|
GLFW_DISCONNECTED = 0x00040002
|
321
355
|
|
322
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
|
+
|
323
360
|
|
324
361
|
GLFW_COCOA_CHDIR_RESOURCES = 0x00051001 # Available since GLFW 3.3
|
325
362
|
GLFW_COCOA_MENUBAR = 0x00051002 # Available since GLFW 3.3
|
326
363
|
|
364
|
+
GLFW_X11_XCB_VULKAN_SURFACE = 0x00052001 # Available since GLFW 3.4
|
365
|
+
|
366
|
+
GLFW_WAYLAND_LIBDECOR = 0x00053001 # Available since GLFW 3.3.9
|
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
|
+
|
327
375
|
GLFW_DONT_CARE = -1
|
328
376
|
|
329
377
|
# typedefs
|
@@ -436,6 +484,10 @@ module GLFW
|
|
436
484
|
return self.create_callback_closure( sym, proc, &blk )
|
437
485
|
end
|
438
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
|
+
|
439
491
|
# struct
|
440
492
|
GLFWvidmode = struct(["int width",
|
441
493
|
"int height",
|
@@ -486,6 +538,8 @@ module GLFW
|
|
486
538
|
'const char* glfwGetVersionString()',
|
487
539
|
'int glfwGetError(const char**)', # Available since GLFW 3.3
|
488
540
|
'void* glfwSetErrorCallback(void*)',
|
541
|
+
'int glfwGetPlatform()', # Available since GLFW 3.4
|
542
|
+
'int glfwPlatformSupported(int)', # Available since GLFW 3.4
|
489
543
|
'void** glfwGetMonitors(int*)',
|
490
544
|
'void* glfwGetPrimaryMonitor()',
|
491
545
|
'void glfwGetMonitorPos(void*, int*, int*)',
|
@@ -507,7 +561,8 @@ module GLFW
|
|
507
561
|
'void* glfwCreateWindow(int, int, const char*, void*, void*)', # Available since GLFW 3.0
|
508
562
|
'void glfwDestroyWindow(void*)', # Available since GLFW 3.0
|
509
563
|
'int glfwWindowShouldClose(void*)', # Available since GLFW 3.0
|
510
|
-
'void glfwSetWindowShouldClose(void
|
564
|
+
'void glfwSetWindowShouldClose(void*, int)', # Available since GLFW 3.0
|
565
|
+
'const char* glfwGetWindowTitle(void*)', # Available since GLFW 3.4
|
511
566
|
'void glfwSetWindowTitle(void*, const char*)',
|
512
567
|
'void glfwSetWindowIcon(void*, int, void*)', # Available since GLFW 3.2
|
513
568
|
'void glfwGetWindowPos(void*, int*, int*)', # Available since GLFW 3.0
|
@@ -600,7 +655,11 @@ module GLFW
|
|
600
655
|
# 'GLFWvkproc glfwGetInstanceProcAddress(void*, const char*)',
|
601
656
|
# 'int glfwGetPhysicalDevicePresentationSupport(void*, void*, unsigned int)',
|
602
657
|
# 'VkResult glfwCreateWindowSurface(void*, void*, const void*, void*)',
|
658
|
+
# 'void glfwInitVulkanLoader(void*)',
|
603
659
|
# <<< Vulkan <<<
|
660
|
+
# >>> Allocator >>>
|
661
|
+
# 'void glfwInitAllocator(void*)',
|
662
|
+
# <<< Allocator <<<
|
604
663
|
]
|
605
664
|
|
606
665
|
case GL.get_platform
|
@@ -612,6 +671,7 @@ module GLFW
|
|
612
671
|
when :OPENGL_PLATFORM_MACOSX
|
613
672
|
@@lib_signature << 'unsigned int glfwGetCocoaMonitor(void*)'
|
614
673
|
@@lib_signature << 'void* glfwGetCocoaWindow(void*)'
|
674
|
+
@@lib_signature << 'void* glfwGetCocoaView(void*)'
|
615
675
|
@@lib_signature << 'void* glfwGetNSGLContext(void*)'
|
616
676
|
when :OPENGL_PLATFORM_LINUX
|
617
677
|
@@lib_signature << 'void* glfwGetX11Display()'
|
@@ -675,7 +735,7 @@ end
|
|
675
735
|
|
676
736
|
=begin
|
677
737
|
Ruby-OpenGL : Yet another OpenGL wrapper for Ruby (and wrapper code generator)
|
678
|
-
Copyright (c) 2013-
|
738
|
+
Copyright (c) 2013-2025 vaiorabbit <http://twitter.com/vaiorabbit>
|
679
739
|
|
680
740
|
This software is provided 'as-is', without any express or implied
|
681
741
|
warranty. In no event will the authors be held liable for any damages
|