nanovg-bindings 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +8 -0
- data/README.md +1 -1
- data/lib/nanovg.rb +170 -170
- metadata +33 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8209efc95a9fc19d21d3add4f79d05c5069c6951a06b7a9e0c1c523efd19e57
|
4
|
+
data.tar.gz: faefdcbaf05388d9fa1f11d047c525057d8141c52f077965250f100f60d4ecd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5668466e097988fa2ac37b7b84ac318e7c66b9c6f2220ce04486f3756b46af922e7bb5167be3b44f17d7a56e59f910b767b72b72dfdbb2f2d5c7be2ec6f9e18
|
7
|
+
data.tar.gz: ab406e4b5d22ddf6fd8428cc0f2b92259e4b95914aa25425a2b45ea3274b9e8b099008463916d3db1b3ab0d7a995ecce26257fdbcc9f6f9933849f6fe4cffc85
|
data/ChangeLog
CHANGED
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Provides NanoVG ( https://github.com/memononen/nanovg ) interfaces for ruby (MRI).
|
4
4
|
|
5
5
|
* Created : 2015-07-12
|
6
|
-
* Last modified : 2022-01-
|
6
|
+
* Last modified : 2022-01-08
|
7
7
|
|
8
8
|
<img src="https://raw.githubusercontent.com/vaiorabbit/nanovg-bindings/master/doc/example_rb.png" width="150"> <img src="https://raw.githubusercontent.com/vaiorabbit/nanovg-bindings/master/doc/emojifont_rb.png" width="150"> <img src="https://raw.githubusercontent.com/vaiorabbit/nanovg-bindings/master/doc/hex_gol_glider5_rb.png" width="150"> <img src="https://raw.githubusercontent.com/vaiorabbit/nanovg-bindings/master/doc/jpfont_rb.png" width="150"> <img src="https://raw.githubusercontent.com/vaiorabbit/nanovg-bindings/master/doc/mandelbrot_rb.png" width="150">
|
9
9
|
|
data/lib/nanovg.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'ffi'
|
2
2
|
|
3
|
-
module
|
3
|
+
module NVG
|
4
4
|
extend FFI::Library
|
5
5
|
|
6
6
|
#
|
@@ -8,93 +8,93 @@ module NanoVG
|
|
8
8
|
#
|
9
9
|
|
10
10
|
# NVGwinding
|
11
|
-
|
12
|
-
|
11
|
+
CCW = 1
|
12
|
+
CW = 2
|
13
13
|
|
14
14
|
# NVGsolidity
|
15
|
-
|
16
|
-
|
15
|
+
SOLID = 1
|
16
|
+
HOLE = 2
|
17
17
|
|
18
18
|
# NVGlineCap
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
19
|
+
BUTT = 0
|
20
|
+
ROUND = 1
|
21
|
+
SQUARE = 2
|
22
|
+
BEVEL = 3
|
23
|
+
MITER = 4
|
24
24
|
|
25
25
|
# NVGalign
|
26
26
|
# Horizontal align
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
ALIGN_LEFT = 1
|
28
|
+
ALIGN_CENTER = 2
|
29
|
+
ALIGN_RIGHT = 4
|
30
30
|
# Vertical align
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
ALIGN_TOP = 8
|
32
|
+
ALIGN_MIDDLE = 16
|
33
|
+
ALIGN_BOTTOM = 32
|
34
|
+
ALIGN_BASELINE = 64
|
35
35
|
|
36
36
|
# NVGblendFactor
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
37
|
+
ZERO = 1 << 0
|
38
|
+
ONE = 1 << 1
|
39
|
+
SRC_COLOR = 1 << 2
|
40
|
+
ONE_MINUS_SRC_COLOR = 1 << 3
|
41
|
+
DST_COLOR = 1 << 4
|
42
|
+
ONE_MINUS_DST_COLOR = 1 << 5
|
43
|
+
SRC_ALPHA = 1 << 6
|
44
|
+
ONE_MINUS_SRC_ALPHA = 1 << 7
|
45
|
+
DST_ALPHA = 1 << 8
|
46
|
+
ONE_MINUS_DST_ALPHA = 1 << 9
|
47
|
+
SRC_ALPHA_SATURATE = 1 << 10
|
48
48
|
|
49
49
|
# NVGcompositeOperation
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
50
|
+
SOURCE_OVER = 0
|
51
|
+
SOURCE_IN = 1
|
52
|
+
SOURCE_OUT = 2
|
53
|
+
ATOP = 3
|
54
|
+
DESTINATION_OVER = 4
|
55
|
+
DESTINATION_IN = 5
|
56
|
+
DESTINATION_OUT = 6
|
57
|
+
DESTINATION_ATOP = 7
|
58
|
+
LIGHTER = 8
|
59
|
+
COPY = 9
|
60
|
+
XOR = 10
|
61
61
|
|
62
62
|
# NVGimageFlags
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
63
|
+
IMAGE_GENERATE_MIPMAPS = 1
|
64
|
+
IMAGE_REPEATX = 2
|
65
|
+
IMAGE_REPEATY = 4
|
66
|
+
IMAGE_FLIPY = 8
|
67
|
+
IMAGE_PREMULTIPLIED = 16
|
68
|
+
IMAGE_NEAREST = 32
|
69
69
|
|
70
70
|
# NVGcreateFlags
|
71
|
-
|
72
|
-
|
73
|
-
|
71
|
+
ANTIALIAS = 1
|
72
|
+
STENCIL_STROKES = 2
|
73
|
+
DEBUG = 4
|
74
74
|
|
75
75
|
#
|
76
76
|
# struct
|
77
77
|
#
|
78
78
|
|
79
|
-
class
|
79
|
+
class Color < FFI::Struct
|
80
80
|
layout(
|
81
81
|
:rgba, [:float, 4]
|
82
82
|
)
|
83
83
|
end
|
84
84
|
|
85
|
-
class
|
85
|
+
class Paint < FFI::Struct
|
86
86
|
layout(
|
87
87
|
:xform, [:float, 6],
|
88
88
|
:extent, [:float, 2],
|
89
89
|
:radius, :float,
|
90
90
|
:feather, :float,
|
91
|
-
:innerColor,
|
92
|
-
:outerColor,
|
91
|
+
:innerColor, Color,
|
92
|
+
:outerColor, Color,
|
93
93
|
:image, :int32
|
94
94
|
)
|
95
95
|
end
|
96
96
|
|
97
|
-
class
|
97
|
+
class CompositeOperationState < FFI::Struct
|
98
98
|
layout(
|
99
99
|
:srcRGB, :int32,
|
100
100
|
:dstRGB, :int32,
|
@@ -103,7 +103,7 @@ module NanoVG
|
|
103
103
|
)
|
104
104
|
end
|
105
105
|
|
106
|
-
class
|
106
|
+
class GlyphPosition < FFI::Struct
|
107
107
|
layout(
|
108
108
|
:str, :pointer,
|
109
109
|
:x, :float,
|
@@ -112,7 +112,7 @@ module NanoVG
|
|
112
112
|
)
|
113
113
|
end
|
114
114
|
|
115
|
-
class
|
115
|
+
class TextRow < FFI::Struct
|
116
116
|
layout(
|
117
117
|
:start, :pointer,
|
118
118
|
:end, :pointer,
|
@@ -138,132 +138,132 @@ module NanoVG
|
|
138
138
|
#
|
139
139
|
# Common API
|
140
140
|
#
|
141
|
-
attach_function :
|
142
|
-
attach_function :
|
143
|
-
attach_function :
|
144
|
-
|
145
|
-
attach_function :nvgGlobalCompositeOperation, [:pointer, :int32], :void
|
146
|
-
attach_function :nvgGlobalCompositeBlendFunc, [:pointer, :int32, :int32], :void
|
147
|
-
attach_function :nvgGlobalCompositeBlendFuncSeparate, [:pointer, :int32, :int32, :int32, :int32], :void
|
148
|
-
|
149
|
-
attach_function :
|
150
|
-
attach_function :
|
151
|
-
attach_function :
|
152
|
-
attach_function :
|
153
|
-
|
154
|
-
attach_function :
|
155
|
-
attach_function :
|
156
|
-
attach_function :
|
157
|
-
attach_function :
|
158
|
-
attach_function :
|
159
|
-
|
160
|
-
attach_function :
|
161
|
-
attach_function :
|
162
|
-
attach_function :
|
163
|
-
|
164
|
-
attach_function :
|
165
|
-
attach_function :
|
166
|
-
attach_function :nvgStrokePaint, [:pointer,
|
167
|
-
attach_function :nvgFillColor, [:pointer,
|
168
|
-
attach_function :nvgFillPaint, [:pointer,
|
169
|
-
attach_function :nvgMiterLimit, [:pointer, :float], :void
|
170
|
-
attach_function :nvgStrokeWidth, [:pointer, :float], :void
|
171
|
-
attach_function :nvgLineCap, [:pointer, :int32], :void
|
172
|
-
attach_function :nvgLineJoin, [:pointer, :int32], :void
|
173
|
-
attach_function :nvgGlobalAlpha, [:pointer, :float], :void
|
174
|
-
|
175
|
-
attach_function :
|
176
|
-
attach_function :
|
177
|
-
attach_function :
|
178
|
-
attach_function :
|
179
|
-
attach_function :
|
180
|
-
attach_function :
|
181
|
-
attach_function :
|
182
|
-
attach_function :
|
183
|
-
|
184
|
-
attach_function :
|
185
|
-
attach_function :
|
186
|
-
attach_function :
|
187
|
-
attach_function :
|
188
|
-
attach_function :
|
189
|
-
attach_function :
|
190
|
-
attach_function :
|
191
|
-
attach_function :
|
192
|
-
attach_function :
|
193
|
-
attach_function :
|
194
|
-
|
195
|
-
attach_function :
|
196
|
-
attach_function :
|
197
|
-
|
198
|
-
attach_function :
|
199
|
-
attach_function :
|
200
|
-
attach_function :
|
201
|
-
attach_function :
|
202
|
-
attach_function :
|
203
|
-
attach_function :
|
204
|
-
|
205
|
-
attach_function :
|
206
|
-
attach_function :
|
207
|
-
attach_function :
|
208
|
-
attach_function :
|
209
|
-
|
210
|
-
attach_function :
|
211
|
-
attach_function :
|
212
|
-
attach_function :
|
213
|
-
|
214
|
-
attach_function :
|
215
|
-
attach_function :
|
216
|
-
attach_function :
|
217
|
-
attach_function :
|
218
|
-
attach_function :
|
219
|
-
attach_function :
|
220
|
-
attach_function :
|
221
|
-
attach_function :
|
222
|
-
attach_function :
|
223
|
-
attach_function :
|
224
|
-
attach_function :
|
225
|
-
attach_function :
|
226
|
-
attach_function :
|
227
|
-
attach_function :
|
228
|
-
attach_function :
|
229
|
-
attach_function :
|
230
|
-
|
231
|
-
attach_function :
|
232
|
-
attach_function :
|
233
|
-
attach_function :
|
234
|
-
attach_function :
|
235
|
-
attach_function :
|
236
|
-
attach_function :
|
237
|
-
attach_function :
|
238
|
-
attach_function :
|
239
|
-
attach_function :
|
240
|
-
attach_function :
|
241
|
-
attach_function :
|
242
|
-
attach_function :
|
243
|
-
attach_function :
|
244
|
-
attach_function :
|
245
|
-
attach_function :
|
246
|
-
attach_function :
|
247
|
-
attach_function :
|
248
|
-
attach_function :
|
249
|
-
attach_function :
|
141
|
+
attach_function :BeginFrame, :nvgBeginFrame, [:pointer, :float, :float, :float], :void
|
142
|
+
attach_function :CancelFrame, :nvgCancelFrame, [:pointer], :void
|
143
|
+
attach_function :EndFrame, :nvgEndFrame, [:pointer], :void
|
144
|
+
|
145
|
+
attach_function :GlobalCompositeOperation, :nvgGlobalCompositeOperation, [:pointer, :int32], :void
|
146
|
+
attach_function :GlobalCompositeBlendFunc, :nvgGlobalCompositeBlendFunc, [:pointer, :int32, :int32], :void
|
147
|
+
attach_function :GlobalCompositeBlendFuncSeparate, :nvgGlobalCompositeBlendFuncSeparate, [:pointer, :int32, :int32, :int32, :int32], :void
|
148
|
+
|
149
|
+
attach_function :RGB, :nvgRGB, [:uint8, :uint8, :uint8], Color.by_value
|
150
|
+
attach_function :RGBf, :nvgRGBf, [:float, :float, :float], Color.by_value
|
151
|
+
attach_function :RGBA, :nvgRGBA, [:uint8, :uint8, :uint8, :uint8], Color.by_value
|
152
|
+
attach_function :RGBAf, :nvgRGBAf, [:float, :float, :float, :float], Color.by_value
|
153
|
+
|
154
|
+
attach_function :LerpRGBA, :nvgLerpRGBA, [Color.by_value, Color.by_value, :float], Color.by_value
|
155
|
+
attach_function :TransRGBA, :nvgTransRGBA, [Color.by_value, :uint8], Color.by_value
|
156
|
+
attach_function :TransRGBAf, :nvgTransRGBAf, [Color.by_value, :float], Color.by_value
|
157
|
+
attach_function :HSL, :nvgHSL, [:float, :float, :float], Color.by_value
|
158
|
+
attach_function :HSLA, :nvgHSLA, [:float, :float, :float, :uint8], Color.by_value
|
159
|
+
|
160
|
+
attach_function :Save, :nvgSave, [:pointer], :void
|
161
|
+
attach_function :Restore, :nvgRestore, [:pointer], :void
|
162
|
+
attach_function :Reset, :nvgReset, [:pointer], :void
|
163
|
+
|
164
|
+
attach_function :ShapeAntiAlias, :nvgShapeAntiAlias, [:pointer, Color.by_value], :void
|
165
|
+
attach_function :StrokeColor, :nvgStrokeColor, [:pointer, Color.by_value], :void
|
166
|
+
attach_function :StrokePaint, :nvgStrokePaint, [:pointer, Paint.by_value], :void
|
167
|
+
attach_function :FillColor, :nvgFillColor, [:pointer, Color.by_value], :void
|
168
|
+
attach_function :FillPaint, :nvgFillPaint, [:pointer, Paint.by_value], :void
|
169
|
+
attach_function :MiterLimit, :nvgMiterLimit, [:pointer, :float], :void
|
170
|
+
attach_function :StrokeWidth, :nvgStrokeWidth, [:pointer, :float], :void
|
171
|
+
attach_function :LineCap, :nvgLineCap, [:pointer, :int32], :void
|
172
|
+
attach_function :LineJoin, :nvgLineJoin, [:pointer, :int32], :void
|
173
|
+
attach_function :GlobalAlpha, :nvgGlobalAlpha, [:pointer, :float], :void
|
174
|
+
|
175
|
+
attach_function :ResetTransform, :nvgResetTransform, [:pointer], :void
|
176
|
+
attach_function :Transform, :nvgTransform, [:pointer, :float, :float, :float, :float, :float, :float], :void
|
177
|
+
attach_function :Translate, :nvgTranslate, [:pointer, :float, :float], :void
|
178
|
+
attach_function :Rotate, :nvgRotate, [:pointer, :float], :void
|
179
|
+
attach_function :SkewX, :nvgSkewX, [:pointer, :float], :void
|
180
|
+
attach_function :SkewY, :nvgSkewY, [:pointer, :float], :void
|
181
|
+
attach_function :Scale, :nvgScale, [:pointer, :float, :float], :void
|
182
|
+
attach_function :CurrentTransform, :nvgCurrentTransform, [:pointer, :pointer], :void
|
183
|
+
|
184
|
+
attach_function :TransformIdentity, :nvgTransformIdentity, [:pointer], :void
|
185
|
+
attach_function :TransformTranslate, :nvgTransformTranslate, [:pointer, :float, :float], :void
|
186
|
+
attach_function :TransformScale, :nvgTransformScale, [:pointer, :float, :float], :void
|
187
|
+
attach_function :TransformRotate, :nvgTransformRotate, [:pointer, :float], :void
|
188
|
+
attach_function :TransformSkewX, :nvgTransformSkewX, [:pointer, :float], :void
|
189
|
+
attach_function :TransformSkewY, :nvgTransformSkewY, [:pointer, :float], :void
|
190
|
+
attach_function :TransformMultiply, :nvgTransformMultiply, [:pointer, :pointer], :void
|
191
|
+
attach_function :TransformPremultiply, :nvgTransformPremultiply, [:pointer, :pointer], :void
|
192
|
+
attach_function :TransformInverse, :nvgTransformInverse, [:pointer, :pointer], :int32
|
193
|
+
attach_function :TransformPoint, :nvgTransformPoint, [:pointer, :pointer, :pointer, :float, :float], :void
|
194
|
+
|
195
|
+
attach_function :DegToRad, :nvgDegToRad, [:float], :float
|
196
|
+
attach_function :RadToDeg, :nvgRadToDeg, [:float], :float
|
197
|
+
|
198
|
+
attach_function :CreateImage, :nvgCreateImage, [:pointer, :pointer, :int32], :int32
|
199
|
+
attach_function :CreateImageMem, :nvgCreateImageMem, [:pointer, :int32, :pointer, :int32], :int32
|
200
|
+
attach_function :CreateImageRGBA, :nvgCreateImageRGBA, [:pointer, :int32, :int32, :int32, :pointer], :int32
|
201
|
+
attach_function :UpdateImage, :nvgUpdateImage, [:pointer, :int32, :pointer], :void
|
202
|
+
attach_function :ImageSize, :nvgImageSize, [:pointer, :int32, :pointer, :pointer], :void
|
203
|
+
attach_function :DeleteImage, :nvgDeleteImage, [:pointer, :int32], :void
|
204
|
+
|
205
|
+
attach_function :LinearGradient, :nvgLinearGradient, [:pointer, :float, :float, :float, :float, Color.by_value, Color.by_value], Paint.by_value
|
206
|
+
attach_function :BoxGradient, :nvgBoxGradient, [:pointer, :float, :float, :float, :float, :float, :float, Color.by_value, Color.by_value], Paint.by_value
|
207
|
+
attach_function :RadialGradient, :nvgRadialGradient, [:pointer, :float, :float, :float, :float, Color.by_value, Color.by_value], Paint.by_value
|
208
|
+
attach_function :ImagePattern, :nvgImagePattern, [:pointer, :float, :float, :float, :float, :float, :int32, :float], Paint.by_value
|
209
|
+
|
210
|
+
attach_function :Scissor, :nvgScissor, [:pointer, :float, :float, :float, :float], :void
|
211
|
+
attach_function :IntersectScissor, :nvgIntersectScissor, [:pointer, :float, :float, :float, :float], :void
|
212
|
+
attach_function :ResetScissor, :nvgResetScissor, [:pointer], :void
|
213
|
+
|
214
|
+
attach_function :BeginPath, :nvgBeginPath, [:pointer], :void
|
215
|
+
attach_function :MoveTo, :nvgMoveTo, [:pointer, :float, :float], :void
|
216
|
+
attach_function :LineTo, :nvgLineTo, [:pointer, :float, :float], :void
|
217
|
+
attach_function :BezierTo, :nvgBezierTo, [:pointer, :float, :float, :float, :float, :float, :float], :void
|
218
|
+
attach_function :QuadTo, :nvgQuadTo, [:pointer, :float, :float, :float, :float], :void
|
219
|
+
attach_function :ArcTo, :nvgArcTo, [:pointer, :float, :float, :float, :float, :float], :void
|
220
|
+
attach_function :ClosePath, :nvgClosePath, [:pointer], :void
|
221
|
+
attach_function :PathWinding, :nvgPathWinding, [:pointer, :int32], :void
|
222
|
+
attach_function :Arc, :nvgArc, [:pointer, :float, :float, :float, :float, :float, :int32], :void
|
223
|
+
attach_function :Rect, :nvgRect, [:pointer, :float, :float, :float, :float], :void
|
224
|
+
attach_function :RoundedRect, :nvgRoundedRect, [:pointer, :float, :float, :float, :float, :float], :void
|
225
|
+
attach_function :RoundedRectVarying, :nvgRoundedRectVarying, [:pointer, :float, :float, :float, :float, :float, :float, :float, :float], :void
|
226
|
+
attach_function :Ellipse, :nvgEllipse, [:pointer, :float, :float, :float, :float], :void
|
227
|
+
attach_function :Circle, :nvgCircle, [:pointer, :float, :float, :float], :void
|
228
|
+
attach_function :Fill, :nvgFill, [:pointer], :void
|
229
|
+
attach_function :Stroke, :nvgStroke, [:pointer], :void
|
230
|
+
|
231
|
+
attach_function :CreateFont, :nvgCreateFont, [:pointer, :pointer, :pointer], :int32
|
232
|
+
attach_function :CreateFontMem, :nvgCreateFontMem, [:pointer, :pointer, :pointer, :int32, :int32], :int32
|
233
|
+
attach_function :FindFont, :nvgFindFont, [:pointer, :pointer], :int32
|
234
|
+
attach_function :AddFallbackFontId, :nvgAddFallbackFontId, [:pointer, :int32, :int32], :int32
|
235
|
+
attach_function :AddFallbackFont, :nvgAddFallbackFont, [:pointer, :pointer, :pointer], :int32
|
236
|
+
attach_function :FontSize, :nvgFontSize, [:pointer, :float], :void
|
237
|
+
attach_function :FontBlur, :nvgFontBlur, [:pointer, :float], :void
|
238
|
+
attach_function :TextLetterSpacing, :nvgTextLetterSpacing, [:pointer, :float], :void
|
239
|
+
attach_function :TextLineHeight, :nvgTextLineHeight, [:pointer, :float], :void
|
240
|
+
attach_function :TextAlign, :nvgTextAlign, [:pointer, :int32], :void
|
241
|
+
attach_function :FontFaceId, :nvgFontFaceId, [:pointer, :int32], :void
|
242
|
+
attach_function :FontFace, :nvgFontFace, [:pointer, :pointer], :void
|
243
|
+
attach_function :Text, :nvgText, [:pointer, :float, :float, :pointer, :pointer], :float
|
244
|
+
attach_function :TextBox, :nvgTextBox, [:pointer, :float, :float, :float, :pointer, :pointer], :void
|
245
|
+
attach_function :TextBounds, :nvgTextBounds, [:pointer, :float, :float, :pointer, :pointer, :pointer], :float
|
246
|
+
attach_function :TextBoxBounds, :nvgTextBoxBounds, [:pointer, :float, :float, :float, :pointer, :pointer, :pointer], :void
|
247
|
+
attach_function :TextGlyphPositions, :nvgTextGlyphPositions, [:pointer, :float, :float, :pointer, :pointer, :pointer, :int32], :int32
|
248
|
+
attach_function :TextMetrics, :nvgTextMetrics, [:pointer, :pointer, :pointer, :pointer], :void
|
249
|
+
attach_function :TextBreakLines, :nvgTextBreakLines, [:pointer, :pointer, :pointer, :float, :pointer, :int32], :int32
|
250
250
|
|
251
251
|
#
|
252
252
|
# GL2-specific API (nanovg_gl)
|
253
253
|
#
|
254
254
|
if render_backend == :gl2
|
255
|
-
attach_function :
|
256
|
-
attach_function :
|
257
|
-
attach_function :
|
255
|
+
attach_function :CreateGL2, :nvgCreateGL2, [:int32], :pointer
|
256
|
+
attach_function :DeleteGL2, :nvgDeleteGL2, [:pointer], :void
|
257
|
+
attach_function :SetupGL2, :nvgSetupGL2, [], :void
|
258
258
|
end
|
259
259
|
|
260
260
|
#
|
261
261
|
# GL3-specific API (nanovg_gl)
|
262
262
|
#
|
263
263
|
if render_backend == :gl3
|
264
|
-
attach_function :
|
265
|
-
attach_function :
|
266
|
-
attach_function :
|
264
|
+
attach_function :CreateGL3, :nvgCreateGL3, [:int32], :pointer
|
265
|
+
attach_function :DeleteGL3, :nvgDeleteGL3, [:pointer], :void
|
266
|
+
attach_function :SetupGL3, :nvgSetupGL3, [], :void
|
267
267
|
end
|
268
268
|
|
269
269
|
@@nanovg_import_done = true
|
metadata
CHANGED
@@ -1,16 +1,44 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanovg-bindings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vaiorabbit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
12
|
-
dependencies:
|
13
|
-
|
11
|
+
date: 2022-01-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: ffi
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.15'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.15'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: opengl-bindings2
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2'
|
41
|
+
description: 'Ruby bindings for NanoVG ( https://github.com/memononen/nanovg ).
|
14
42
|
|
15
43
|
'
|
16
44
|
email:
|
@@ -46,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
46
74
|
- !ruby/object:Gem::Version
|
47
75
|
version: '0'
|
48
76
|
requirements: []
|
49
|
-
rubygems_version: 3.3.
|
77
|
+
rubygems_version: 3.3.4
|
50
78
|
signing_key:
|
51
79
|
specification_version: 4
|
52
80
|
summary: Bindings for NanoVG
|