@nativescript/canvas 2.0.0-alpha.49 → 2.0.0-alpha.50
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.
- package/package.json +1 -1
- package/platforms/android/canvas-release.aar +0 -0
- package/platforms/ios/CanvasNative.xcframework/Info.plist +5 -5
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +219 -166
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.h +713 -1
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp +371 -217
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.h +1270 -4
|
@@ -3,9 +3,233 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
#include "WebGL2RenderingContext.h"
|
|
6
|
+
|
|
7
|
+
v8::CFunction WebGL2RenderingContext::fast_begin_query_(
|
|
8
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastBeginQuery));
|
|
9
|
+
|
|
10
|
+
v8::CFunction WebGL2RenderingContext::fast_begin_transform_feedback_(
|
|
11
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastBeginTransformFeedback));
|
|
12
|
+
|
|
6
13
|
v8::CFunction WebGL2RenderingContext::fast_bind_vertex_array_(
|
|
7
14
|
v8::CFunction::Make(WebGL2RenderingContext::FastBindVertexArray));
|
|
8
15
|
|
|
16
|
+
|
|
17
|
+
v8::CFunction WebGL2RenderingContext::fast_bind_buffer_base_(
|
|
18
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastBindBufferBase));
|
|
19
|
+
|
|
20
|
+
v8::CFunction WebGL2RenderingContext::fast_bind_buffer_range_(
|
|
21
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastBindBufferRange));
|
|
22
|
+
|
|
23
|
+
v8::CFunction WebGL2RenderingContext::fast_bind_sampler_(
|
|
24
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastBindSampler));
|
|
25
|
+
|
|
26
|
+
v8::CFunction WebGL2RenderingContext::fast_bind_transform_feedback_(
|
|
27
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastBindTransformFeedback));
|
|
28
|
+
|
|
29
|
+
v8::CFunction WebGL2RenderingContext::fast_blit_framebuffer_(
|
|
30
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastBlitFramebuffer));
|
|
31
|
+
|
|
32
|
+
v8::CFunction WebGL2RenderingContext::fast_clear_buffer_fi_(
|
|
33
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastClearBufferfi));
|
|
34
|
+
|
|
35
|
+
v8::CFunction WebGL2RenderingContext::fast_clear_buffer_fv_(
|
|
36
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastClearBufferfv));
|
|
37
|
+
|
|
38
|
+
v8::CFunction WebGL2RenderingContext::fast_clear_buffer_fv_array_(
|
|
39
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastClearBufferfvArray));
|
|
40
|
+
|
|
41
|
+
const v8::CFunction fast_clear_buffer_fv_overloads_[] = {
|
|
42
|
+
WebGL2RenderingContext::fast_clear_buffer_fv_,
|
|
43
|
+
WebGL2RenderingContext::fast_clear_buffer_fv_array_
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
v8::CFunction WebGL2RenderingContext::fast_clear_buffer_iv_(
|
|
47
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastClearBufferiv));
|
|
48
|
+
|
|
49
|
+
v8::CFunction WebGL2RenderingContext::fast_clear_buffer_iv_array_(
|
|
50
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastClearBufferivArray));
|
|
51
|
+
|
|
52
|
+
const v8::CFunction fast_clear_buffer_iv_overloads_[] = {
|
|
53
|
+
WebGL2RenderingContext::fast_clear_buffer_iv_,
|
|
54
|
+
WebGL2RenderingContext::fast_clear_buffer_iv_array_
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
v8::CFunction WebGL2RenderingContext::fast_clear_buffer_uiv_(
|
|
59
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastClearBufferuiv));
|
|
60
|
+
|
|
61
|
+
v8::CFunction WebGL2RenderingContext::fast_clear_buffer_uiv_array_(
|
|
62
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastClearBufferuivArray));
|
|
63
|
+
|
|
64
|
+
const v8::CFunction fast_clear_buffer_uiv_overloads_[] = {
|
|
65
|
+
WebGL2RenderingContext::fast_clear_buffer_uiv_,
|
|
66
|
+
WebGL2RenderingContext::fast_clear_buffer_uiv_array_
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
v8::CFunction WebGL2RenderingContext::fast_draw_arrays_instanced_(
|
|
70
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastDrawArraysInstanced));
|
|
71
|
+
|
|
72
|
+
v8::CFunction WebGL2RenderingContext::fast_draw_buffers_(
|
|
73
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastDrawBuffers));
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
v8::CFunction WebGL2RenderingContext::fast_draw_elements_instanced_(
|
|
77
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastDrawElementsInstanced));
|
|
78
|
+
|
|
79
|
+
v8::CFunction WebGL2RenderingContext::fast_draw_range_elements_(
|
|
80
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastDrawRangeElements));
|
|
81
|
+
|
|
82
|
+
v8::CFunction WebGL2RenderingContext::fast_resume_transform_feedback_(
|
|
83
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastResumeTransformFeedback));
|
|
84
|
+
|
|
85
|
+
v8::CFunction WebGL2RenderingContext::fast_sampler_parameterf_(
|
|
86
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastSamplerParameterf));
|
|
87
|
+
|
|
88
|
+
v8::CFunction WebGL2RenderingContext::fast_sampler_parameteri_(
|
|
89
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastSamplerParameteri));
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_1ui_(
|
|
93
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniform1ui));
|
|
94
|
+
|
|
95
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_1uiv_(
|
|
96
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniform1uiv));
|
|
97
|
+
|
|
98
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_2ui_(
|
|
99
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniform2ui));
|
|
100
|
+
|
|
101
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_2uiv_(
|
|
102
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniform2uiv));
|
|
103
|
+
|
|
104
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_3ui_(
|
|
105
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniform3ui));
|
|
106
|
+
|
|
107
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_3uiv_(
|
|
108
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniform3uiv));
|
|
109
|
+
|
|
110
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_4ui_(
|
|
111
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniform4ui));
|
|
112
|
+
|
|
113
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_4uiv_(
|
|
114
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniform4uiv));
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_2x3fv_(
|
|
118
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix2x3fv));
|
|
119
|
+
|
|
120
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_2x3fv_array_(
|
|
121
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix2x3fvArray));
|
|
122
|
+
|
|
123
|
+
const v8::CFunction fast_uniform_matrix_2x3fv_overloads_[] = {
|
|
124
|
+
WebGL2RenderingContext::fast_uniform_matrix_2x3fv_,
|
|
125
|
+
WebGL2RenderingContext::fast_uniform_matrix_2x3fv_array_
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_2x4fv_(
|
|
130
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix2x4fv));
|
|
131
|
+
|
|
132
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_2x4fv_array_(
|
|
133
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix2x4fvArray));
|
|
134
|
+
|
|
135
|
+
const v8::CFunction fast_uniform_matrix_2x4fv_overloads_[] = {
|
|
136
|
+
WebGL2RenderingContext::fast_uniform_matrix_2x4fv_,
|
|
137
|
+
WebGL2RenderingContext::fast_uniform_matrix_2x4fv_array_
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_3x2fv_(
|
|
142
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix3x2fv));
|
|
143
|
+
|
|
144
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_3x2fv_array_(
|
|
145
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix3x2fvArray));
|
|
146
|
+
|
|
147
|
+
const v8::CFunction fast_uniform_matrix_3x2fv_overloads_[] = {
|
|
148
|
+
WebGL2RenderingContext::fast_uniform_matrix_3x2fv_,
|
|
149
|
+
WebGL2RenderingContext::fast_uniform_matrix_3x2fv_array_
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_3x4fv_(
|
|
153
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix3x4fv));
|
|
154
|
+
|
|
155
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_3x4fv_array_(
|
|
156
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix3x4fvArray));
|
|
157
|
+
|
|
158
|
+
const v8::CFunction fast_uniform_matrix_3x4fv_overloads_[] = {
|
|
159
|
+
WebGL2RenderingContext::fast_uniform_matrix_3x4fv_,
|
|
160
|
+
WebGL2RenderingContext::fast_uniform_matrix_3x4fv_array_
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_4x2fv_(
|
|
165
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix4x2fv));
|
|
166
|
+
|
|
167
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_4x2fv_array_(
|
|
168
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix4x2fvArray));
|
|
169
|
+
|
|
170
|
+
const v8::CFunction fast_uniform_matrix_4x2fv_overloads_[] = {
|
|
171
|
+
WebGL2RenderingContext::fast_uniform_matrix_4x2fv_,
|
|
172
|
+
WebGL2RenderingContext::fast_uniform_matrix_4x2fv_array_
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_4x3fv_(
|
|
177
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix4x3fv));
|
|
178
|
+
|
|
179
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_4x3fv_array_(
|
|
180
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix4x3fvArray));
|
|
181
|
+
|
|
182
|
+
const v8::CFunction fast_uniform_matrix_4x3fv_overloads_[] = {
|
|
183
|
+
WebGL2RenderingContext::fast_uniform_matrix_4x3fv_,
|
|
184
|
+
WebGL2RenderingContext::fast_uniform_matrix_4x3fv_array_
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
v8::CFunction WebGL2RenderingContext::fast_vertex_attrib_divisor_(
|
|
188
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastVertexAttribDivisor));
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
v8::CFunction WebGL2RenderingContext::fast_vertex_attrib_i_4i_(
|
|
192
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastVertexAttribI4i));
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
v8::CFunction WebGL2RenderingContext::fast_vertex_attrib_i_4iv_(
|
|
196
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastVertexAttribI4iv));
|
|
197
|
+
|
|
198
|
+
v8::CFunction WebGL2RenderingContext::fast_vertex_attrib_i_4iv_array_(
|
|
199
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastVertexAttribI4ivArray));
|
|
200
|
+
|
|
201
|
+
const v8::CFunction fast_vertex_attrib_i_4iv_overloads_[] = {
|
|
202
|
+
WebGL2RenderingContext::fast_vertex_attrib_i_4iv_,
|
|
203
|
+
WebGL2RenderingContext::fast_vertex_attrib_i_4iv_array_
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
v8::CFunction WebGL2RenderingContext::fast_vertex_attrib_i_4ui_(
|
|
208
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastVertexAttribI4ui));
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
v8::CFunction WebGL2RenderingContext::fast_vertex_attrib_i_4uiv_(
|
|
212
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastVertexAttribI4uiv));
|
|
213
|
+
|
|
214
|
+
v8::CFunction WebGL2RenderingContext::fast_vertex_attrib_i_4uiv_array_(
|
|
215
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastVertexAttribI4uivArray));
|
|
216
|
+
|
|
217
|
+
const v8::CFunction fast_vertex_attrib_i_4uiv_overloads_[] = {
|
|
218
|
+
WebGL2RenderingContext::fast_vertex_attrib_i_4uiv_,
|
|
219
|
+
WebGL2RenderingContext::fast_vertex_attrib_i_4uiv_array_
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
v8::CFunction WebGL2RenderingContext::fast_uniform_block_binding_(
|
|
223
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformBlockBinding));
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
v8::CFunction WebGL2RenderingContext::fast_invalidate_framebuffer_(
|
|
227
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastInvalidateFramebuffer));
|
|
228
|
+
|
|
229
|
+
v8::CFunction WebGL2RenderingContext::fast_invalidate_sub_framebuffer_(
|
|
230
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastInvalidateSubFramebuffer));
|
|
231
|
+
|
|
232
|
+
|
|
9
233
|
WebGL2RenderingContext::WebGL2RenderingContext(WebGLState *state) : WebGLRenderingContext(
|
|
10
234
|
state, WebGLRenderingVersion::V2) {
|
|
11
235
|
}
|
|
@@ -61,7 +285,7 @@ void WebGL2RenderingContext::BeginQuery(const v8::FunctionCallbackInfo<v8::Value
|
|
|
61
285
|
auto context = isolate->GetCurrentContext();
|
|
62
286
|
|
|
63
287
|
auto value = args[1];
|
|
64
|
-
auto type = GetNativeType(
|
|
288
|
+
auto type = GetNativeType(value);
|
|
65
289
|
if (type == NativeType::WebGLQuery) {
|
|
66
290
|
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
67
291
|
auto query = WebGLQuery::GetPointer(value.As<v8::Object>());
|
|
@@ -103,7 +327,7 @@ void WebGL2RenderingContext::BindBufferBase(const v8::FunctionCallbackInfo<v8::V
|
|
|
103
327
|
auto context = isolate->GetCurrentContext();
|
|
104
328
|
|
|
105
329
|
auto bufferValue = args[2];
|
|
106
|
-
auto type = GetNativeType(
|
|
330
|
+
auto type = GetNativeType(bufferValue);
|
|
107
331
|
|
|
108
332
|
if (type == NativeType::WebGLBuffer) {
|
|
109
333
|
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
@@ -130,7 +354,7 @@ void WebGL2RenderingContext::BindBufferRange(const v8::FunctionCallbackInfo<v8::
|
|
|
130
354
|
auto context = isolate->GetCurrentContext();
|
|
131
355
|
|
|
132
356
|
auto bufferValue = args[2];
|
|
133
|
-
auto type = GetNativeType(
|
|
357
|
+
auto type = GetNativeType(bufferValue);
|
|
134
358
|
if (type == NativeType::WebGLBuffer) {
|
|
135
359
|
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
136
360
|
auto index = args[1]->Uint32Value(context).ToChecked();
|
|
@@ -158,7 +382,7 @@ void WebGL2RenderingContext::BindSampler(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
158
382
|
auto context = isolate->GetCurrentContext();
|
|
159
383
|
|
|
160
384
|
auto samplerValue = args[1];
|
|
161
|
-
auto type = GetNativeType(
|
|
385
|
+
auto type = GetNativeType(samplerValue);
|
|
162
386
|
if (type == NativeType::WebGLSampler) {
|
|
163
387
|
auto unit = args[0]->Uint32Value(context).ToChecked();
|
|
164
388
|
auto sampler = WebGLSampler::GetPointer(samplerValue.As<v8::Object>());
|
|
@@ -182,7 +406,7 @@ WebGL2RenderingContext::BindTransformFeedback(const v8::FunctionCallbackInfo<v8:
|
|
|
182
406
|
auto context = isolate->GetCurrentContext();
|
|
183
407
|
|
|
184
408
|
auto transformFeedbackValue = args[1];
|
|
185
|
-
auto type = GetNativeType(
|
|
409
|
+
auto type = GetNativeType(transformFeedbackValue);
|
|
186
410
|
|
|
187
411
|
if (type == NativeType::WebGLTransformFeedback) {
|
|
188
412
|
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
@@ -214,7 +438,7 @@ void WebGL2RenderingContext::BindVertexArray(const v8::FunctionCallbackInfo<v8::
|
|
|
214
438
|
return;
|
|
215
439
|
}
|
|
216
440
|
|
|
217
|
-
auto type = GetNativeType(
|
|
441
|
+
auto type = GetNativeType(value);
|
|
218
442
|
if (type == NativeType::WebGLVertexArrayObject) {
|
|
219
443
|
auto vertexArray = WebGLVertexArrayObject::GetPointer(value.As<v8::Object>());
|
|
220
444
|
|
|
@@ -458,7 +682,7 @@ void WebGL2RenderingContext::ClientWaitSync(const v8::FunctionCallbackInfo<v8::V
|
|
|
458
682
|
auto context = isolate->GetCurrentContext();
|
|
459
683
|
|
|
460
684
|
auto syncValue = args[0];
|
|
461
|
-
auto type = GetNativeType(
|
|
685
|
+
auto type = GetNativeType(syncValue);
|
|
462
686
|
if (args.Length() > 2 && type == NativeType::WebGLSync) {
|
|
463
687
|
auto sync = WebGLSyncImpl::GetPointer(syncValue.As<v8::Object>());
|
|
464
688
|
if (sync != nullptr) {
|
|
@@ -696,7 +920,7 @@ void WebGL2RenderingContext::DeleteQuery(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
696
920
|
auto isolate = args.GetIsolate();
|
|
697
921
|
|
|
698
922
|
auto queryValue = args[0];
|
|
699
|
-
auto type = GetNativeType(
|
|
923
|
+
auto type = GetNativeType(queryValue);
|
|
700
924
|
if (type == NativeType::WebGLQuery) {
|
|
701
925
|
auto query = WebGLQuery::GetPointer(queryValue.As<v8::Object>());
|
|
702
926
|
|
|
@@ -719,7 +943,7 @@ void WebGL2RenderingContext::DeleteSampler(const v8::FunctionCallbackInfo<v8::Va
|
|
|
719
943
|
|
|
720
944
|
|
|
721
945
|
auto samplerValue = args[0];
|
|
722
|
-
auto type = GetNativeType(
|
|
946
|
+
auto type = GetNativeType(samplerValue);
|
|
723
947
|
|
|
724
948
|
if (type == NativeType::WebGLSampler) {
|
|
725
949
|
auto sampler = WebGLSampler::GetPointer(samplerValue.As<v8::Object>());
|
|
@@ -743,7 +967,7 @@ void WebGL2RenderingContext::DeleteSync(const v8::FunctionCallbackInfo<v8::Value
|
|
|
743
967
|
|
|
744
968
|
|
|
745
969
|
auto syncValue = args[0];
|
|
746
|
-
auto type = GetNativeType(
|
|
970
|
+
auto type = GetNativeType(syncValue);
|
|
747
971
|
if (type == NativeType::WebGLSync) {
|
|
748
972
|
auto sync = WebGLSyncImpl::GetPointer(syncValue.As<v8::Object>());
|
|
749
973
|
|
|
@@ -767,7 +991,7 @@ WebGL2RenderingContext::DeleteTransformFeedback(const v8::FunctionCallbackInfo<v
|
|
|
767
991
|
|
|
768
992
|
|
|
769
993
|
auto transformFeedbackValue = args[0];
|
|
770
|
-
auto type = GetNativeType(
|
|
994
|
+
auto type = GetNativeType(transformFeedbackValue);
|
|
771
995
|
if (type == NativeType::WebGLTransformFeedback) {
|
|
772
996
|
auto transformFeedback = WebGLTransformFeedback::GetPointer(
|
|
773
997
|
transformFeedbackValue.As<v8::Object>());
|
|
@@ -791,7 +1015,7 @@ void WebGL2RenderingContext::DeleteVertexArray(const v8::FunctionCallbackInfo<v8
|
|
|
791
1015
|
|
|
792
1016
|
|
|
793
1017
|
auto vertexArrayValue = args[0];
|
|
794
|
-
auto type = GetNativeType(
|
|
1018
|
+
auto type = GetNativeType(vertexArrayValue);
|
|
795
1019
|
if (type == NativeType::WebGLVertexArrayObject) {
|
|
796
1020
|
|
|
797
1021
|
auto vertexArray = WebGLVertexArrayObject::GetPointer(vertexArrayValue.As<v8::Object>());
|
|
@@ -972,7 +1196,7 @@ WebGL2RenderingContext::FramebufferTextureLayer(const v8::FunctionCallbackInfo<v
|
|
|
972
1196
|
|
|
973
1197
|
|
|
974
1198
|
auto textureValue = args[2];
|
|
975
|
-
auto type = GetNativeType(
|
|
1199
|
+
auto type = GetNativeType(textureValue);
|
|
976
1200
|
if (type == NativeType::WebGLTexture) {
|
|
977
1201
|
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
978
1202
|
auto attachment = args[1]->Uint32Value(context).ToChecked();
|
|
@@ -1005,7 +1229,7 @@ WebGL2RenderingContext::GetActiveUniformBlockName(const v8::FunctionCallbackInfo
|
|
|
1005
1229
|
auto context = isolate->GetCurrentContext();
|
|
1006
1230
|
|
|
1007
1231
|
auto programValue = args[0];
|
|
1008
|
-
auto type = GetNativeType(
|
|
1232
|
+
auto type = GetNativeType(programValue);
|
|
1009
1233
|
if (type == NativeType::WebGLProgram) {
|
|
1010
1234
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
1011
1235
|
if (program != nullptr) {
|
|
@@ -1036,7 +1260,7 @@ void WebGL2RenderingContext::GetActiveUniformBlockParameter(
|
|
|
1036
1260
|
auto context = isolate->GetCurrentContext();
|
|
1037
1261
|
|
|
1038
1262
|
auto programValue = args[0];
|
|
1039
|
-
auto type = GetNativeType(
|
|
1263
|
+
auto type = GetNativeType(programValue);
|
|
1040
1264
|
|
|
1041
1265
|
if (type == NativeType::WebGLProgram) {
|
|
1042
1266
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
@@ -1111,7 +1335,7 @@ void WebGL2RenderingContext::GetActiveUniforms(const v8::FunctionCallbackInfo<v8
|
|
|
1111
1335
|
auto context = isolate->GetCurrentContext();
|
|
1112
1336
|
|
|
1113
1337
|
auto programValue = args[0];
|
|
1114
|
-
auto type = GetNativeType(
|
|
1338
|
+
auto type = GetNativeType(programValue);
|
|
1115
1339
|
if (type == NativeType::WebGLProgram) {
|
|
1116
1340
|
|
|
1117
1341
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
@@ -1278,7 +1502,7 @@ void WebGL2RenderingContext::GetFragDataLocation(const v8::FunctionCallbackInfo<
|
|
|
1278
1502
|
|
|
1279
1503
|
auto programValue = args[0];
|
|
1280
1504
|
auto nameValue = args[1];
|
|
1281
|
-
auto type = GetNativeType(
|
|
1505
|
+
auto type = GetNativeType(programValue);
|
|
1282
1506
|
if (type == NativeType::WebGLProgram && nameValue->IsString()) {
|
|
1283
1507
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
1284
1508
|
|
|
@@ -1496,7 +1720,7 @@ void WebGL2RenderingContext::GetQueryParameter(const v8::FunctionCallbackInfo<v8
|
|
|
1496
1720
|
auto context = isolate->GetCurrentContext();
|
|
1497
1721
|
|
|
1498
1722
|
auto queryValue = args[0];
|
|
1499
|
-
auto type = GetNativeType(
|
|
1723
|
+
auto type = GetNativeType(queryValue);
|
|
1500
1724
|
if (type == NativeType::WebGLQuery) {
|
|
1501
1725
|
auto query = WebGLQuery::GetPointer(queryValue.As<v8::Object>());
|
|
1502
1726
|
if (query != nullptr) {
|
|
@@ -1565,7 +1789,7 @@ void WebGL2RenderingContext::GetSamplerParameter(const v8::FunctionCallbackInfo<
|
|
|
1565
1789
|
auto context = isolate->GetCurrentContext();
|
|
1566
1790
|
|
|
1567
1791
|
auto samplerValue = args[0];
|
|
1568
|
-
auto type = GetNativeType(
|
|
1792
|
+
auto type = GetNativeType(samplerValue);
|
|
1569
1793
|
if (type == NativeType::WebGLSampler) {
|
|
1570
1794
|
auto sampler = WebGLSampler::GetPointer(samplerValue.As<v8::Object>());
|
|
1571
1795
|
if (sampler != nullptr) {
|
|
@@ -1655,7 +1879,7 @@ void WebGL2RenderingContext::GetTransformFeedbackVarying(
|
|
|
1655
1879
|
auto context = isolate->GetCurrentContext();
|
|
1656
1880
|
|
|
1657
1881
|
auto programValue = args[0];
|
|
1658
|
-
auto type = GetNativeType(
|
|
1882
|
+
auto type = GetNativeType(programValue);
|
|
1659
1883
|
if (type == NativeType::WebGLProgram) {
|
|
1660
1884
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
1661
1885
|
auto index = args[1]->Uint32Value(context).ToChecked();
|
|
@@ -1693,7 +1917,7 @@ void WebGL2RenderingContext::GetUniformBlockIndex(const v8::FunctionCallbackInfo
|
|
|
1693
1917
|
auto context = isolate->GetCurrentContext();
|
|
1694
1918
|
|
|
1695
1919
|
auto programValue = args[0];
|
|
1696
|
-
auto type = GetNativeType(
|
|
1920
|
+
auto type = GetNativeType(programValue);
|
|
1697
1921
|
if (type == NativeType::WebGLProgram) {
|
|
1698
1922
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
1699
1923
|
auto index = ConvertFromV8String(isolate, args[1]);
|
|
@@ -1721,7 +1945,7 @@ void WebGL2RenderingContext::GetUniformIndices(const v8::FunctionCallbackInfo<v8
|
|
|
1721
1945
|
auto context = isolate->GetCurrentContext();
|
|
1722
1946
|
|
|
1723
1947
|
auto programValue = args[0];
|
|
1724
|
-
auto type = GetNativeType(
|
|
1948
|
+
auto type = GetNativeType(programValue);
|
|
1725
1949
|
if (type == NativeType::WebGLProgram) {
|
|
1726
1950
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
1727
1951
|
auto uniformNamesObject = args[1];
|
|
@@ -1852,7 +2076,7 @@ void WebGL2RenderingContext::IsQuery(const v8::FunctionCallbackInfo<v8::Value> &
|
|
|
1852
2076
|
auto context = isolate->GetCurrentContext();
|
|
1853
2077
|
|
|
1854
2078
|
auto value = args[0];
|
|
1855
|
-
auto type = GetNativeType(
|
|
2079
|
+
auto type = GetNativeType(value);
|
|
1856
2080
|
if (type == NativeType::WebGLQuery) {
|
|
1857
2081
|
auto query = WebGLQuery::GetPointer(value.As<v8::Object>());
|
|
1858
2082
|
if (query != nullptr) {
|
|
@@ -1877,7 +2101,7 @@ void WebGL2RenderingContext::IsSampler(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
1877
2101
|
auto context = isolate->GetCurrentContext();
|
|
1878
2102
|
|
|
1879
2103
|
auto value = args[0];
|
|
1880
|
-
auto type = GetNativeType(
|
|
2104
|
+
auto type = GetNativeType(value);
|
|
1881
2105
|
if (type == NativeType::WebGLSampler) {
|
|
1882
2106
|
auto query = WebGLSampler::GetPointer(value.As<v8::Object>());
|
|
1883
2107
|
if (query != nullptr) {
|
|
@@ -1902,7 +2126,7 @@ void WebGL2RenderingContext::IsSync(const v8::FunctionCallbackInfo<v8::Value> &a
|
|
|
1902
2126
|
auto context = isolate->GetCurrentContext();
|
|
1903
2127
|
|
|
1904
2128
|
auto value = args[0];
|
|
1905
|
-
auto type = GetNativeType(
|
|
2129
|
+
auto type = GetNativeType(value);
|
|
1906
2130
|
if (type == NativeType::WebGLSync) {
|
|
1907
2131
|
auto query = WebGLSyncImpl::GetPointer(value.As<v8::Object>());
|
|
1908
2132
|
if (query != nullptr) {
|
|
@@ -1927,7 +2151,7 @@ void WebGL2RenderingContext::IsTransformFeedback(const v8::FunctionCallbackInfo<
|
|
|
1927
2151
|
auto context = isolate->GetCurrentContext();
|
|
1928
2152
|
|
|
1929
2153
|
auto value = args[0];
|
|
1930
|
-
auto type = GetNativeType(
|
|
2154
|
+
auto type = GetNativeType(value);
|
|
1931
2155
|
if (type == NativeType::WebGLTransformFeedback) {
|
|
1932
2156
|
auto query = WebGLTransformFeedback::GetPointer(value.As<v8::Object>());
|
|
1933
2157
|
if (query != nullptr) {
|
|
@@ -1952,7 +2176,7 @@ void WebGL2RenderingContext::IsVertexArray(const v8::FunctionCallbackInfo<v8::Va
|
|
|
1952
2176
|
auto context = isolate->GetCurrentContext();
|
|
1953
2177
|
|
|
1954
2178
|
auto value = args[0];
|
|
1955
|
-
auto type = GetNativeType(
|
|
2179
|
+
auto type = GetNativeType(value);
|
|
1956
2180
|
if (type == NativeType::WebGLVertexArrayObject) {
|
|
1957
2181
|
auto query = WebGLVertexArrayObject::GetPointer(value.As<v8::Object>());
|
|
1958
2182
|
if (query != nullptr) {
|
|
@@ -2039,7 +2263,7 @@ void WebGL2RenderingContext::SamplerParameterf(const v8::FunctionCallbackInfo<v8
|
|
|
2039
2263
|
auto context = isolate->GetCurrentContext();
|
|
2040
2264
|
|
|
2041
2265
|
auto samplerValue = args[0];
|
|
2042
|
-
auto type = GetNativeType(
|
|
2266
|
+
auto type = GetNativeType(samplerValue);
|
|
2043
2267
|
if (type == NativeType::WebGLSampler) {
|
|
2044
2268
|
auto sampler = WebGLSampler::GetPointer(samplerValue.As<v8::Object>());
|
|
2045
2269
|
auto pname = args[1]->Uint32Value(context).ToChecked();
|
|
@@ -2065,7 +2289,7 @@ void WebGL2RenderingContext::SamplerParameteri(const v8::FunctionCallbackInfo<v8
|
|
|
2065
2289
|
auto context = isolate->GetCurrentContext();
|
|
2066
2290
|
|
|
2067
2291
|
auto samplerValue = args[0];
|
|
2068
|
-
auto type = GetNativeType(
|
|
2292
|
+
auto type = GetNativeType(samplerValue);
|
|
2069
2293
|
if (type == NativeType::WebGLSampler) {
|
|
2070
2294
|
auto sampler = WebGLSampler::GetPointer(samplerValue.As<v8::Object>());
|
|
2071
2295
|
auto pname = args[1]->Uint32Value(context).ToChecked();
|
|
@@ -2162,7 +2386,7 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2162
2386
|
return;
|
|
2163
2387
|
}
|
|
2164
2388
|
|
|
2165
|
-
auto imageType = GetNativeType(
|
|
2389
|
+
auto imageType = GetNativeType(imageOrPixelsOrOffset);
|
|
2166
2390
|
|
|
2167
2391
|
switch (imageType) {
|
|
2168
2392
|
case NativeType::ImageAsset: {
|
|
@@ -2421,7 +2645,7 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2421
2645
|
}
|
|
2422
2646
|
|
|
2423
2647
|
|
|
2424
|
-
auto imageType = GetNativeType(
|
|
2648
|
+
auto imageType = GetNativeType(imageOrPixelsOrOffsetObject);
|
|
2425
2649
|
|
|
2426
2650
|
if (imageType == NativeType::ImageAsset) {
|
|
2427
2651
|
auto asset = ImageAssetImpl::GetPointer(imageOrPixelsOrOffsetObject.As<v8::Object>());
|
|
@@ -2523,7 +2747,7 @@ WebGL2RenderingContext::TransformFeedbackVaryings(const v8::FunctionCallbackInfo
|
|
|
2523
2747
|
auto context = isolate->GetCurrentContext();
|
|
2524
2748
|
|
|
2525
2749
|
auto programValue = args[0];
|
|
2526
|
-
auto type = GetNativeType(
|
|
2750
|
+
auto type = GetNativeType(programValue);
|
|
2527
2751
|
if (type == NativeType::WebGLProgram) {
|
|
2528
2752
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
2529
2753
|
auto varyingsObject = args[1];
|
|
@@ -2573,7 +2797,7 @@ void WebGL2RenderingContext::Uniform1ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2573
2797
|
auto context = isolate->GetCurrentContext();
|
|
2574
2798
|
|
|
2575
2799
|
auto locationValue = args[0];
|
|
2576
|
-
auto type = GetNativeType(
|
|
2800
|
+
auto type = GetNativeType(locationValue);
|
|
2577
2801
|
|
|
2578
2802
|
auto v0Value = args[1];
|
|
2579
2803
|
if (type == NativeType::WebGLUniformLocation) {
|
|
@@ -2603,7 +2827,7 @@ void WebGL2RenderingContext::Uniform2ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2603
2827
|
auto context = isolate->GetCurrentContext();
|
|
2604
2828
|
|
|
2605
2829
|
auto locationValue = args[0];
|
|
2606
|
-
auto type = GetNativeType(
|
|
2830
|
+
auto type = GetNativeType(locationValue);
|
|
2607
2831
|
|
|
2608
2832
|
if (type == NativeType::WebGLUniformLocation) {
|
|
2609
2833
|
|
|
@@ -2635,7 +2859,7 @@ void WebGL2RenderingContext::Uniform3ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2635
2859
|
auto context = isolate->GetCurrentContext();
|
|
2636
2860
|
|
|
2637
2861
|
auto locationValue = args[0];
|
|
2638
|
-
auto type = GetNativeType(
|
|
2862
|
+
auto type = GetNativeType(locationValue);
|
|
2639
2863
|
|
|
2640
2864
|
if (type == NativeType::WebGLUniformLocation) {
|
|
2641
2865
|
|
|
@@ -2672,7 +2896,7 @@ void WebGL2RenderingContext::Uniform4ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2672
2896
|
auto context = isolate->GetCurrentContext();
|
|
2673
2897
|
|
|
2674
2898
|
auto locationValue = args[0];
|
|
2675
|
-
auto type = GetNativeType(
|
|
2899
|
+
auto type = GetNativeType(locationValue);
|
|
2676
2900
|
|
|
2677
2901
|
if (type == NativeType::WebGLUniformLocation) {
|
|
2678
2902
|
|
|
@@ -2714,7 +2938,7 @@ void WebGL2RenderingContext::Uniform1uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
2714
2938
|
|
|
2715
2939
|
|
|
2716
2940
|
auto locationValue = args[0];
|
|
2717
|
-
auto type = GetNativeType(
|
|
2941
|
+
auto type = GetNativeType(locationValue);
|
|
2718
2942
|
|
|
2719
2943
|
|
|
2720
2944
|
if (type == NativeType::WebGLUniformLocation) {
|
|
@@ -2771,7 +2995,7 @@ void WebGL2RenderingContext::Uniform2uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
2771
2995
|
|
|
2772
2996
|
|
|
2773
2997
|
auto locationValue = args[0];
|
|
2774
|
-
auto type = GetNativeType(
|
|
2998
|
+
auto type = GetNativeType(locationValue);
|
|
2775
2999
|
|
|
2776
3000
|
|
|
2777
3001
|
if (type == NativeType::WebGLUniformLocation) {
|
|
@@ -2827,7 +3051,7 @@ void WebGL2RenderingContext::Uniform3uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
2827
3051
|
|
|
2828
3052
|
|
|
2829
3053
|
auto locationValue = args[0];
|
|
2830
|
-
auto type = GetNativeType(
|
|
3054
|
+
auto type = GetNativeType(locationValue);
|
|
2831
3055
|
|
|
2832
3056
|
|
|
2833
3057
|
if (type == NativeType::WebGLUniformLocation) {
|
|
@@ -2884,13 +3108,13 @@ void WebGL2RenderingContext::Uniform4uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
2884
3108
|
|
|
2885
3109
|
|
|
2886
3110
|
auto locationValue = args[0];
|
|
2887
|
-
auto type = GetNativeType(
|
|
3111
|
+
auto type = GetNativeType(locationValue);
|
|
2888
3112
|
|
|
2889
3113
|
|
|
2890
3114
|
if (type == NativeType::WebGLUniformLocation) {
|
|
2891
3115
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
2892
3116
|
auto dataValue = args[1];
|
|
2893
|
-
if(location != nullptr){
|
|
3117
|
+
if (location != nullptr) {
|
|
2894
3118
|
if (dataValue->IsUint32Array()) {
|
|
2895
3119
|
auto buf = dataValue.As<v8::Uint32Array>();
|
|
2896
3120
|
|
|
@@ -2941,7 +3165,7 @@ void WebGL2RenderingContext::UniformBlockBinding(const v8::FunctionCallbackInfo<
|
|
|
2941
3165
|
|
|
2942
3166
|
|
|
2943
3167
|
auto programValue = args[0];
|
|
2944
|
-
auto type = GetNativeType(
|
|
3168
|
+
auto type = GetNativeType(programValue);
|
|
2945
3169
|
if (type == NativeType::WebGLProgram) {
|
|
2946
3170
|
|
|
2947
3171
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
@@ -2974,7 +3198,7 @@ void WebGL2RenderingContext::UniformMatrix2x3fv(const v8::FunctionCallbackInfo<v
|
|
|
2974
3198
|
|
|
2975
3199
|
|
|
2976
3200
|
auto locationValue = args[0];
|
|
2977
|
-
auto type = GetNativeType(
|
|
3201
|
+
auto type = GetNativeType(locationValue);
|
|
2978
3202
|
if (type == NativeType::WebGLUniformLocation) {
|
|
2979
3203
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
2980
3204
|
auto transpose = args[1]->BooleanValue(isolate);
|
|
@@ -3030,7 +3254,7 @@ void WebGL2RenderingContext::UniformMatrix2x4fv(const v8::FunctionCallbackInfo<v
|
|
|
3030
3254
|
|
|
3031
3255
|
|
|
3032
3256
|
auto locationValue = args[0];
|
|
3033
|
-
auto type = GetNativeType(
|
|
3257
|
+
auto type = GetNativeType(locationValue);
|
|
3034
3258
|
if (type == NativeType::WebGLUniformLocation) {
|
|
3035
3259
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
3036
3260
|
auto transpose = args[1]->BooleanValue(isolate);
|
|
@@ -3087,7 +3311,7 @@ void WebGL2RenderingContext::UniformMatrix3x2fv(const v8::FunctionCallbackInfo<v
|
|
|
3087
3311
|
|
|
3088
3312
|
|
|
3089
3313
|
auto locationValue = args[0];
|
|
3090
|
-
auto type = GetNativeType(
|
|
3314
|
+
auto type = GetNativeType(locationValue);
|
|
3091
3315
|
if (type == NativeType::WebGLUniformLocation) {
|
|
3092
3316
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
3093
3317
|
auto transpose = args[1]->BooleanValue(isolate);
|
|
@@ -3145,7 +3369,7 @@ void WebGL2RenderingContext::UniformMatrix3x4fv(const v8::FunctionCallbackInfo<v
|
|
|
3145
3369
|
|
|
3146
3370
|
|
|
3147
3371
|
auto locationValue = args[0];
|
|
3148
|
-
auto type = GetNativeType(
|
|
3372
|
+
auto type = GetNativeType(locationValue);
|
|
3149
3373
|
if (type == NativeType::WebGLUniformLocation) {
|
|
3150
3374
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
3151
3375
|
auto transpose = args[1]->BooleanValue(isolate);
|
|
@@ -3201,7 +3425,7 @@ void WebGL2RenderingContext::UniformMatrix4x2fv(const v8::FunctionCallbackInfo<v
|
|
|
3201
3425
|
|
|
3202
3426
|
|
|
3203
3427
|
auto locationValue = args[0];
|
|
3204
|
-
auto type = GetNativeType(
|
|
3428
|
+
auto type = GetNativeType(locationValue);
|
|
3205
3429
|
if (type == NativeType::WebGLUniformLocation) {
|
|
3206
3430
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
3207
3431
|
auto transpose = args[1]->BooleanValue(isolate);
|
|
@@ -3257,7 +3481,7 @@ void WebGL2RenderingContext::UniformMatrix4x3fv(const v8::FunctionCallbackInfo<v
|
|
|
3257
3481
|
|
|
3258
3482
|
|
|
3259
3483
|
auto locationValue = args[0];
|
|
3260
|
-
auto type = GetNativeType(
|
|
3484
|
+
auto type = GetNativeType(locationValue);
|
|
3261
3485
|
if (type == NativeType::WebGLUniformLocation) {
|
|
3262
3486
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
3263
3487
|
auto transpose = args[1]->BooleanValue(isolate);
|
|
@@ -3924,67 +4148,45 @@ void WebGL2RenderingContext::SetConstants(v8::Isolate *isolate,
|
|
|
3924
4148
|
void WebGL2RenderingContext::SetMethods(v8::Isolate *isolate,
|
|
3925
4149
|
const v8::Local<v8::ObjectTemplate> &tmpl) {
|
|
3926
4150
|
|
|
3927
|
-
tmpl
|
|
3928
|
-
|
|
3929
|
-
v8::FunctionTemplate::New(isolate, &BeginQuery)
|
|
3930
|
-
);
|
|
4151
|
+
SetFastMethod(isolate, tmpl, "beginQuery", BeginQuery, &fast_begin_query_,
|
|
4152
|
+
v8::Local<v8::Value>());
|
|
3931
4153
|
|
|
3932
|
-
tmpl
|
|
3933
|
-
|
|
3934
|
-
v8::FunctionTemplate::New(isolate, &BeginTransformFeedback)
|
|
3935
|
-
);
|
|
4154
|
+
SetFastMethod(isolate, tmpl, "beginTransformFeedback", BeginTransformFeedback,
|
|
4155
|
+
&fast_begin_transform_feedback_, v8::Local<v8::Value>());
|
|
3936
4156
|
|
|
3937
|
-
tmpl
|
|
3938
|
-
|
|
3939
|
-
v8::FunctionTemplate::New(isolate, &BindBufferBase)
|
|
3940
|
-
);
|
|
4157
|
+
SetFastMethod(isolate, tmpl, "bindBufferBase", BindBufferBase, &fast_bind_buffer_base_,
|
|
4158
|
+
v8::Local<v8::Value>());
|
|
3941
4159
|
|
|
3942
|
-
tmpl
|
|
3943
|
-
|
|
3944
|
-
v8::FunctionTemplate::New(isolate, &BindBufferRange)
|
|
3945
|
-
);
|
|
4160
|
+
SetFastMethod(isolate, tmpl, "bindBufferRange", BindBufferRange, &fast_bind_buffer_range_,
|
|
4161
|
+
v8::Local<v8::Value>());
|
|
3946
4162
|
|
|
3947
|
-
tmpl
|
|
3948
|
-
|
|
3949
|
-
v8::FunctionTemplate::New(isolate, &BindSampler)
|
|
3950
|
-
);
|
|
4163
|
+
SetFastMethod(isolate, tmpl, "bindSampler", BindSampler, &fast_bind_sampler_,
|
|
4164
|
+
v8::Local<v8::Value>());
|
|
3951
4165
|
|
|
3952
|
-
tmpl
|
|
3953
|
-
|
|
3954
|
-
v8::FunctionTemplate::New(isolate, &BindTransformFeedback)
|
|
3955
|
-
);
|
|
4166
|
+
SetFastMethod(isolate, tmpl, "bindTransformFeedback", BindTransformFeedback,
|
|
4167
|
+
&fast_bind_transform_feedback_, v8::Local<v8::Value>());
|
|
3956
4168
|
|
|
3957
|
-
// tmpl->Set(
|
|
3958
|
-
// ConvertToV8String(isolate, "bindVertexArray"),
|
|
3959
|
-
// v8::FunctionTemplate::New(isolate, &BindVertexArray)
|
|
3960
|
-
// );
|
|
3961
4169
|
|
|
3962
|
-
SetFastMethod(isolate, tmpl, "bindVertexArray", BindVertexArray, &fast_bind_vertex_array_,
|
|
4170
|
+
SetFastMethod(isolate, tmpl, "bindVertexArray", BindVertexArray, &fast_bind_vertex_array_,
|
|
4171
|
+
v8::Local<v8::Value>());
|
|
3963
4172
|
|
|
3964
|
-
tmpl->Set(
|
|
3965
|
-
ConvertToV8String(isolate, "blitFramebuffer"),
|
|
3966
|
-
v8::FunctionTemplate::New(isolate, &BlitFramebuffer)
|
|
3967
|
-
);
|
|
3968
4173
|
|
|
3969
|
-
tmpl
|
|
3970
|
-
|
|
3971
|
-
v8::FunctionTemplate::New(isolate, &ClearBufferfi)
|
|
3972
|
-
);
|
|
4174
|
+
SetFastMethod(isolate, tmpl, "blitFramebuffer", BlitFramebuffer, &fast_blit_framebuffer_,
|
|
4175
|
+
v8::Local<v8::Value>());
|
|
3973
4176
|
|
|
3974
|
-
tmpl
|
|
3975
|
-
|
|
3976
|
-
v8::FunctionTemplate::New(isolate, &ClearBufferfv)
|
|
3977
|
-
);
|
|
4177
|
+
SetFastMethod(isolate, tmpl, "clearBufferfi", ClearBufferfi, &fast_clear_buffer_fi_,
|
|
4178
|
+
v8::Local<v8::Value>());
|
|
3978
4179
|
|
|
3979
|
-
tmpl
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
4180
|
+
SetFastMethodWithOverLoads(isolate, tmpl, "clearBufferfv", ClearBufferfv,
|
|
4181
|
+
fast_clear_buffer_fv_overloads_, v8::Local<v8::Value>());
|
|
4182
|
+
|
|
4183
|
+
|
|
4184
|
+
SetFastMethodWithOverLoads(isolate, tmpl, "clearBufferiv", ClearBufferiv,
|
|
4185
|
+
fast_clear_buffer_iv_overloads_, v8::Local<v8::Value>());
|
|
4186
|
+
|
|
4187
|
+
SetFastMethodWithOverLoads(isolate, tmpl, "clearBufferuiv", ClearBufferuiv,
|
|
4188
|
+
fast_clear_buffer_uiv_overloads_, v8::Local<v8::Value>());
|
|
3983
4189
|
|
|
3984
|
-
tmpl->Set(
|
|
3985
|
-
ConvertToV8String(isolate, "clearBufferuiv"),
|
|
3986
|
-
v8::FunctionTemplate::New(isolate, &ClearBufferuiv)
|
|
3987
|
-
);
|
|
3988
4190
|
|
|
3989
4191
|
tmpl->Set(
|
|
3990
4192
|
ConvertToV8String(isolate, "clientWaitSync"),
|
|
@@ -4052,25 +4254,22 @@ void WebGL2RenderingContext::SetMethods(v8::Isolate *isolate,
|
|
|
4052
4254
|
v8::FunctionTemplate::New(isolate, &DeleteVertexArray)
|
|
4053
4255
|
);
|
|
4054
4256
|
|
|
4055
|
-
tmpl->Set(
|
|
4056
|
-
ConvertToV8String(isolate, "drawArraysInstanced"),
|
|
4057
|
-
v8::FunctionTemplate::New(isolate, &DrawArraysInstanced)
|
|
4058
|
-
);
|
|
4059
4257
|
|
|
4060
|
-
tmpl
|
|
4061
|
-
|
|
4062
|
-
v8::FunctionTemplate::New(isolate, &DrawBuffers)
|
|
4063
|
-
);
|
|
4258
|
+
SetFastMethod(isolate, tmpl, "drawArraysInstanced", DrawArraysInstanced,
|
|
4259
|
+
&fast_draw_arrays_instanced_, v8::Local<v8::Value>());
|
|
4064
4260
|
|
|
4065
|
-
tmpl->Set(
|
|
4066
|
-
ConvertToV8String(isolate, "drawElementsInstanced"),
|
|
4067
|
-
v8::FunctionTemplate::New(isolate, &DrawElementsInstanced)
|
|
4068
|
-
);
|
|
4069
4261
|
|
|
4070
|
-
tmpl
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4262
|
+
SetFastMethod(isolate, tmpl, "drawBuffers", DrawBuffers, &fast_draw_buffers_,
|
|
4263
|
+
v8::Local<v8::Value>());
|
|
4264
|
+
|
|
4265
|
+
|
|
4266
|
+
SetFastMethod(isolate, tmpl, "drawElementsInstanced", DrawElementsInstanced,
|
|
4267
|
+
&fast_draw_elements_instanced_, v8::Local<v8::Value>());
|
|
4268
|
+
|
|
4269
|
+
|
|
4270
|
+
SetFastMethod(isolate, tmpl, "drawRangeElements", DrawRangeElements, &fast_draw_range_elements_,
|
|
4271
|
+
v8::Local<v8::Value>());
|
|
4272
|
+
|
|
4074
4273
|
|
|
4075
4274
|
tmpl->Set(
|
|
4076
4275
|
ConvertToV8String(isolate, "endQuery"),
|
|
@@ -4092,113 +4291,76 @@ void WebGL2RenderingContext::SetMethods(v8::Isolate *isolate,
|
|
|
4092
4291
|
v8::FunctionTemplate::New(isolate, &FramebufferTextureLayer)
|
|
4093
4292
|
);
|
|
4094
4293
|
|
|
4095
|
-
tmpl->Set(
|
|
4096
|
-
ConvertToV8String(isolate, "uniform1ui"),
|
|
4097
|
-
v8::FunctionTemplate::New(isolate, &Uniform1ui)
|
|
4098
|
-
);
|
|
4099
4294
|
|
|
4100
|
-
tmpl
|
|
4101
|
-
|
|
4102
|
-
v8::FunctionTemplate::New(isolate, &Uniform1uiv)
|
|
4103
|
-
);
|
|
4295
|
+
SetFastMethod(isolate, tmpl, "uniform1ui", Uniform1ui, &fast_uniform_1ui_,
|
|
4296
|
+
v8::Local<v8::Value>());
|
|
4104
4297
|
|
|
4105
|
-
tmpl
|
|
4106
|
-
|
|
4107
|
-
v8::FunctionTemplate::New(isolate, &Uniform2ui)
|
|
4108
|
-
);
|
|
4298
|
+
SetFastMethod(isolate, tmpl, "uniform1uiv", Uniform1uiv, &fast_uniform_1uiv_,
|
|
4299
|
+
v8::Local<v8::Value>());
|
|
4109
4300
|
|
|
4110
|
-
tmpl
|
|
4111
|
-
|
|
4112
|
-
v8::FunctionTemplate::New(isolate, &Uniform2uiv)
|
|
4113
|
-
);
|
|
4301
|
+
SetFastMethod(isolate, tmpl, "uniform2ui", Uniform2ui, &fast_uniform_2ui_,
|
|
4302
|
+
v8::Local<v8::Value>());
|
|
4114
4303
|
|
|
4115
|
-
tmpl
|
|
4116
|
-
|
|
4117
|
-
v8::FunctionTemplate::New(isolate, &Uniform3ui)
|
|
4118
|
-
);
|
|
4304
|
+
SetFastMethod(isolate, tmpl, "uniform2uiv", Uniform2uiv, &fast_uniform_2uiv_,
|
|
4305
|
+
v8::Local<v8::Value>());
|
|
4119
4306
|
|
|
4120
|
-
tmpl
|
|
4121
|
-
|
|
4122
|
-
v8::FunctionTemplate::New(isolate, &Uniform3uiv)
|
|
4123
|
-
);
|
|
4307
|
+
SetFastMethod(isolate, tmpl, "uniform3ui", Uniform3ui, &fast_uniform_3ui_,
|
|
4308
|
+
v8::Local<v8::Value>());
|
|
4124
4309
|
|
|
4125
|
-
tmpl
|
|
4126
|
-
|
|
4127
|
-
v8::FunctionTemplate::New(isolate, &Uniform4ui)
|
|
4128
|
-
);
|
|
4310
|
+
SetFastMethod(isolate, tmpl, "uniform3uiv", Uniform3uiv, &fast_uniform_3uiv_,
|
|
4311
|
+
v8::Local<v8::Value>());
|
|
4129
4312
|
|
|
4130
|
-
tmpl
|
|
4131
|
-
|
|
4132
|
-
v8::FunctionTemplate::New(isolate, &Uniform4uiv)
|
|
4133
|
-
);
|
|
4313
|
+
SetFastMethod(isolate, tmpl, "uniform4ui", Uniform4ui, &fast_uniform_4ui_,
|
|
4314
|
+
v8::Local<v8::Value>());
|
|
4134
4315
|
|
|
4316
|
+
SetFastMethod(isolate, tmpl, "uniform4uiv", Uniform4uiv, &fast_uniform_4uiv_,
|
|
4317
|
+
v8::Local<v8::Value>());
|
|
4135
4318
|
|
|
4136
|
-
tmpl
|
|
4137
|
-
|
|
4138
|
-
v8::FunctionTemplate::New(isolate, &UniformBlockBinding)
|
|
4139
|
-
);
|
|
4319
|
+
SetFastMethod(isolate, tmpl, "uniformBlockBinding", UniformBlockBinding,
|
|
4320
|
+
&fast_uniform_block_binding_, v8::Local<v8::Value>());
|
|
4140
4321
|
|
|
4141
4322
|
|
|
4142
|
-
tmpl
|
|
4143
|
-
|
|
4144
|
-
v8::FunctionTemplate::New(isolate, &UniformMatrix2x3fv)
|
|
4145
|
-
);
|
|
4323
|
+
SetFastMethodWithOverLoads(isolate, tmpl, "uniformMatrix2x3fv", UniformMatrix2x3fv,
|
|
4324
|
+
fast_uniform_matrix_2x3fv_overloads_, v8::Local<v8::Value>());
|
|
4146
4325
|
|
|
4147
|
-
tmpl->Set(
|
|
4148
|
-
ConvertToV8String(isolate, "uniformMatrix2x4fv"),
|
|
4149
|
-
v8::FunctionTemplate::New(isolate, &UniformMatrix2x4fv)
|
|
4150
|
-
);
|
|
4151
4326
|
|
|
4152
|
-
tmpl
|
|
4153
|
-
|
|
4154
|
-
v8::FunctionTemplate::New(isolate, &UniformMatrix3x2fv)
|
|
4155
|
-
);
|
|
4327
|
+
SetFastMethodWithOverLoads(isolate, tmpl, "uniformMatrix2x4fv", UniformMatrix2x4fv,
|
|
4328
|
+
fast_uniform_matrix_2x4fv_overloads_, v8::Local<v8::Value>());
|
|
4156
4329
|
|
|
4157
4330
|
|
|
4158
|
-
tmpl
|
|
4159
|
-
|
|
4160
|
-
v8::FunctionTemplate::New(isolate, &UniformMatrix3x4fv)
|
|
4161
|
-
);
|
|
4331
|
+
SetFastMethodWithOverLoads(isolate, tmpl, "uniformMatrix3x2fv", UniformMatrix3x2fv,
|
|
4332
|
+
fast_uniform_matrix_3x2fv_overloads_, v8::Local<v8::Value>());
|
|
4162
4333
|
|
|
4163
|
-
tmpl
|
|
4164
|
-
|
|
4165
|
-
v8::FunctionTemplate::New(isolate, &UniformMatrix4x2fv)
|
|
4166
|
-
);
|
|
4334
|
+
SetFastMethodWithOverLoads(isolate, tmpl, "uniformMatrix3x4fv", UniformMatrix3x4fv,
|
|
4335
|
+
fast_uniform_matrix_3x4fv_overloads_, v8::Local<v8::Value>());
|
|
4167
4336
|
|
|
4168
|
-
tmpl->Set(
|
|
4169
|
-
ConvertToV8String(isolate, "uniformMatrix4x3fv"),
|
|
4170
|
-
v8::FunctionTemplate::New(isolate, &UniformMatrix4x3fv)
|
|
4171
|
-
);
|
|
4172
4337
|
|
|
4173
|
-
tmpl
|
|
4174
|
-
|
|
4175
|
-
v8::FunctionTemplate::New(isolate, &UniformMatrix4x3fv)
|
|
4176
|
-
);
|
|
4338
|
+
SetFastMethodWithOverLoads(isolate, tmpl, "uniformMatrix4x2fv", UniformMatrix4x2fv,
|
|
4339
|
+
fast_uniform_matrix_4x2fv_overloads_, v8::Local<v8::Value>());
|
|
4177
4340
|
|
|
4178
|
-
tmpl->Set(
|
|
4179
|
-
ConvertToV8String(isolate, "vertexAttribDivisor"),
|
|
4180
|
-
v8::FunctionTemplate::New(isolate, &VertexAttribDivisor)
|
|
4181
|
-
);
|
|
4182
4341
|
|
|
4183
|
-
tmpl
|
|
4184
|
-
|
|
4185
|
-
v8::FunctionTemplate::New(isolate, &VertexAttribI4i)
|
|
4186
|
-
);
|
|
4342
|
+
SetFastMethodWithOverLoads(isolate, tmpl, "uniformMatrix4x3fv", UniformMatrix4x3fv,
|
|
4343
|
+
fast_uniform_matrix_4x3fv_overloads_, v8::Local<v8::Value>());
|
|
4187
4344
|
|
|
4188
|
-
tmpl->Set(
|
|
4189
|
-
ConvertToV8String(isolate, "vertexAttribI4iv"),
|
|
4190
|
-
v8::FunctionTemplate::New(isolate, &VertexAttribI4iv)
|
|
4191
|
-
);
|
|
4192
4345
|
|
|
4193
|
-
tmpl
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4346
|
+
SetFastMethod(isolate, tmpl, "vertexAttribDivisor", VertexAttribDivisor,
|
|
4347
|
+
&fast_vertex_attrib_divisor_, v8::Local<v8::Value>());
|
|
4348
|
+
|
|
4349
|
+
|
|
4350
|
+
SetFastMethod(isolate, tmpl, "vertexAttribI4i", VertexAttribI4i, &fast_vertex_attrib_i_4i_,
|
|
4351
|
+
v8::Local<v8::Value>());
|
|
4352
|
+
|
|
4353
|
+
SetFastMethodWithOverLoads(isolate, tmpl, "vertexAttribI4iv", VertexAttribI4iv,
|
|
4354
|
+
fast_vertex_attrib_i_4iv_overloads_, v8::Local<v8::Value>());
|
|
4355
|
+
|
|
4356
|
+
|
|
4357
|
+
SetFastMethod(isolate, tmpl, "vertexAttribI4ui", VertexAttribI4ui, &fast_vertex_attrib_i_4ui_,
|
|
4358
|
+
v8::Local<v8::Value>());
|
|
4359
|
+
|
|
4360
|
+
|
|
4361
|
+
SetFastMethodWithOverLoads(isolate, tmpl, "vertexAttribI4uiv", VertexAttribI4uiv,
|
|
4362
|
+
fast_vertex_attrib_i_4uiv_overloads_, v8::Local<v8::Value>());
|
|
4197
4363
|
|
|
4198
|
-
tmpl->Set(
|
|
4199
|
-
ConvertToV8String(isolate, "vertexAttribI4uiv"),
|
|
4200
|
-
v8::FunctionTemplate::New(isolate, &VertexAttribI4uiv)
|
|
4201
|
-
);
|
|
4202
4364
|
|
|
4203
4365
|
tmpl->Set(
|
|
4204
4366
|
ConvertToV8String(isolate, "getActiveUniformBlockName"),
|
|
@@ -4278,15 +4440,12 @@ void WebGL2RenderingContext::SetMethods(v8::Isolate *isolate,
|
|
|
4278
4440
|
v8::FunctionTemplate::New(isolate, &GetUniformIndices)
|
|
4279
4441
|
);
|
|
4280
4442
|
|
|
4281
|
-
tmpl
|
|
4282
|
-
|
|
4283
|
-
v8::FunctionTemplate::New(isolate, &InvalidateFramebuffer)
|
|
4284
|
-
);
|
|
4443
|
+
SetFastMethod(isolate, tmpl, "invalidateFramebuffer", InvalidateFramebuffer,
|
|
4444
|
+
&fast_invalidate_framebuffer_, v8::Local<v8::Value>());
|
|
4285
4445
|
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
);
|
|
4446
|
+
|
|
4447
|
+
SetFastMethod(isolate, tmpl, "invalidateSubFramebuffer", InvalidateSubFramebuffer,
|
|
4448
|
+
&fast_invalidate_sub_framebuffer_, v8::Local<v8::Value>());
|
|
4290
4449
|
|
|
4291
4450
|
|
|
4292
4451
|
tmpl->Set(
|
|
@@ -4331,20 +4490,15 @@ void WebGL2RenderingContext::SetMethods(v8::Isolate *isolate,
|
|
|
4331
4490
|
);
|
|
4332
4491
|
|
|
4333
4492
|
|
|
4334
|
-
tmpl
|
|
4335
|
-
|
|
4336
|
-
v8::FunctionTemplate::New(isolate, &ResumeTransformFeedback)
|
|
4337
|
-
);
|
|
4493
|
+
SetFastMethod(isolate, tmpl, "resumeTransformFeedback", ResumeTransformFeedback,
|
|
4494
|
+
&fast_resume_transform_feedback_, v8::Local<v8::Value>());
|
|
4338
4495
|
|
|
4339
|
-
tmpl
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4496
|
+
SetFastMethod(isolate, tmpl, "samplerParameterf", SamplerParameterf, &fast_sampler_parameterf_,
|
|
4497
|
+
v8::Local<v8::Value>());
|
|
4498
|
+
|
|
4499
|
+
SetFastMethod(isolate, tmpl, "samplerParameteri", SamplerParameteri, &fast_sampler_parameteri_,
|
|
4500
|
+
v8::Local<v8::Value>());
|
|
4343
4501
|
|
|
4344
|
-
tmpl->Set(
|
|
4345
|
-
ConvertToV8String(isolate, "samplerParameteri"),
|
|
4346
|
-
v8::FunctionTemplate::New(isolate, &SamplerParameteri)
|
|
4347
|
-
);
|
|
4348
4502
|
|
|
4349
4503
|
tmpl->Set(
|
|
4350
4504
|
ConvertToV8String(isolate, "texImage3D"),
|