opengl-bindings 1.6.10 → 1.6.11
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 +657 -627
- data/LICENSE.txt +1 -1
- data/README.md +536 -526
- data/lib/glfw.rb +711 -691
- data/lib/glu.rb +366 -366
- data/lib/glut.rb +576 -576
- data/lib/opengl.rb +43 -43
- data/lib/opengl_command.rb +7347 -7347
- data/lib/opengl_common.rb +54 -54
- data/lib/opengl_enum.rb +1818 -1806
- data/lib/opengl_es.rb +31 -31
- data/lib/opengl_es_command.rb +2517 -2517
- data/lib/opengl_es_ext.rb +28 -28
- data/lib/opengl_es_ext_command.rb +8377 -8246
- data/lib/opengl_es_ext_enum.rb +6055 -5985
- data/lib/opengl_ext.rb +34 -34
- data/lib/opengl_ext_command.rb +30480 -30358
- data/lib/opengl_ext_common.rb +52 -52
- data/lib/opengl_ext_enum.rb +14082 -14008
- data/lib/opengl_linux.rb +63 -63
- data/lib/opengl_macosx.rb +68 -68
- data/lib/opengl_platform.rb +43 -43
- data/lib/opengl_windows.rb +71 -71
- data/sample/glfw_build.bat +9 -1
- data/sample/glfw_build.sh +13 -13
- metadata +6 -7
- data/lib/glfw32.rb +0 -594
data/sample/glfw_build.bat
CHANGED
@@ -2,10 +2,18 @@
|
|
2
2
|
:: For Windows + RubyInstaller2 with DevKit(MSYS2 gcc & make) + CMake users.
|
3
3
|
:: - Use this script after "ridk enable"d. See https://github.com/oneclick/rubyinstaller2/wiki/The-ridk-tool for details.
|
4
4
|
::
|
5
|
+
@echo off
|
6
|
+
setlocal EnableDelayedExpansion
|
7
|
+
|
8
|
+
set CMAKE=%1
|
9
|
+
if [%CMAKE%] == [] (
|
10
|
+
set CMAKE="%PROGRAMFILES%\CMake\bin\cmake.exe"
|
11
|
+
)
|
12
|
+
|
5
13
|
git clone --depth=1 https://github.com/glfw/glfw.git glfw_master
|
6
14
|
cd glfw_master/
|
7
15
|
mkdir build
|
8
16
|
cd build
|
9
|
-
|
17
|
+
%CMAKE% -G "MSYS Makefiles" -D CMAKE_BUILD_TYPE=Release -D GLFW_NATIVE_API=1 -D BUILD_SHARED_LIBS=ON -D CMAKE_C_COMPILER=gcc ../
|
10
18
|
make
|
11
19
|
cp -R src/glfw3.dll ../..
|
data/sample/glfw_build.sh
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
#
|
2
|
-
# For Mac OS X + Xcode + CMake users.
|
3
|
-
#
|
4
|
-
# Ref.: https://github.com/malkia/ufo/blob/master/build/OSX/glfw.sh
|
5
|
-
#
|
6
|
-
git clone --depth=1 https://github.com/glfw/glfw.git glfw_master
|
7
|
-
cd glfw_master/
|
8
|
-
mkdir build
|
9
|
-
cd build
|
10
|
-
export MACOSX_DEPLOYMENT_TARGET=10.14
|
11
|
-
cmake -D CMAKE_BUILD_TYPE=Release -D GLFW_NATIVE_API=1 -D CMAKE_OSX_ARCHITECTURES="x86_64" -D BUILD_SHARED_LIBS=ON -D CMAKE_C_COMPILER=clang ../
|
12
|
-
make
|
13
|
-
cp -R src/libglfw* ../..
|
1
|
+
#
|
2
|
+
# For Mac OS X + Xcode + CMake users.
|
3
|
+
#
|
4
|
+
# Ref.: https://github.com/malkia/ufo/blob/master/build/OSX/glfw.sh
|
5
|
+
#
|
6
|
+
git clone --depth=1 https://github.com/glfw/glfw.git glfw_master
|
7
|
+
cd glfw_master/
|
8
|
+
mkdir build
|
9
|
+
cd build
|
10
|
+
export MACOSX_DEPLOYMENT_TARGET=10.14
|
11
|
+
cmake -D CMAKE_BUILD_TYPE=Release -D GLFW_NATIVE_API=1 -D CMAKE_OSX_ARCHITECTURES="x86_64;arm64" -D BUILD_SHARED_LIBS=ON -D CMAKE_C_COMPILER=clang ../
|
12
|
+
make
|
13
|
+
cp -R src/libglfw* ../..
|
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.6.
|
4
|
+
version: 1.6.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vaiorabbit
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 'Ruby bindings for OpenGL - 4.6, OpenGL ES - 3.2 and all extensions using
|
14
14
|
Fiddle (For MRI >= 2.0.0). GLFW/GLUT/GLU bindings are also available.
|
@@ -24,7 +24,6 @@ files:
|
|
24
24
|
- LICENSE.txt
|
25
25
|
- README.md
|
26
26
|
- lib/glfw.rb
|
27
|
-
- lib/glfw32.rb
|
28
27
|
- lib/glu.rb
|
29
28
|
- lib/glut.rb
|
30
29
|
- lib/opengl.rb
|
@@ -55,7 +54,7 @@ homepage: https://github.com/vaiorabbit/ruby-opengl
|
|
55
54
|
licenses:
|
56
55
|
- Zlib
|
57
56
|
metadata: {}
|
58
|
-
post_install_message:
|
57
|
+
post_install_message:
|
59
58
|
rdoc_options: []
|
60
59
|
require_paths:
|
61
60
|
- lib
|
@@ -70,8 +69,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
69
|
- !ruby/object:Gem::Version
|
71
70
|
version: '0'
|
72
71
|
requirements: []
|
73
|
-
rubygems_version: 3.
|
74
|
-
signing_key:
|
72
|
+
rubygems_version: 3.2.3
|
73
|
+
signing_key:
|
75
74
|
specification_version: 4
|
76
75
|
summary: Bindings for OpenGL -4.6, ES - 3.2 and extensions (For MRI >= 2.0.0)
|
77
76
|
test_files: []
|
data/lib/glfw32.rb
DELETED
@@ -1,594 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
# A GLFW wrapper (for version 3.0, 3.1 and 3.2)
|
3
|
-
require 'fiddle/import'
|
4
|
-
|
5
|
-
module GLFW
|
6
|
-
|
7
|
-
extend Fiddle::Importer
|
8
|
-
|
9
|
-
#
|
10
|
-
# Fiddle's default 'extern' stores all methods into local variable '@func_map', that makes difficult to 'include GLFW'.
|
11
|
-
# So I override it and replace '@func_map' into 'GLFW_FUNCTIONS_MAP'.
|
12
|
-
# Ref.: /lib/ruby/2.0.0/fiddle/import.rb
|
13
|
-
#
|
14
|
-
GLFW_FUNCTIONS_MAP = {}
|
15
|
-
def self.extern(signature, *opts)
|
16
|
-
symname, ctype, argtype = parse_signature(signature, @type_alias)
|
17
|
-
opt = parse_bind_options(opts)
|
18
|
-
f = import_function(symname, ctype, argtype, opt[:call_type])
|
19
|
-
name = symname.gsub(/@.+/,'')
|
20
|
-
GLFW_FUNCTIONS_MAP[name] = f
|
21
|
-
begin
|
22
|
-
/^(.+?):(\d+)/ =~ caller.first
|
23
|
-
file, line = $1, $2.to_i
|
24
|
-
rescue
|
25
|
-
file, line = __FILE__, __LINE__+3
|
26
|
-
end
|
27
|
-
args_str="*args"
|
28
|
-
module_eval(<<-EOS, file, line)
|
29
|
-
def #{name}(*args, &block)
|
30
|
-
GLFW_FUNCTIONS_MAP['#{name}'].call(*args,&block)
|
31
|
-
end
|
32
|
-
EOS
|
33
|
-
module_function(name)
|
34
|
-
f
|
35
|
-
end
|
36
|
-
|
37
|
-
# defines
|
38
|
-
GLFW_TRUE = 1 # Available since GLFW 3.2
|
39
|
-
GLFW_FALSE = 0 # Available since GLFW 3.2
|
40
|
-
|
41
|
-
GLFW_RELEASE = 0
|
42
|
-
GLFW_PRESS = 1
|
43
|
-
GLFW_REPEAT = 2
|
44
|
-
|
45
|
-
GLFW_KEY_UNKNOWN = -1
|
46
|
-
|
47
|
-
GLFW_KEY_SPACE = 32
|
48
|
-
GLFW_KEY_APOSTROPHE = 39 # '
|
49
|
-
GLFW_KEY_COMMA = 44 # ,
|
50
|
-
GLFW_KEY_MINUS = 45 # -
|
51
|
-
GLFW_KEY_PERIOD = 46 # .
|
52
|
-
GLFW_KEY_SLASH = 47 # /
|
53
|
-
GLFW_KEY_0 = 48
|
54
|
-
GLFW_KEY_1 = 49
|
55
|
-
GLFW_KEY_2 = 50
|
56
|
-
GLFW_KEY_3 = 51
|
57
|
-
GLFW_KEY_4 = 52
|
58
|
-
GLFW_KEY_5 = 53
|
59
|
-
GLFW_KEY_6 = 54
|
60
|
-
GLFW_KEY_7 = 55
|
61
|
-
GLFW_KEY_8 = 56
|
62
|
-
GLFW_KEY_9 = 57
|
63
|
-
GLFW_KEY_SEMICOLON = 59 # ;
|
64
|
-
GLFW_KEY_EQUAL = 61 # =
|
65
|
-
GLFW_KEY_A = 65
|
66
|
-
GLFW_KEY_B = 66
|
67
|
-
GLFW_KEY_C = 67
|
68
|
-
GLFW_KEY_D = 68
|
69
|
-
GLFW_KEY_E = 69
|
70
|
-
GLFW_KEY_F = 70
|
71
|
-
GLFW_KEY_G = 71
|
72
|
-
GLFW_KEY_H = 72
|
73
|
-
GLFW_KEY_I = 73
|
74
|
-
GLFW_KEY_J = 74
|
75
|
-
GLFW_KEY_K = 75
|
76
|
-
GLFW_KEY_L = 76
|
77
|
-
GLFW_KEY_M = 77
|
78
|
-
GLFW_KEY_N = 78
|
79
|
-
GLFW_KEY_O = 79
|
80
|
-
GLFW_KEY_P = 80
|
81
|
-
GLFW_KEY_Q = 81
|
82
|
-
GLFW_KEY_R = 82
|
83
|
-
GLFW_KEY_S = 83
|
84
|
-
GLFW_KEY_T = 84
|
85
|
-
GLFW_KEY_U = 85
|
86
|
-
GLFW_KEY_V = 86
|
87
|
-
GLFW_KEY_W = 87
|
88
|
-
GLFW_KEY_X = 88
|
89
|
-
GLFW_KEY_Y = 89
|
90
|
-
GLFW_KEY_Z = 90
|
91
|
-
GLFW_KEY_LEFT_BRACKET = 91 # [
|
92
|
-
GLFW_KEY_BACKSLASH = 92 # \
|
93
|
-
GLFW_KEY_RIGHT_BRACKET = 93 # ]
|
94
|
-
GLFW_KEY_GRAVE_ACCENT = 96 # `
|
95
|
-
GLFW_KEY_WORLD_1 = 161 # non-US #1
|
96
|
-
GLFW_KEY_WORLD_2 = 162 # non-US #2
|
97
|
-
|
98
|
-
GLFW_KEY_ESCAPE = 256
|
99
|
-
GLFW_KEY_ENTER = 257
|
100
|
-
GLFW_KEY_TAB = 258
|
101
|
-
GLFW_KEY_BACKSPACE = 259
|
102
|
-
GLFW_KEY_INSERT = 260
|
103
|
-
GLFW_KEY_DELETE = 261
|
104
|
-
GLFW_KEY_RIGHT = 262
|
105
|
-
GLFW_KEY_LEFT = 263
|
106
|
-
GLFW_KEY_DOWN = 264
|
107
|
-
GLFW_KEY_UP = 265
|
108
|
-
GLFW_KEY_PAGE_UP = 266
|
109
|
-
GLFW_KEY_PAGE_DOWN = 267
|
110
|
-
GLFW_KEY_HOME = 268
|
111
|
-
GLFW_KEY_END = 269
|
112
|
-
GLFW_KEY_CAPS_LOCK = 280
|
113
|
-
GLFW_KEY_SCROLL_LOCK = 281
|
114
|
-
GLFW_KEY_NUM_LOCK = 282
|
115
|
-
GLFW_KEY_PRINT_SCREEN = 283
|
116
|
-
GLFW_KEY_PAUSE = 284
|
117
|
-
GLFW_KEY_F1 = 290
|
118
|
-
GLFW_KEY_F2 = 291
|
119
|
-
GLFW_KEY_F3 = 292
|
120
|
-
GLFW_KEY_F4 = 293
|
121
|
-
GLFW_KEY_F5 = 294
|
122
|
-
GLFW_KEY_F6 = 295
|
123
|
-
GLFW_KEY_F7 = 296
|
124
|
-
GLFW_KEY_F8 = 297
|
125
|
-
GLFW_KEY_F9 = 298
|
126
|
-
GLFW_KEY_F10 = 299
|
127
|
-
GLFW_KEY_F11 = 300
|
128
|
-
GLFW_KEY_F12 = 301
|
129
|
-
GLFW_KEY_F13 = 302
|
130
|
-
GLFW_KEY_F14 = 303
|
131
|
-
GLFW_KEY_F15 = 304
|
132
|
-
GLFW_KEY_F16 = 305
|
133
|
-
GLFW_KEY_F17 = 306
|
134
|
-
GLFW_KEY_F18 = 307
|
135
|
-
GLFW_KEY_F19 = 308
|
136
|
-
GLFW_KEY_F20 = 309
|
137
|
-
GLFW_KEY_F21 = 310
|
138
|
-
GLFW_KEY_F22 = 311
|
139
|
-
GLFW_KEY_F23 = 312
|
140
|
-
GLFW_KEY_F24 = 313
|
141
|
-
GLFW_KEY_F25 = 314
|
142
|
-
GLFW_KEY_KP_0 = 320
|
143
|
-
GLFW_KEY_KP_1 = 321
|
144
|
-
GLFW_KEY_KP_2 = 322
|
145
|
-
GLFW_KEY_KP_3 = 323
|
146
|
-
GLFW_KEY_KP_4 = 324
|
147
|
-
GLFW_KEY_KP_5 = 325
|
148
|
-
GLFW_KEY_KP_6 = 326
|
149
|
-
GLFW_KEY_KP_7 = 327
|
150
|
-
GLFW_KEY_KP_8 = 328
|
151
|
-
GLFW_KEY_KP_9 = 329
|
152
|
-
GLFW_KEY_KP_DECIMAL = 330
|
153
|
-
GLFW_KEY_KP_DIVIDE = 331
|
154
|
-
GLFW_KEY_KP_MULTIPLY = 332
|
155
|
-
GLFW_KEY_KP_SUBTRACT = 333
|
156
|
-
GLFW_KEY_KP_ADD = 334
|
157
|
-
GLFW_KEY_KP_ENTER = 335
|
158
|
-
GLFW_KEY_KP_EQUAL = 336
|
159
|
-
GLFW_KEY_LEFT_SHIFT = 340
|
160
|
-
GLFW_KEY_LEFT_CONTROL = 341
|
161
|
-
GLFW_KEY_LEFT_ALT = 342
|
162
|
-
GLFW_KEY_LEFT_SUPER = 343
|
163
|
-
GLFW_KEY_RIGHT_SHIFT = 344
|
164
|
-
GLFW_KEY_RIGHT_CONTROL = 345
|
165
|
-
GLFW_KEY_RIGHT_ALT = 346
|
166
|
-
GLFW_KEY_RIGHT_SUPER = 347
|
167
|
-
GLFW_KEY_MENU = 348
|
168
|
-
GLFW_KEY_LAST = GLFW_KEY_MENU
|
169
|
-
|
170
|
-
GLFW_MOD_SHIFT = 0x0001
|
171
|
-
GLFW_MOD_CONTROL = 0x0002
|
172
|
-
GLFW_MOD_ALT = 0x0004
|
173
|
-
GLFW_MOD_SUPER = 0x0008
|
174
|
-
|
175
|
-
GLFW_MOUSE_BUTTON_1 = 0
|
176
|
-
GLFW_MOUSE_BUTTON_2 = 1
|
177
|
-
GLFW_MOUSE_BUTTON_3 = 2
|
178
|
-
GLFW_MOUSE_BUTTON_4 = 3
|
179
|
-
GLFW_MOUSE_BUTTON_5 = 4
|
180
|
-
GLFW_MOUSE_BUTTON_6 = 5
|
181
|
-
GLFW_MOUSE_BUTTON_7 = 6
|
182
|
-
GLFW_MOUSE_BUTTON_8 = 7
|
183
|
-
GLFW_MOUSE_BUTTON_LAST = GLFW_MOUSE_BUTTON_8
|
184
|
-
GLFW_MOUSE_BUTTON_LEFT = GLFW_MOUSE_BUTTON_1
|
185
|
-
GLFW_MOUSE_BUTTON_RIGHT = GLFW_MOUSE_BUTTON_2
|
186
|
-
GLFW_MOUSE_BUTTON_MIDDLE = GLFW_MOUSE_BUTTON_3
|
187
|
-
|
188
|
-
GLFW_JOYSTICK_1 = 0
|
189
|
-
GLFW_JOYSTICK_2 = 1
|
190
|
-
GLFW_JOYSTICK_3 = 2
|
191
|
-
GLFW_JOYSTICK_4 = 3
|
192
|
-
GLFW_JOYSTICK_5 = 4
|
193
|
-
GLFW_JOYSTICK_6 = 5
|
194
|
-
GLFW_JOYSTICK_7 = 6
|
195
|
-
GLFW_JOYSTICK_8 = 7
|
196
|
-
GLFW_JOYSTICK_9 = 8
|
197
|
-
GLFW_JOYSTICK_10 = 9
|
198
|
-
GLFW_JOYSTICK_11 = 10
|
199
|
-
GLFW_JOYSTICK_12 = 11
|
200
|
-
GLFW_JOYSTICK_13 = 12
|
201
|
-
GLFW_JOYSTICK_14 = 13
|
202
|
-
GLFW_JOYSTICK_15 = 14
|
203
|
-
GLFW_JOYSTICK_16 = 15
|
204
|
-
GLFW_JOYSTICK_LAST = GLFW_JOYSTICK_16
|
205
|
-
|
206
|
-
GLFW_NOT_INITIALIZED = 0x00010001
|
207
|
-
GLFW_NO_CURRENT_CONTEXT = 0x00010002
|
208
|
-
GLFW_INVALID_ENUM = 0x00010003
|
209
|
-
GLFW_INVALID_VALUE = 0x00010004
|
210
|
-
GLFW_OUT_OF_MEMORY = 0x00010005
|
211
|
-
GLFW_API_UNAVAILABLE = 0x00010006
|
212
|
-
GLFW_VERSION_UNAVAILABLE = 0x00010007
|
213
|
-
GLFW_PLATFORM_ERROR = 0x00010008
|
214
|
-
GLFW_FORMAT_UNAVAILABLE = 0x00010009
|
215
|
-
GLFW_NO_WINDOW_CONTEXT = 0x0001000A # Available since GLFW 3.2
|
216
|
-
|
217
|
-
GLFW_FOCUSED = 0x00020001
|
218
|
-
GLFW_ICONIFIED = 0x00020002
|
219
|
-
GLFW_RESIZABLE = 0x00020003
|
220
|
-
GLFW_VISIBLE = 0x00020004
|
221
|
-
GLFW_DECORATED = 0x00020005
|
222
|
-
GLFW_AUTO_ICONIFY = 0x00020006 # Available since GLFW 3.1
|
223
|
-
GLFW_FLOATING = 0x00020007 # Available since GLFW 3.1
|
224
|
-
GLFW_MAXIMIZED = 0x00020008 # Available since GLFW 3.2
|
225
|
-
|
226
|
-
GLFW_RED_BITS = 0x00021001
|
227
|
-
GLFW_GREEN_BITS = 0x00021002
|
228
|
-
GLFW_BLUE_BITS = 0x00021003
|
229
|
-
GLFW_ALPHA_BITS = 0x00021004
|
230
|
-
GLFW_DEPTH_BITS = 0x00021005
|
231
|
-
GLFW_STENCIL_BITS = 0x00021006
|
232
|
-
GLFW_ACCUM_RED_BITS = 0x00021007
|
233
|
-
GLFW_ACCUM_GREEN_BITS = 0x00021008
|
234
|
-
GLFW_ACCUM_BLUE_BITS = 0x00021009
|
235
|
-
GLFW_ACCUM_ALPHA_BITS = 0x0002100A
|
236
|
-
GLFW_AUX_BUFFERS = 0x0002100B
|
237
|
-
GLFW_STEREO = 0x0002100C
|
238
|
-
GLFW_SAMPLES = 0x0002100D
|
239
|
-
GLFW_SRGB_CAPABLE = 0x0002100E
|
240
|
-
GLFW_REFRESH_RATE = 0x0002100F
|
241
|
-
GLFW_DOUBLEBUFFER = 0x00021010
|
242
|
-
|
243
|
-
GLFW_CLIENT_API = 0x00022001
|
244
|
-
GLFW_CONTEXT_VERSION_MAJOR = 0x00022002
|
245
|
-
GLFW_CONTEXT_VERSION_MINOR = 0x00022003
|
246
|
-
GLFW_CONTEXT_REVISION = 0x00022004
|
247
|
-
GLFW_CONTEXT_ROBUSTNESS = 0x00022005
|
248
|
-
GLFW_OPENGL_FORWARD_COMPAT = 0x00022006
|
249
|
-
GLFW_OPENGL_DEBUG_CONTEXT = 0x00022007
|
250
|
-
GLFW_OPENGL_PROFILE = 0x00022008
|
251
|
-
GLFW_CONTEXT_RELEASE_BEHAVIOR = 0x00022009
|
252
|
-
GLFW_CONTEXT_NO_ERROR = 0x0002200A
|
253
|
-
GLFW_CONTEXT_CREATION_API = 0x0002200B # Available since GLFW 3.2
|
254
|
-
|
255
|
-
GLFW_NO_API = 0 # Available since GLFW 3.2
|
256
|
-
GLFW_OPENGL_API = 0x00030001
|
257
|
-
GLFW_OPENGL_ES_API = 0x00030002
|
258
|
-
|
259
|
-
GLFW_NO_ROBUSTNESS = 0
|
260
|
-
GLFW_NO_RESET_NOTIFICATION = 0x00031001
|
261
|
-
GLFW_LOSE_CONTEXT_ON_RESET = 0x00031002
|
262
|
-
|
263
|
-
GLFW_OPENGL_ANY_PROFILE = 0
|
264
|
-
GLFW_OPENGL_CORE_PROFILE = 0x00032001
|
265
|
-
GLFW_OPENGL_COMPAT_PROFILE = 0x00032002
|
266
|
-
|
267
|
-
GLFW_CURSOR = 0x00033001
|
268
|
-
GLFW_STICKY_KEYS = 0x00033002
|
269
|
-
GLFW_STICKY_MOUSE_BUTTONS = 0x00033003
|
270
|
-
|
271
|
-
GLFW_CURSOR_NORMAL = 0x00034001
|
272
|
-
GLFW_CURSOR_HIDDEN = 0x00034002
|
273
|
-
GLFW_CURSOR_DISABLED = 0x00034003
|
274
|
-
|
275
|
-
GLFW_ANY_RELEASE_BEHAVIOR = 0
|
276
|
-
GLFW_RELEASE_BEHAVIOR_FLUSH = 0x00035001
|
277
|
-
GLFW_RELEASE_BEHAVIOR_NONE = 0x00035002
|
278
|
-
|
279
|
-
GLFW_NATIVE_CONTEXT_API = 0x00036001 # Available since GLFW 3.2
|
280
|
-
GLFW_EGL_CONTEXT_API = 0x00036002 # Available since GLFW 3.2
|
281
|
-
|
282
|
-
GLFW_ARROW_CURSOR = 0x00036001
|
283
|
-
GLFW_IBEAM_CURSOR = 0x00036002
|
284
|
-
GLFW_CROSSHAIR_CURSOR = 0x00036003
|
285
|
-
GLFW_HAND_CURSOR = 0x00036004
|
286
|
-
GLFW_HRESIZE_CURSOR = 0x00036005
|
287
|
-
GLFW_VRESIZE_CURSOR = 0x00036006
|
288
|
-
|
289
|
-
GLFW_CONNECTED = 0x00040001
|
290
|
-
GLFW_DISCONNECTED = 0x00040002
|
291
|
-
|
292
|
-
GLFW_DONT_CARE = -1
|
293
|
-
|
294
|
-
# typedefs
|
295
|
-
@@glfw_cb_function_signature = {
|
296
|
-
:GLFWerrorfun => "void GLFWerrorfun(int,const char*)",
|
297
|
-
:GLFWwindowposfun => "void GLFWwindowposfun(void*,int,int)",
|
298
|
-
:GLFWwindowsizefun => "void GLFWwindowsizefun(void*,int,int)",
|
299
|
-
:GLFWwindowclosefun => "void GLFWwindowclosefun(void*)",
|
300
|
-
:GLFWwindowrefreshfun => "void GLFWwindowrefreshfun(void*)",
|
301
|
-
:GLFWwindowfocusfun => "void GLFWwindowfocusfun(void*,int)",
|
302
|
-
:GLFWwindowiconifyfun => "void GLFWwindowiconifyfun(void*,int)",
|
303
|
-
:GLFWframebuffersizefun => "void GLFWframebuffersizefun(void*,int,int)",
|
304
|
-
:GLFWmousebuttonfun => "void GLFWmousebuttonfun(void*,int,int,int)",
|
305
|
-
:GLFWcursorposfun => "void GLFWcursorposfun(void*,double,double)",
|
306
|
-
:GLFWcursorenterfun => "void GLFWcursorenterfun(void*,int)",
|
307
|
-
:GLFWscrollfun => "void GLFWscrollfun(void*,double,double)",
|
308
|
-
:GLFWkeyfun => "void GLFWkeyfun(void*,int,int,int,int)",
|
309
|
-
:GLFWcharfun => "void GLFWcharfun(void*,unsigned int)",
|
310
|
-
:GLFWcharmodsfun => "void GLFWcharmodsfun(void*,unsigned int,int)", # Available since GLFW 3.1
|
311
|
-
:GLFWdropfun => "void GLFWdropfun(void*,int,const char**)", # Available since GLFW 3.1
|
312
|
-
:GLFWmonitorfun => "void GLFWmonitorfun(void*,int)", # Available since GLFW 3.0
|
313
|
-
:GLFWjoystickfun => "void GGLFWjoystickfun(int,int)", # Available since GLFW 3.2
|
314
|
-
}
|
315
|
-
|
316
|
-
# Creates a callback as an instance of Fiddle::Function
|
317
|
-
def self.create_callback_function( sym, proc=nil, &blk )
|
318
|
-
if block_given?
|
319
|
-
return bind( @@glfw_cb_function_signature[sym], nil, &blk )
|
320
|
-
else
|
321
|
-
return bind( @@glfw_cb_function_signature[sym], nil, &proc )
|
322
|
-
end
|
323
|
-
end
|
324
|
-
|
325
|
-
GLFWerrorfun_cb_args = [Fiddle::TYPE_INT, Fiddle::TYPE_VOIDP]
|
326
|
-
GLFWerrorfun_cb_retval = Fiddle::TYPE_VOID
|
327
|
-
GLFWwindowposfun_cb_args = [Fiddle::TYPE_VOIDP, Fiddle::TYPE_INT, Fiddle::TYPE_INT]
|
328
|
-
GLFWwindowposfun_cb_retval = Fiddle::TYPE_VOID
|
329
|
-
GLFWwindowsizefun_cb_args = [Fiddle::TYPE_VOIDP, Fiddle::TYPE_INT, Fiddle::TYPE_INT]
|
330
|
-
GLFWwindowsizefun_cb_retval = Fiddle::TYPE_VOID
|
331
|
-
GLFWwindowclosefun_cb_args = [Fiddle::TYPE_VOIDP]
|
332
|
-
GLFWwindowclosefun_cb_retval = Fiddle::TYPE_VOID
|
333
|
-
GLFWwindowrefreshfun_cb_args = [Fiddle::TYPE_VOIDP]
|
334
|
-
GLFWwindowrefreshfun_cb_retval = Fiddle::TYPE_VOID
|
335
|
-
GLFWwindowfocusfun_cb_args = [Fiddle::TYPE_VOIDP, Fiddle::TYPE_INT]
|
336
|
-
GLFWwindowfocusfun_cb_retval = Fiddle::TYPE_VOID
|
337
|
-
GLFWwindowiconifyfun_cb_args = [Fiddle::TYPE_VOIDP, Fiddle::TYPE_INT]
|
338
|
-
GLFWwindowiconifyfun_cb_retval = Fiddle::TYPE_VOID
|
339
|
-
GLFWframebuffersizefun_cb_args = [Fiddle::TYPE_VOIDP, Fiddle::TYPE_INT, Fiddle::TYPE_INT]
|
340
|
-
GLFWframebuffersizefun_cb_retval = Fiddle::TYPE_VOID
|
341
|
-
GLFWmousebuttonfun_cb_args = [Fiddle::TYPE_VOIDP, Fiddle::TYPE_INT, Fiddle::TYPE_INT, Fiddle::TYPE_INT]
|
342
|
-
GLFWmousebuttonfun_cb_retval = Fiddle::TYPE_VOID
|
343
|
-
GLFWcursorposfun_cb_args = [Fiddle::TYPE_VOIDP, Fiddle::TYPE_DOUBLE, Fiddle::TYPE_DOUBLE]
|
344
|
-
GLFWcursorposfun_cb_retval = Fiddle::TYPE_VOID
|
345
|
-
GLFWcursorenterfun_cb_args = [Fiddle::TYPE_VOIDP, Fiddle::TYPE_INT]
|
346
|
-
GLFWcursorenterfun_cb_retval = Fiddle::TYPE_VOID
|
347
|
-
GLFWscrollfun_cb_args = [Fiddle::TYPE_VOIDP, Fiddle::TYPE_DOUBLE, Fiddle::TYPE_DOUBLE]
|
348
|
-
GLFWscrollfun_cb_retval = Fiddle::TYPE_VOID
|
349
|
-
GLFWkeyfun_cb_args = [Fiddle::TYPE_VOIDP, Fiddle::TYPE_INT, Fiddle::TYPE_INT, Fiddle::TYPE_INT, Fiddle::TYPE_INT]
|
350
|
-
GLFWkeyfun_cb_retval = Fiddle::TYPE_VOID
|
351
|
-
GLFWcharfun_cb_args = [Fiddle::TYPE_VOIDP, -Fiddle::TYPE_INT]
|
352
|
-
GLFWcharfun_cb_retval = Fiddle::TYPE_VOID
|
353
|
-
GLFWcharmodsfun_cb_args = [Fiddle::TYPE_VOIDP, -Fiddle::TYPE_INT, Fiddle::TYPE_INT] # Available since GLFW 3.1
|
354
|
-
GLFWcharmodsfun_cb_retval = Fiddle::TYPE_VOID # Available since GLFW 3.1
|
355
|
-
GLFWdropfun_cb_args = [Fiddle::TYPE_VOIDP, Fiddle::TYPE_INT, Fiddle::TYPE_VOIDP] # Available since GLFW 3.1
|
356
|
-
GLFWdropfun_cb_retval = Fiddle::TYPE_VOID # Available since GLFW 3.1
|
357
|
-
GLFWmonitorfun_cb_args = [Fiddle::TYPE_VOIDP, Fiddle::TYPE_INT] # Available since GLFW 3.0
|
358
|
-
GLFWmonitorfun_cb_retval = Fiddle::TYPE_VOID # Available since GLFW 3.0
|
359
|
-
GLFWjoystickfun_cb_args = [Fiddle::TYPE_INT, Fiddle::TYPE_INT] # Available since GLFW 3.2
|
360
|
-
GLFWjoystickfun_cb_retval = Fiddle::TYPE_VOID # Available since GLFW 3.2
|
361
|
-
|
362
|
-
@@glfw_cb_closure_signature = {
|
363
|
-
:GLFWerrorfun => [GLFWerrorfun_cb_retval, GLFWerrorfun_cb_args],
|
364
|
-
:GLFWwindowposfun => [GLFWwindowposfun_cb_retval, GLFWwindowposfun_cb_args],
|
365
|
-
:GLFWwindowsizefun => [GLFWwindowsizefun_cb_retval, GLFWwindowsizefun_cb_args],
|
366
|
-
:GLFWwindowclosefun => [GLFWwindowclosefun_cb_retval, GLFWwindowclosefun_cb_args],
|
367
|
-
:GLFWwindowrefreshfun => [GLFWwindowrefreshfun_cb_retval, GLFWwindowrefreshfun_cb_args],
|
368
|
-
:GLFWwindowfocusfun => [GLFWwindowfocusfun_cb_retval, GLFWwindowfocusfun_cb_args],
|
369
|
-
:GLFWwindowiconifyfun => [GLFWwindowiconifyfun_cb_retval, GLFWwindowiconifyfun_cb_args],
|
370
|
-
:GLFWframebuffersizefun => [GLFWframebuffersizefun_cb_retval, GLFWframebuffersizefun_cb_args],
|
371
|
-
:GLFWmousebuttonfun => [GLFWmousebuttonfun_cb_retval, GLFWmousebuttonfun_cb_args],
|
372
|
-
:GLFWcursorposfun => [GLFWcursorposfun_cb_retval, GLFWcursorposfun_cb_args],
|
373
|
-
:GLFWcursorenterfun => [GLFWcursorenterfun_cb_retval, GLFWcursorenterfun_cb_args],
|
374
|
-
:GLFWscrollfun => [GLFWscrollfun_cb_retval, GLFWscrollfun_cb_args],
|
375
|
-
:GLFWkeyfun => [GLFWkeyfun_cb_retval, GLFWkeyfun_cb_args],
|
376
|
-
:GLFWcharfun => [GLFWcharfun_cb_retval, GLFWcharfun_cb_args],
|
377
|
-
:GLFWcharmodsfun => [GLFWcharmodsfun_cb_retval, GLFWcharmodsfun_cb_args], # Available since GLFW 3.1
|
378
|
-
:GLFWdropfun => [GLFWdropfun_cb_retval, GLFWdropfun_cb_args], # Available since GLFW 3.1
|
379
|
-
:GLFWmonitorfun => [GLFWmonitorfun_cb_retval, GLFWmonitorfun_cb_args],
|
380
|
-
:GLFWjoystickfun => [GLFWjoystickfun_cb_retval, GLFWjoystickfun_cb_args], # Available since GLFW 3.2
|
381
|
-
}
|
382
|
-
|
383
|
-
# Creates a callback as an instance of Fiddle::Closure::BlockCaller
|
384
|
-
def self.create_callback_closure( sym, proc=nil, &blk )
|
385
|
-
cb_retval = @@glfw_cb_closure_signature[sym][0]
|
386
|
-
cb_args = @@glfw_cb_closure_signature[sym][1]
|
387
|
-
if block_given?
|
388
|
-
return Fiddle::Closure::BlockCaller.new( cb_retval, cb_args, Fiddle::Function::DEFAULT, &blk )
|
389
|
-
else
|
390
|
-
return Fiddle::Closure::BlockCaller.new( cb_retval, cb_args, Fiddle::Function::DEFAULT, &proc )
|
391
|
-
end
|
392
|
-
end
|
393
|
-
|
394
|
-
# NOTE : Use 'create_callback_function' for backward compatibility.
|
395
|
-
def self.create_callback( sym, proc=nil, &blk )
|
396
|
-
return self.create_callback_closure( sym, proc, &blk )
|
397
|
-
end
|
398
|
-
|
399
|
-
# struct
|
400
|
-
GLFWvidmode = struct(["int width",
|
401
|
-
"int height",
|
402
|
-
"int redBits",
|
403
|
-
"int greenBits",
|
404
|
-
"int blueBits",
|
405
|
-
"int refreshRate"])
|
406
|
-
|
407
|
-
GLFWgammaramp = struct(["unsigned short* red",
|
408
|
-
"unsigned short* green",
|
409
|
-
"unsigned short* blue",
|
410
|
-
"unsigned int size"])
|
411
|
-
|
412
|
-
# Available since GLFW 3.1
|
413
|
-
GLFWimage = struct(["int width",
|
414
|
-
"int height",
|
415
|
-
"unsigned char* pixels"])
|
416
|
-
|
417
|
-
@@glfw_import_done = false
|
418
|
-
|
419
|
-
# Load native library.
|
420
|
-
def self.load_lib(lib = nil, path = nil, output_error = false)
|
421
|
-
if lib == nil && path == nil
|
422
|
-
case OpenGL.get_platform
|
423
|
-
when :OPENGL_PLATFORM_WINDOWS
|
424
|
-
lib, path = 'GLFW3.dll', Dir.pwd
|
425
|
-
when :OPENGL_PLATFORM_MACOSX
|
426
|
-
lib, path = 'libglfw.dylib', Dir.pwd
|
427
|
-
else
|
428
|
-
lib = 'libglfw.so'
|
429
|
-
end
|
430
|
-
end
|
431
|
-
|
432
|
-
if path
|
433
|
-
dlload (path + '/' + lib)
|
434
|
-
else
|
435
|
-
dlload (lib)
|
436
|
-
end
|
437
|
-
import_symbols(output_error) unless @@glfw_import_done
|
438
|
-
end
|
439
|
-
|
440
|
-
def self.load_dll(lib = nil, path = nil)
|
441
|
-
puts "Warning GLFW.load_dll is deprecated, use GLFW.load_lib instead"
|
442
|
-
self.load_lib(lib, path)
|
443
|
-
end
|
444
|
-
|
445
|
-
@@lib_signature = [
|
446
|
-
'int glfwInit()',
|
447
|
-
'void glfwTerminate()',
|
448
|
-
'void glfwGetVersion(int*, int*, int*)',
|
449
|
-
'const char* glfwGetVersionString()',
|
450
|
-
'void* glfwSetErrorCallback(void*)',
|
451
|
-
'void** glfwGetMonitors(int*)',
|
452
|
-
'void* glfwGetPrimaryMonitor()',
|
453
|
-
'void glfwGetMonitorPos(void*, int*, int*)',
|
454
|
-
'void glfwGetMonitorPhysicalSize(void*, int*, int*)',
|
455
|
-
'const char* glfwGetMonitorName(void*)',
|
456
|
-
'void* glfwSetMonitorCallback(void*)', # Available since GLFW 3.0
|
457
|
-
'const void* glfwGetVideoModes(void*, int*)',
|
458
|
-
'const void* glfwGetVideoMode(void*)', # Available since GLFW 3.0
|
459
|
-
'void glfwSetGamma(void*, float)', # Available since GLFW 3.0
|
460
|
-
'const void* glfwGetGammaRamp(void*)', # Available since GLFW 3.0
|
461
|
-
'void glfwSetGammaRamp(void*, const void*)', # Available since GLFW 3.0
|
462
|
-
'void glfwDefaultWindowHints()', # Available since GLFW 3.0
|
463
|
-
'void glfwWindowHint(int, int)', # Available since GLFW 3.0
|
464
|
-
'void* glfwCreateWindow(int, int, const char*, void*, void*)', # Available since GLFW 3.0
|
465
|
-
'void glfwDestroyWindow(void*)', # Available since GLFW 3.0
|
466
|
-
'int glfwWindowShouldClose(void*)', # Available since GLFW 3.0
|
467
|
-
'void glfwSetWindowShouldClose(void* window, int)', # Available since GLFW 3.0
|
468
|
-
'void glfwSetWindowTitle(void*, const char*)',
|
469
|
-
'void glfwSetWindowIcon(void*, int, void*)', # Available since GLFW 3.2
|
470
|
-
'void glfwGetWindowPos(void*, int*, int*)', # Available since GLFW 3.0
|
471
|
-
'void glfwSetWindowPos(void*, int, int)',
|
472
|
-
'void glfwGetWindowSize(void*, int*, int*)',
|
473
|
-
'void glfwSetWindowSizeLimits(void*, int, int, int, int)', # Available since GLFW 3.2
|
474
|
-
'void glfwSetWindowAspectRatio(void*, int, int)', # Available since GLFW 3.2
|
475
|
-
'void glfwSetWindowSize(void*, int, int)',
|
476
|
-
'void glfwGetFramebufferSize(void*, int*, int*)', # Available since GLFW 3.0
|
477
|
-
'void glfwGetWindowFrameSize(void*, int*, int*, int*, int*)', # Available since GLFW 3.1
|
478
|
-
'void glfwIconifyWindow(void*)',
|
479
|
-
'void glfwRestoreWindow(void*)',
|
480
|
-
'void glfwMaximizeWindow(void*)', # Available since GLFW 3.2
|
481
|
-
'void glfwShowWindow(void*)', # Available since GLFW 3.0
|
482
|
-
'void glfwHideWindow(void*)', # Available since GLFW 3.0
|
483
|
-
'void glfwFocusWindow(void*)', # Available since GLFW 3.2
|
484
|
-
'void* glfwGetWindowMonitor(void*)', # Available since GLFW 3.0
|
485
|
-
'void glfwSetWindowMonitor(void*, void*, int, int, int, int, int)', # Available since GLFW 3.2
|
486
|
-
'int glfwGetWindowAttrib(void*, int)', # Available since GLFW 3.0
|
487
|
-
'void glfwSetWindowUserPointer(void*, void*)', # Available since GLFW 3.0
|
488
|
-
'void* glfwGetWindowUserPointer(void*)', # Available since GLFW 3.0
|
489
|
-
'void* glfwSetWindowPosCallback(void*, void*)', # Available since GLFW 3.0
|
490
|
-
'void* glfwSetWindowSizeCallback(void*, void*)',
|
491
|
-
'void* glfwSetWindowCloseCallback(void*, void*)',
|
492
|
-
'void* glfwSetWindowRefreshCallback(void*, void*)',
|
493
|
-
'void* glfwSetWindowFocusCallback(void*, void*)', # Available since GLFW 3.0
|
494
|
-
'void* glfwSetWindowIconifyCallback(void*, void*)', # Available since GLFW 3.0
|
495
|
-
'void* glfwSetFramebufferSizeCallback(void*, void*)', # Available since GLFW 3.0
|
496
|
-
'void glfwPollEvents()',
|
497
|
-
'void glfwWaitEvents()',
|
498
|
-
'void glfwWaitEventsTimeout(double)', # Available since GLFW 3.2
|
499
|
-
'void glfwPostEmptyEvent()', # Available since GLFW 3.1
|
500
|
-
'int glfwGetInputMode(void*, int)', # Available since GLFW 3.0
|
501
|
-
'void glfwSetInputMode(void*, int, int)', # Available since GLFW 3.0
|
502
|
-
'const char* glfwGetKeyName(int, int)', # Available since GLFW 3.2
|
503
|
-
'int glfwGetKey(void*, int)',
|
504
|
-
'int glfwGetMouseButton(void*, int)',
|
505
|
-
'void glfwGetCursorPos(void*, double*, double*)', # Available since GLFW 3.0
|
506
|
-
'void glfwSetCursorPos(void*, double, double)', # Available since GLFW 3.0
|
507
|
-
'void* glfwCreateCursor(void*, int, int)', # Available since GLFW 3.1
|
508
|
-
'void* glfwCreateStandardCursor(int)', # Available since GLFW 3.1
|
509
|
-
'void glfwDestroyCursor(void*)', # Available since GLFW 3.1
|
510
|
-
'void glfwSetCursor(void*, void*)', # Available since GLFW 3.1
|
511
|
-
'void* glfwSetKeyCallback(void*, void*)',
|
512
|
-
'void* glfwSetCharCallback(void*, void*)',
|
513
|
-
'void* glfwSetCharModsCallback(void*, void*)', # Available since GLFW 3.1
|
514
|
-
'void* glfwSetMouseButtonCallback(void*, void*)',
|
515
|
-
'void* glfwSetCursorPosCallback(void*, void*)', # Available since GLFW 3.0
|
516
|
-
'void* glfwSetCursorEnterCallback(void*, void*)', # Available since GLFW 3.0
|
517
|
-
'void* glfwSetScrollCallback(void*, void*)', # Available since GLFW 3.0
|
518
|
-
'void* glfwSetDropCallback(void*, void*)', # Available since GLFW 3.1
|
519
|
-
'int glfwJoystickPresent(int)', # Available since GLFW 3.0
|
520
|
-
'const float* glfwGetJoystickAxes(int, int*)', # Available since GLFW 3.0
|
521
|
-
'const unsigned char* glfwGetJoystickButtons(int, int*)',
|
522
|
-
'const char* glfwGetJoystickName(int)', # Available since GLFW 3.0
|
523
|
-
'void* glfwSetJoystickCallback(void*)', # Available since GLFW 3.2
|
524
|
-
'void glfwSetClipboardString(void*, const char*)', # Available since GLFW 3.0
|
525
|
-
'const char* glfwGetClipboardString(void*)', # Available since GLFW 3.0
|
526
|
-
'double glfwGetTime()',
|
527
|
-
'void glfwSetTime(double)',
|
528
|
-
'GLFWuint64 glfwGetTimerValue()', # Available since GLFW 3.2
|
529
|
-
'GLFWuint64 glfwGetTimerFrequency()', # Available since GLFW 3.2
|
530
|
-
'void glfwMakeContextCurrent(void*)', # Available since GLFW 3.0
|
531
|
-
'void* glfwGetCurrentContext()', # Available since GLFW 3.0
|
532
|
-
'void glfwSwapBuffers(void*)',
|
533
|
-
'void glfwSwapInterval(int)',
|
534
|
-
'int glfwExtensionSupported(const char*)',
|
535
|
-
'void* glfwGetProcAddress(const char*)',
|
536
|
-
# >>> Vulkan >>>
|
537
|
-
'int glfwVulkanSupported()', # Available since GLFW 3.2
|
538
|
-
'const char** glfwGetRequiredInstanceExtensions(unsigned int*)', # Available since GLFW 3.2
|
539
|
-
# 'GLFWvkproc glfwGetInstanceProcAddress(void*, const char*)',
|
540
|
-
# 'int glfwGetPhysicalDevicePresentationSupport(void*, void*, unsigned int)',
|
541
|
-
# 'VkResult glfwCreateWindowSurface(void*, void*, const void*, void*)',
|
542
|
-
# <<< Vulkan <<<
|
543
|
-
]
|
544
|
-
|
545
|
-
def self.import_symbols(output_error = false)
|
546
|
-
typealias 'GLFWuint64', 'unsigned long long' # Available since GLFW 3.2
|
547
|
-
|
548
|
-
# function
|
549
|
-
@@lib_signature.each do |sig|
|
550
|
-
begin
|
551
|
-
extern sig
|
552
|
-
rescue
|
553
|
-
$stderr.puts("[Warning] Failed to import #{sig}.") if output_error
|
554
|
-
end
|
555
|
-
end
|
556
|
-
|
557
|
-
ver_major = ' ' * 4
|
558
|
-
ver_minor = ' ' * 4
|
559
|
-
ver_rev = ' ' * 4
|
560
|
-
glfwGetVersion(ver_major, ver_minor, ver_rev)
|
561
|
-
|
562
|
-
GLFW.const_set('GLFW_VERSION_MAJOR', ver_major.unpack('L')[0])
|
563
|
-
GLFW.const_set('GLFW_VERSION_MINOR', ver_minor.unpack('L')[0])
|
564
|
-
GLFW.const_set('GLFW_VERSION_REVISION', ver_rev.unpack('L')[0])
|
565
|
-
|
566
|
-
@@glfw_import_done = true
|
567
|
-
end
|
568
|
-
|
569
|
-
end
|
570
|
-
|
571
|
-
=begin
|
572
|
-
Ruby-OpenGL : Yet another OpenGL wrapper for Ruby (and wrapper code generator)
|
573
|
-
Copyright (c) 2013-2020 vaiorabbit <http://twitter.com/vaiorabbit>
|
574
|
-
|
575
|
-
This software is provided 'as-is', without any express or implied
|
576
|
-
warranty. In no event will the authors be held liable for any damages
|
577
|
-
arising from the use of this software.
|
578
|
-
|
579
|
-
Permission is granted to anyone to use this software for any purpose,
|
580
|
-
including commercial applications, and to alter it and redistribute it
|
581
|
-
freely, subject to the following restrictions:
|
582
|
-
|
583
|
-
1. The origin of this software must not be misrepresented; you must not
|
584
|
-
claim that you wrote the original software. If you use this software
|
585
|
-
in a product, an acknowledgment in the product documentation would be
|
586
|
-
appreciated but is not required.
|
587
|
-
|
588
|
-
2. Altered source versions must be plainly marked as such, and must not be
|
589
|
-
misrepresented as being the original software.
|
590
|
-
|
591
|
-
3. This notice may not be removed or altered from any source
|
592
|
-
distribution.
|
593
|
-
=end
|
594
|
-
|