@nativescript/canvas 2.0.0-alpha.22 → 2.0.0-alpha.23
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/src/cpp/ImageAssetImpl.cpp +4 -4
- package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.cpp +0 -2
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +643 -624
- package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.cpp +14 -14
- package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.cpp +2 -2
- package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.cpp +4 -4
- package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.cpp +58 -71
- package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.h +4 -4
- package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.h +2 -2
- package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.h +4 -4
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.h +3 -3
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.h +10 -10
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.h +4 -4
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.h +4 -4
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.h +4 -4
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.cpp +5 -13
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.h +40 -39
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp +695 -690
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
#include "WebGL2RenderingContext.h"
|
|
6
6
|
|
|
7
|
-
WebGL2RenderingContext::WebGL2RenderingContext(WebGLState*
|
|
7
|
+
WebGL2RenderingContext::WebGL2RenderingContext(WebGLState *state) : WebGLRenderingContext(
|
|
8
8
|
state, WebGLRenderingVersion::V2) {
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
WebGL2RenderingContext::WebGL2RenderingContext(WebGLState*
|
|
12
|
+
WebGL2RenderingContext::WebGL2RenderingContext(WebGLState *state,
|
|
13
13
|
WebGLRenderingVersion version)
|
|
14
14
|
: WebGLRenderingContext(state, version) {
|
|
15
15
|
}
|
|
@@ -61,7 +61,7 @@ void WebGL2RenderingContext::BeginQuery(const v8::FunctionCallbackInfo<v8::Value
|
|
|
61
61
|
auto value = args[1];
|
|
62
62
|
auto type = GetNativeType(isolate, value);
|
|
63
63
|
if (type == NativeType::WebGLQuery) {
|
|
64
|
-
auto target =
|
|
64
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
65
65
|
auto query = WebGLQuery::GetPointer(value.As<v8::Object>());
|
|
66
66
|
|
|
67
67
|
if (query != nullptr) {
|
|
@@ -87,7 +87,7 @@ WebGL2RenderingContext::BeginTransformFeedback(const v8::FunctionCallbackInfo<v8
|
|
|
87
87
|
auto value = args[0];
|
|
88
88
|
if (value->IsNumber()) {
|
|
89
89
|
canvas_native_webgl2_begin_transform_feedback(
|
|
90
|
-
|
|
90
|
+
args[0]->Uint32Value(context).ToChecked(),
|
|
91
91
|
ptr->GetState()
|
|
92
92
|
);
|
|
93
93
|
}
|
|
@@ -106,8 +106,8 @@ void WebGL2RenderingContext::BindBufferBase(const v8::FunctionCallbackInfo<v8::V
|
|
|
106
106
|
auto type = GetNativeType(isolate, bufferValue);
|
|
107
107
|
|
|
108
108
|
if (type == NativeType::WebGLBuffer) {
|
|
109
|
-
auto target =
|
|
110
|
-
auto index =
|
|
109
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
110
|
+
auto index = args[1]->Uint32Value(context).ToChecked();
|
|
111
111
|
|
|
112
112
|
auto buffer = WebGLBuffer::GetPointer(bufferValue.As<v8::Object>());
|
|
113
113
|
|
|
@@ -132,8 +132,8 @@ void WebGL2RenderingContext::BindBufferRange(const v8::FunctionCallbackInfo<v8::
|
|
|
132
132
|
auto bufferValue = args[2];
|
|
133
133
|
auto type = GetNativeType(isolate, bufferValue);
|
|
134
134
|
if (args.Length() > 4 && type == NativeType::WebGLBuffer) {
|
|
135
|
-
auto target =
|
|
136
|
-
auto index =
|
|
135
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
136
|
+
auto index = args[1]->Uint32Value(context).ToChecked();
|
|
137
137
|
auto offset = args[3]->NumberValue(context).ToChecked();
|
|
138
138
|
auto size = args[4]->NumberValue(context).ToChecked();
|
|
139
139
|
auto buffer = WebGLBuffer::GetPointer(bufferValue.As<v8::Object>());
|
|
@@ -160,7 +160,7 @@ void WebGL2RenderingContext::BindSampler(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
160
160
|
auto samplerValue = args[1];
|
|
161
161
|
auto type = GetNativeType(isolate, samplerValue);
|
|
162
162
|
if (type == NativeType::WebGLSampler) {
|
|
163
|
-
auto unit =
|
|
163
|
+
auto unit = args[0]->Uint32Value(context).ToChecked();
|
|
164
164
|
auto sampler = WebGLSampler::GetPointer(samplerValue.As<v8::Object>());
|
|
165
165
|
|
|
166
166
|
canvas_native_webgl2_bind_sampler(
|
|
@@ -185,7 +185,7 @@ WebGL2RenderingContext::BindTransformFeedback(const v8::FunctionCallbackInfo<v8:
|
|
|
185
185
|
auto type = GetNativeType(isolate, transformFeedbackValue);
|
|
186
186
|
|
|
187
187
|
if (type == NativeType::WebGLTransformFeedback) {
|
|
188
|
-
auto target =
|
|
188
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
189
189
|
auto transformFeedback = WebGLTransformFeedback::GetPointer(
|
|
190
190
|
transformFeedbackValue.As<v8::Object>());
|
|
191
191
|
|
|
@@ -237,20 +237,20 @@ void WebGL2RenderingContext::BlitFramebuffer(const v8::FunctionCallbackInfo<v8::
|
|
|
237
237
|
auto context = isolate->GetCurrentContext();
|
|
238
238
|
|
|
239
239
|
if (args.Length() > 9) {
|
|
240
|
-
auto srcX0 =
|
|
241
|
-
auto srcY0 =
|
|
240
|
+
auto srcX0 = args[0]->Int32Value(context).ToChecked();
|
|
241
|
+
auto srcY0 = args[1]->Int32Value(context).ToChecked();
|
|
242
242
|
|
|
243
|
-
auto srcX1 =
|
|
244
|
-
auto srcY1 =
|
|
243
|
+
auto srcX1 = args[2]->Int32Value(context).ToChecked();
|
|
244
|
+
auto srcY1 = args[3]->Int32Value(context).ToChecked();
|
|
245
245
|
|
|
246
|
-
auto dstX0 =
|
|
247
|
-
auto dstY0 =
|
|
246
|
+
auto dstX0 = args[4]->Int32Value(context).ToChecked();
|
|
247
|
+
auto dstY0 = args[5]->Int32Value(context).ToChecked();
|
|
248
248
|
|
|
249
|
-
auto dstX1 =
|
|
250
|
-
auto dstY1 =
|
|
249
|
+
auto dstX1 = args[6]->Int32Value(context).ToChecked();
|
|
250
|
+
auto dstY1 = args[7]->Int32Value(context).ToChecked();
|
|
251
251
|
|
|
252
|
-
auto mask =
|
|
253
|
-
auto filter =
|
|
252
|
+
auto mask = args[8]->Uint32Value(context).ToChecked();
|
|
253
|
+
auto filter = args[9]->Uint32Value(context).ToChecked();
|
|
254
254
|
canvas_native_webgl2_blit_framebuffer(
|
|
255
255
|
srcX0,
|
|
256
256
|
srcY0,
|
|
@@ -276,56 +276,46 @@ void WebGL2RenderingContext::ClearBufferfv(const v8::FunctionCallbackInfo<v8::Va
|
|
|
276
276
|
auto isolate = args.GetIsolate();
|
|
277
277
|
auto context = isolate->GetCurrentContext();
|
|
278
278
|
|
|
279
|
-
auto bufferValue = args[0];
|
|
280
|
-
auto type = GetNativeType(isolate, bufferValue);
|
|
281
279
|
auto values = args[2];
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
auto
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
if (!item->IsNumber()) {
|
|
295
|
-
buf.push_back(
|
|
296
|
-
std::nanf(""));
|
|
297
|
-
} else {
|
|
298
|
-
buf.push_back(
|
|
299
|
-
static_cast<float>(item->NumberValue(context).ToChecked())
|
|
300
|
-
);
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
canvas_native_webgl2_clear_bufferfv(
|
|
305
|
-
buffer->GetBuffer(),
|
|
306
|
-
drawbuffer,
|
|
307
|
-
buf.data(),
|
|
308
|
-
buf.size(),
|
|
309
|
-
ptr->GetState()
|
|
280
|
+
auto buffer = args[0]->Uint32Value(context).ToChecked();
|
|
281
|
+
auto drawbuffer = args[1]->Int32Value(context).ToChecked();
|
|
282
|
+
if (values->IsArray()) {
|
|
283
|
+
auto array = values.As<v8::Array>();
|
|
284
|
+
auto len = array->Length();
|
|
285
|
+
std::vector<float> buf;
|
|
286
|
+
buf.reserve(len);
|
|
287
|
+
for (int j = 0; j < len; ++j) {
|
|
288
|
+
auto item = array->Get(
|
|
289
|
+
context, j).ToLocalChecked();
|
|
290
|
+
buf.push_back(
|
|
291
|
+
static_cast<float>(item->NumberValue(context).ToChecked())
|
|
310
292
|
);
|
|
293
|
+
}
|
|
311
294
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
295
|
+
canvas_native_webgl2_clear_bufferfv(
|
|
296
|
+
buffer,
|
|
297
|
+
drawbuffer,
|
|
298
|
+
buf.data(),
|
|
299
|
+
buf.size(),
|
|
300
|
+
ptr->GetState()
|
|
301
|
+
);
|
|
319
302
|
|
|
303
|
+
} else if (values->IsFloat32Array()) {
|
|
304
|
+
auto buf = values.As<v8::Float32Array>();
|
|
305
|
+
auto array = buf->Buffer();
|
|
306
|
+
auto offset = buf->ByteOffset();
|
|
307
|
+
auto size = buf->Length();
|
|
308
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
309
|
+
auto data = static_cast<float *>((void *) data_ptr);
|
|
320
310
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
311
|
+
|
|
312
|
+
canvas_native_webgl2_clear_bufferfv(
|
|
313
|
+
buffer,
|
|
314
|
+
drawbuffer,
|
|
315
|
+
data,
|
|
316
|
+
size,
|
|
317
|
+
ptr->GetState()
|
|
318
|
+
);
|
|
329
319
|
}
|
|
330
320
|
}
|
|
331
321
|
|
|
@@ -338,55 +328,49 @@ void WebGL2RenderingContext::ClearBufferiv(const v8::FunctionCallbackInfo<v8::Va
|
|
|
338
328
|
auto isolate = args.GetIsolate();
|
|
339
329
|
auto context = isolate->GetCurrentContext();
|
|
340
330
|
|
|
341
|
-
auto bufferValue = args[0];
|
|
342
|
-
auto type = GetNativeType(isolate, bufferValue);
|
|
343
331
|
auto values = args[2];
|
|
344
|
-
if (args.Length() > 2 && type == NativeType::WebGLBuffer &&
|
|
345
|
-
args[1]->IsObject()) {
|
|
346
|
-
auto drawbuffer = (int32_t) args[1]->NumberValue(context).ToChecked();
|
|
347
|
-
auto buffer = WebGLBuffer::GetPointer(bufferValue.As<v8::Object>());
|
|
348
|
-
if (values->IsArray()) {
|
|
349
|
-
auto array = values.As<v8::Array>();
|
|
350
|
-
auto len = array->Length();
|
|
351
|
-
std::vector<int32_t> buf;
|
|
352
|
-
buf.reserve(len);
|
|
353
|
-
for (int j = 0; j < len; ++j) {
|
|
354
|
-
auto item = array->Get(
|
|
355
|
-
context, j).ToLocalChecked();
|
|
356
|
-
buf.push_back(
|
|
357
|
-
static_cast<int32_t>(item->NumberValue(context).ToChecked())
|
|
358
|
-
);
|
|
359
|
-
}
|
|
360
332
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
333
|
+
auto buffer = args[0]->Uint32Value(context).ToChecked();
|
|
334
|
+
auto drawbuffer = args[1]->Int32Value(context).ToChecked();
|
|
335
|
+
if (values->IsArray()) {
|
|
336
|
+
auto array = values.As<v8::Array>();
|
|
337
|
+
auto len = array->Length();
|
|
338
|
+
std::vector<int32_t> buf;
|
|
339
|
+
buf.reserve(len);
|
|
340
|
+
for (int j = 0; j < len; ++j) {
|
|
341
|
+
auto item = array->Get(
|
|
342
|
+
context, j).ToLocalChecked();
|
|
343
|
+
buf.push_back(
|
|
344
|
+
item->Int32Value(context).ToChecked()
|
|
368
345
|
);
|
|
346
|
+
}
|
|
369
347
|
|
|
370
|
-
} else if (values->IsInt32Array()) {
|
|
371
|
-
auto buf = values.As<v8::Int32Array>();
|
|
372
348
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
349
|
+
canvas_native_webgl2_clear_bufferiv(
|
|
350
|
+
buffer,
|
|
351
|
+
drawbuffer,
|
|
352
|
+
buf.data(),
|
|
353
|
+
buf.size(),
|
|
354
|
+
ptr->GetState()
|
|
355
|
+
);
|
|
378
356
|
|
|
357
|
+
} else if (values->IsInt32Array()) {
|
|
358
|
+
auto buf = values.As<v8::Int32Array>();
|
|
379
359
|
|
|
360
|
+
auto array = buf->Buffer();
|
|
361
|
+
auto offset = buf->ByteOffset();
|
|
362
|
+
auto size = buf->Length();
|
|
363
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
364
|
+
auto data = static_cast<int32_t *>((void *) data_ptr);
|
|
380
365
|
|
|
381
366
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
}
|
|
367
|
+
canvas_native_webgl2_clear_bufferiv(
|
|
368
|
+
buffer,
|
|
369
|
+
drawbuffer,
|
|
370
|
+
data,
|
|
371
|
+
size,
|
|
372
|
+
ptr->GetState()
|
|
373
|
+
);
|
|
390
374
|
}
|
|
391
375
|
}
|
|
392
376
|
|
|
@@ -399,23 +383,17 @@ void WebGL2RenderingContext::ClearBufferfi(const v8::FunctionCallbackInfo<v8::Va
|
|
|
399
383
|
auto isolate = args.GetIsolate();
|
|
400
384
|
auto context = isolate->GetCurrentContext();
|
|
401
385
|
|
|
402
|
-
auto
|
|
403
|
-
auto
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
static_cast<float>(depth),
|
|
414
|
-
stencil,
|
|
415
|
-
ptr->GetState()
|
|
416
|
-
);
|
|
417
|
-
}
|
|
418
|
-
}
|
|
386
|
+
auto buffer = args[0]->Uint32Value(context).ToChecked();
|
|
387
|
+
auto drawbuffer = args[1]->Int32Value(context).ToChecked();
|
|
388
|
+
auto depth = args[2]->NumberValue(context).ToChecked();
|
|
389
|
+
auto stencil = args[3]->Int32Value(context).ToChecked();
|
|
390
|
+
canvas_native_webgl2_clear_bufferfi(
|
|
391
|
+
buffer,
|
|
392
|
+
drawbuffer,
|
|
393
|
+
static_cast<float>(depth),
|
|
394
|
+
stencil,
|
|
395
|
+
ptr->GetState()
|
|
396
|
+
);
|
|
419
397
|
}
|
|
420
398
|
|
|
421
399
|
void WebGL2RenderingContext::ClearBufferuiv(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -427,52 +405,48 @@ void WebGL2RenderingContext::ClearBufferuiv(const v8::FunctionCallbackInfo<v8::V
|
|
|
427
405
|
auto isolate = args.GetIsolate();
|
|
428
406
|
auto context = isolate->GetCurrentContext();
|
|
429
407
|
|
|
430
|
-
auto bufferValue = args[0];
|
|
431
|
-
auto type = GetNativeType(isolate, bufferValue);
|
|
432
|
-
auto values = args[2];
|
|
433
|
-
if (args.Length() > 2 && type == NativeType::WebGLBuffer &&
|
|
434
|
-
args[1]->IsObject()) {
|
|
435
|
-
auto drawbuffer = (int32_t) args[1]->NumberValue(context).ToChecked();
|
|
436
|
-
auto buffer = WebGLBuffer::GetPointer(bufferValue.As<v8::Object>());
|
|
437
|
-
if (values->IsArray()) {
|
|
438
|
-
auto array = values.As<v8::Array>();
|
|
439
|
-
auto len = array->Length();
|
|
440
|
-
std::vector<uint32_t> buf;
|
|
441
|
-
buf.reserve(len);
|
|
442
|
-
for (int j = 0; j < len; ++j) {
|
|
443
|
-
auto item = array->Get(
|
|
444
|
-
context, j).ToLocalChecked();
|
|
445
|
-
buf.push_back(
|
|
446
|
-
static_cast<uint32_t>(item->NumberValue(context).ToChecked())
|
|
447
|
-
);
|
|
448
|
-
}
|
|
449
408
|
|
|
409
|
+
auto values = args[2];
|
|
450
410
|
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
411
|
+
auto buffer = args[0]->Uint32Value(context).ToChecked();
|
|
412
|
+
auto drawbuffer = args[1]->Int32Value(context).ToChecked();
|
|
413
|
+
if (values->IsArray()) {
|
|
414
|
+
auto array = values.As<v8::Array>();
|
|
415
|
+
auto len = array->Length();
|
|
416
|
+
std::vector<uint32_t> buf;
|
|
417
|
+
buf.reserve(len);
|
|
418
|
+
for (int j = 0; j < len; ++j) {
|
|
419
|
+
auto item = array->Get(
|
|
420
|
+
context, j).ToLocalChecked();
|
|
421
|
+
buf.push_back(
|
|
422
|
+
item->Uint32Value(context).ToChecked()
|
|
457
423
|
);
|
|
424
|
+
}
|
|
458
425
|
|
|
459
|
-
} else if (values->IsUint32Array()) {
|
|
460
|
-
auto buf = values.As<v8::Uint32Array>();
|
|
461
|
-
auto array = buf->Buffer();
|
|
462
|
-
auto offset = buf->ByteOffset();
|
|
463
|
-
auto size = buf->Length();
|
|
464
|
-
auto data_ptr = static_cast<uint8_t*>(array->GetBackingStore()->Data()) + offset;
|
|
465
|
-
auto data = static_cast<uint32_t *>((void*) data_ptr);
|
|
466
426
|
|
|
427
|
+
canvas_native_webgl2_clear_bufferuiv(
|
|
428
|
+
buffer,
|
|
429
|
+
drawbuffer,
|
|
430
|
+
buf.data(),
|
|
431
|
+
buf.size(),
|
|
432
|
+
ptr->GetState()
|
|
433
|
+
);
|
|
434
|
+
|
|
435
|
+
} else if (values->IsUint32Array()) {
|
|
436
|
+
auto buf = values.As<v8::Uint32Array>();
|
|
437
|
+
auto array = buf->Buffer();
|
|
438
|
+
auto offset = buf->ByteOffset();
|
|
439
|
+
auto size = buf->Length();
|
|
440
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
441
|
+
auto data = static_cast<uint32_t *>((void *) data_ptr);
|
|
467
442
|
|
|
468
443
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
}
|
|
444
|
+
canvas_native_webgl2_clear_bufferuiv(
|
|
445
|
+
buffer,
|
|
446
|
+
drawbuffer,
|
|
447
|
+
data, size,
|
|
448
|
+
ptr->GetState()
|
|
449
|
+
);
|
|
476
450
|
}
|
|
477
451
|
}
|
|
478
452
|
|
|
@@ -490,7 +464,7 @@ void WebGL2RenderingContext::ClientWaitSync(const v8::FunctionCallbackInfo<v8::V
|
|
|
490
464
|
if (args.Length() > 2 && type == NativeType::WebGLSync) {
|
|
491
465
|
auto sync = WebGLSyncImpl::GetPointer(syncValue.As<v8::Object>());
|
|
492
466
|
if (sync != nullptr) {
|
|
493
|
-
auto flags =
|
|
467
|
+
auto flags = args[1]->Uint32Value(context).ToChecked();
|
|
494
468
|
auto timeout = args[2]->NumberValue(context).ToChecked();
|
|
495
469
|
auto ret = canvas_native_webgl2_client_wait_sync(
|
|
496
470
|
sync->GetSync(),
|
|
@@ -499,7 +473,7 @@ void WebGL2RenderingContext::ClientWaitSync(const v8::FunctionCallbackInfo<v8::V
|
|
|
499
473
|
ptr->GetState()
|
|
500
474
|
);
|
|
501
475
|
|
|
502
|
-
args.GetReturnValue().Set(
|
|
476
|
+
args.GetReturnValue().Set(ret);
|
|
503
477
|
return;
|
|
504
478
|
}
|
|
505
479
|
}
|
|
@@ -518,15 +492,15 @@ WebGL2RenderingContext::CompressedTexSubImage3D(const v8::FunctionCallbackInfo<v
|
|
|
518
492
|
auto context = isolate->GetCurrentContext();
|
|
519
493
|
|
|
520
494
|
if (args.Length() > 8) {
|
|
521
|
-
auto target =
|
|
522
|
-
auto level =
|
|
523
|
-
auto xoffset =
|
|
524
|
-
auto yoffset =
|
|
525
|
-
auto zoffset =
|
|
526
|
-
auto width =
|
|
527
|
-
auto height =
|
|
528
|
-
auto depth =
|
|
529
|
-
auto format =
|
|
495
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
496
|
+
auto level = args[1]->Int32Value(context).ToChecked();
|
|
497
|
+
auto xoffset = args[2]->Int32Value(context).ToChecked();
|
|
498
|
+
auto yoffset = args[3]->Int32Value(context).ToChecked();
|
|
499
|
+
auto zoffset = args[4]->Int32Value(context).ToChecked();
|
|
500
|
+
auto width = args[5]->Int32Value(context).ToChecked();
|
|
501
|
+
auto height = args[6]->Int32Value(context).ToChecked();
|
|
502
|
+
auto depth = args[7]->Int32Value(context).ToChecked();
|
|
503
|
+
auto format = args[8]->Uint32Value(context).ToChecked();
|
|
530
504
|
|
|
531
505
|
auto imageSizeOrBufValue = args[0];
|
|
532
506
|
if (args[9]->IsObject()) {
|
|
@@ -535,8 +509,8 @@ WebGL2RenderingContext::CompressedTexSubImage3D(const v8::FunctionCallbackInfo<v
|
|
|
535
509
|
auto array = buf->Buffer();
|
|
536
510
|
auto offset = buf->ByteOffset();
|
|
537
511
|
auto size = buf->ByteLength();
|
|
538
|
-
auto data_ptr = static_cast<uint8_t*>(array->GetBackingStore()->Data()) + offset;
|
|
539
|
-
auto data = static_cast<uint8_t *>((void*) data_ptr);
|
|
512
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
513
|
+
auto data = static_cast<uint8_t *>((void *) data_ptr);
|
|
540
514
|
|
|
541
515
|
size_t srcOffset = 0;
|
|
542
516
|
if (args[10]->IsNumber()) {
|
|
@@ -567,10 +541,10 @@ WebGL2RenderingContext::CompressedTexSubImage3D(const v8::FunctionCallbackInfo<v
|
|
|
567
541
|
);
|
|
568
542
|
}
|
|
569
543
|
} else {
|
|
570
|
-
auto imageSizeOrBuf =
|
|
544
|
+
auto imageSizeOrBuf = imageSizeOrBufValue->Int32Value(context).ToChecked();
|
|
571
545
|
auto offset = 0;
|
|
572
546
|
if (args[10]->IsNumber()) {
|
|
573
|
-
offset =
|
|
547
|
+
offset = args[10]->Int32Value(context).ToChecked();
|
|
574
548
|
}
|
|
575
549
|
canvas_native_webgl2_compressed_tex_sub_image3d_none(
|
|
576
550
|
target,
|
|
@@ -600,8 +574,8 @@ void WebGL2RenderingContext::CopyBufferSubData(const v8::FunctionCallbackInfo<v8
|
|
|
600
574
|
auto context = isolate->GetCurrentContext();
|
|
601
575
|
|
|
602
576
|
if (args.Length() > 4) {
|
|
603
|
-
auto readTarget =
|
|
604
|
-
auto writeTarget =
|
|
577
|
+
auto readTarget = args[0]->Uint32Value(context).ToChecked();
|
|
578
|
+
auto writeTarget = args[1]->Uint32Value(context).ToChecked();
|
|
605
579
|
auto readOffset = args[2]->NumberValue(context).ToChecked();
|
|
606
580
|
auto writeOffset = args[3]->NumberValue(context).ToChecked();
|
|
607
581
|
auto size = args[4]->NumberValue(context).ToChecked();
|
|
@@ -626,15 +600,15 @@ void WebGL2RenderingContext::CopyTexSubImage3D(const v8::FunctionCallbackInfo<v8
|
|
|
626
600
|
auto context = isolate->GetCurrentContext();
|
|
627
601
|
|
|
628
602
|
if (args.Length() > 8) {
|
|
629
|
-
auto target =
|
|
630
|
-
auto level =
|
|
631
|
-
auto xoffset =
|
|
632
|
-
auto yoffset =
|
|
633
|
-
auto zoffset =
|
|
634
|
-
auto x =
|
|
635
|
-
auto y =
|
|
636
|
-
auto width =
|
|
637
|
-
auto height =
|
|
603
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
604
|
+
auto level = args[1]->Int32Value(context).ToChecked();
|
|
605
|
+
auto xoffset = args[2]->Int32Value(context).ToChecked();
|
|
606
|
+
auto yoffset = args[3]->Int32Value(context).ToChecked();
|
|
607
|
+
auto zoffset = args[4]->Int32Value(context).ToChecked();
|
|
608
|
+
auto x = args[5]->Int32Value(context).ToChecked();
|
|
609
|
+
auto y = args[6]->Int32Value(context).ToChecked();
|
|
610
|
+
auto width = args[7]->Int32Value(context).ToChecked();
|
|
611
|
+
auto height = args[8]->Int32Value(context).ToChecked();
|
|
638
612
|
canvas_native_webgl2_copy_tex_sub_image3d(
|
|
639
613
|
target,
|
|
640
614
|
level,
|
|
@@ -845,10 +819,10 @@ void WebGL2RenderingContext::DrawArraysInstanced(const v8::FunctionCallbackInfo<
|
|
|
845
819
|
auto isolate = args.GetIsolate();
|
|
846
820
|
auto context = isolate->GetCurrentContext();
|
|
847
821
|
|
|
848
|
-
auto mode =
|
|
849
|
-
auto first =
|
|
850
|
-
auto count_ =
|
|
851
|
-
auto instanceCount =
|
|
822
|
+
auto mode = args[0]->Uint32Value(context).ToChecked();
|
|
823
|
+
auto first = args[1]->Int32Value(context).ToChecked();
|
|
824
|
+
auto count_ = args[2]->Int32Value(context).ToChecked();
|
|
825
|
+
auto instanceCount = args[3]->Int32Value(context).ToChecked();
|
|
852
826
|
canvas_native_webgl2_draw_arrays_instanced(
|
|
853
827
|
mode,
|
|
854
828
|
first,
|
|
@@ -878,12 +852,11 @@ void WebGL2RenderingContext::DrawBuffers(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
878
852
|
for (int j = 0; j < len; ++j) {
|
|
879
853
|
auto item = array->Get(
|
|
880
854
|
context, j).ToLocalChecked();
|
|
881
|
-
buf.emplace_back(
|
|
882
|
-
(uint32_t) item->NumberValue(context).ToChecked());
|
|
855
|
+
buf.emplace_back(item->Uint32Value(context).ToChecked());
|
|
883
856
|
}
|
|
884
857
|
|
|
885
858
|
canvas_native_webgl2_draw_buffers(
|
|
886
|
-
|
|
859
|
+
buf.data(), buf.size(),
|
|
887
860
|
ptr->GetState());
|
|
888
861
|
}
|
|
889
862
|
}
|
|
@@ -898,11 +871,11 @@ WebGL2RenderingContext::DrawElementsInstanced(const v8::FunctionCallbackInfo<v8:
|
|
|
898
871
|
auto isolate = args.GetIsolate();
|
|
899
872
|
auto context = isolate->GetCurrentContext();
|
|
900
873
|
|
|
901
|
-
auto mode =
|
|
902
|
-
auto count_ =
|
|
903
|
-
auto type =
|
|
874
|
+
auto mode = args[0]->Uint32Value(context).ToChecked();
|
|
875
|
+
auto count_ = args[1]->Int32Value(context).ToChecked();
|
|
876
|
+
auto type = args[2]->Uint32Value(context).ToChecked();
|
|
904
877
|
auto offset = args[3]->NumberValue(context).ToChecked();
|
|
905
|
-
auto instanceCount =
|
|
878
|
+
auto instanceCount = args[4]->Int32Value(context).ToChecked();
|
|
906
879
|
canvas_native_webgl2_draw_elements_instanced(
|
|
907
880
|
mode,
|
|
908
881
|
count_,
|
|
@@ -924,11 +897,11 @@ void WebGL2RenderingContext::DrawRangeElements(const v8::FunctionCallbackInfo<v8
|
|
|
924
897
|
auto isolate = args.GetIsolate();
|
|
925
898
|
auto context = isolate->GetCurrentContext();
|
|
926
899
|
|
|
927
|
-
auto mode =
|
|
928
|
-
auto start =
|
|
929
|
-
auto end =
|
|
930
|
-
auto count_ =
|
|
931
|
-
auto type =
|
|
900
|
+
auto mode = args[0]->Uint32Value(context).ToChecked();
|
|
901
|
+
auto start = args[1]->Uint32Value(context).ToChecked();
|
|
902
|
+
auto end = args[2]->Uint32Value(context).ToChecked();
|
|
903
|
+
auto count_ = args[3]->Int32Value(context).ToChecked();
|
|
904
|
+
auto type = args[4]->Uint32Value(context).ToChecked();
|
|
932
905
|
auto offset = args[5]->NumberValue(context).ToChecked();
|
|
933
906
|
canvas_native_webgl2_draw_range_elements(
|
|
934
907
|
mode,
|
|
@@ -953,7 +926,7 @@ void WebGL2RenderingContext::EndQuery(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
953
926
|
auto context = isolate->GetCurrentContext();
|
|
954
927
|
|
|
955
928
|
if (args[0]->IsNumber()) {
|
|
956
|
-
auto target =
|
|
929
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
957
930
|
canvas_native_webgl2_end_query(target,
|
|
958
931
|
ptr->GetState());
|
|
959
932
|
}
|
|
@@ -982,8 +955,8 @@ void WebGL2RenderingContext::FenceSync(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
982
955
|
auto isolate = args.GetIsolate();
|
|
983
956
|
auto context = isolate->GetCurrentContext();
|
|
984
957
|
|
|
985
|
-
auto condition =
|
|
986
|
-
auto flags =
|
|
958
|
+
auto condition = args[0]->Uint32Value(context).ToChecked();
|
|
959
|
+
auto flags = args[1]->Uint32Value(context).ToChecked();
|
|
987
960
|
auto sync = canvas_native_webgl2_fence_sync(
|
|
988
961
|
condition,
|
|
989
962
|
flags,
|
|
@@ -1009,11 +982,11 @@ WebGL2RenderingContext::FramebufferTextureLayer(const v8::FunctionCallbackInfo<v
|
|
|
1009
982
|
auto textureValue = args[2];
|
|
1010
983
|
auto type = GetNativeType(isolate, textureValue);
|
|
1011
984
|
if (type == NativeType::WebGLTexture) {
|
|
1012
|
-
auto target =
|
|
1013
|
-
auto attachment =
|
|
985
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
986
|
+
auto attachment = args[1]->Uint32Value(context).ToChecked();
|
|
1014
987
|
auto texture = WebGLTexture::GetPointer(textureValue.As<v8::Object>());
|
|
1015
|
-
auto level =
|
|
1016
|
-
auto layer =
|
|
988
|
+
auto level = args[3]->Int32Value(context).ToChecked();
|
|
989
|
+
auto layer = args[4]->Int32Value(context).ToChecked();
|
|
1017
990
|
if (texture != nullptr) {
|
|
1018
991
|
canvas_native_webgl2_framebuffer_texture_layer(
|
|
1019
992
|
target,
|
|
@@ -1044,13 +1017,13 @@ WebGL2RenderingContext::GetActiveUniformBlockName(const v8::FunctionCallbackInfo
|
|
|
1044
1017
|
if (type == NativeType::WebGLProgram) {
|
|
1045
1018
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
1046
1019
|
if (program != nullptr) {
|
|
1047
|
-
auto uniformBlockIndex =
|
|
1020
|
+
auto uniformBlockIndex = args[1]->Uint32Value(context).ToChecked();
|
|
1048
1021
|
auto name = canvas_native_webgl2_get_active_uniform_block_name(
|
|
1049
1022
|
program->GetProgram(),
|
|
1050
1023
|
uniformBlockIndex,
|
|
1051
1024
|
ptr->GetState()
|
|
1052
1025
|
);
|
|
1053
|
-
args.GetReturnValue().Set(ConvertToV8OneByteString(isolate, (char*)name));
|
|
1026
|
+
args.GetReturnValue().Set(ConvertToV8OneByteString(isolate, (char *) name));
|
|
1054
1027
|
return;
|
|
1055
1028
|
}
|
|
1056
1029
|
|
|
@@ -1077,8 +1050,8 @@ void WebGL2RenderingContext::GetActiveUniformBlockParameter(
|
|
|
1077
1050
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
1078
1051
|
|
|
1079
1052
|
if (program != nullptr) {
|
|
1080
|
-
auto uniformBlockIndex =
|
|
1081
|
-
auto pname =
|
|
1053
|
+
auto uniformBlockIndex = args[1]->Uint32Value(context).ToChecked();
|
|
1054
|
+
auto pname = args[2]->Uint32Value(context).ToChecked();
|
|
1082
1055
|
auto ret = canvas_native_webgl2_get_active_uniform_block_parameter(
|
|
1083
1056
|
program->GetProgram(),
|
|
1084
1057
|
uniformBlockIndex,
|
|
@@ -1098,7 +1071,7 @@ void WebGL2RenderingContext::GetActiveUniformBlockParameter(
|
|
|
1098
1071
|
auto value = canvas_native_webgl_result_get_u32_array(
|
|
1099
1072
|
ret);
|
|
1100
1073
|
|
|
1101
|
-
auto buf = (uint8_t*)canvas_native_u32_buffer_get_bytes(value);
|
|
1074
|
+
auto buf = (uint8_t *) canvas_native_u32_buffer_get_bytes(value);
|
|
1102
1075
|
auto size = canvas_native_u32_buffer_get_length(value);
|
|
1103
1076
|
auto bytes_size = size * sizeof(uint32_t);
|
|
1104
1077
|
|
|
@@ -1106,7 +1079,8 @@ void WebGL2RenderingContext::GetActiveUniformBlockParameter(
|
|
|
1106
1079
|
[](void *data, size_t length,
|
|
1107
1080
|
void *deleter_data) {
|
|
1108
1081
|
if (deleter_data != nullptr) {
|
|
1109
|
-
canvas_native_u32_buffer_destroy(
|
|
1082
|
+
canvas_native_u32_buffer_destroy(
|
|
1083
|
+
(U32Buffer *) deleter_data);
|
|
1110
1084
|
}
|
|
1111
1085
|
},
|
|
1112
1086
|
value);
|
|
@@ -1150,7 +1124,7 @@ void WebGL2RenderingContext::GetActiveUniforms(const v8::FunctionCallbackInfo<v8
|
|
|
1150
1124
|
|
|
1151
1125
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
1152
1126
|
auto uniformIndicesObject = args[1];
|
|
1153
|
-
auto pname =
|
|
1127
|
+
auto pname = args[2]->Uint32Value(context).ToChecked();
|
|
1154
1128
|
|
|
1155
1129
|
if (uniformIndicesObject->IsArray()) {
|
|
1156
1130
|
auto uniformIndices = uniformIndicesObject.As<v8::Array>();
|
|
@@ -1158,14 +1132,14 @@ void WebGL2RenderingContext::GetActiveUniforms(const v8::FunctionCallbackInfo<v8
|
|
|
1158
1132
|
std::vector<uint32_t> buf;
|
|
1159
1133
|
buf.reserve(size);
|
|
1160
1134
|
for (int j = 0; j < size; j++) {
|
|
1161
|
-
auto item =
|
|
1162
|
-
context, j).ToLocalChecked()->
|
|
1135
|
+
auto item = uniformIndices->Get(
|
|
1136
|
+
context, j).ToLocalChecked()->Uint32Value(context).ToChecked();
|
|
1163
1137
|
buf.emplace_back(item);
|
|
1164
1138
|
}
|
|
1165
1139
|
|
|
1166
1140
|
auto ret = canvas_native_webgl2_get_active_uniforms(
|
|
1167
1141
|
program->GetProgram(),
|
|
1168
|
-
|
|
1142
|
+
buf.data(), buf.size(),
|
|
1169
1143
|
pname,
|
|
1170
1144
|
ptr->GetState()
|
|
1171
1145
|
);
|
|
@@ -1186,7 +1160,7 @@ void WebGL2RenderingContext::GetActiveUniforms(const v8::FunctionCallbackInfo<v8
|
|
|
1186
1160
|
auto item = buffer[j];
|
|
1187
1161
|
array->Set(
|
|
1188
1162
|
context, j,
|
|
1189
|
-
v8::
|
|
1163
|
+
v8::Integer::NewFromUnsigned(isolate, item));
|
|
1190
1164
|
}
|
|
1191
1165
|
args.GetReturnValue().Set(array);
|
|
1192
1166
|
canvas_native_u32_buffer_destroy(value);
|
|
@@ -1208,8 +1182,7 @@ void WebGL2RenderingContext::GetActiveUniforms(const v8::FunctionCallbackInfo<v8
|
|
|
1208
1182
|
auto item = buffer[j];
|
|
1209
1183
|
array->Set(
|
|
1210
1184
|
context, j,
|
|
1211
|
-
v8::
|
|
1212
|
-
(double) item));
|
|
1185
|
+
v8::Integer::New(isolate, item));
|
|
1213
1186
|
}
|
|
1214
1187
|
args.GetReturnValue().Set(array);
|
|
1215
1188
|
canvas_native_i32_buffer_destroy(value);
|
|
@@ -1260,7 +1233,7 @@ void WebGL2RenderingContext::GetBufferSubData(const v8::FunctionCallbackInfo<v8:
|
|
|
1260
1233
|
|
|
1261
1234
|
auto dstDataObject = args[2];
|
|
1262
1235
|
if (dstDataObject->IsArrayBufferView()) {
|
|
1263
|
-
auto target =
|
|
1236
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
1264
1237
|
auto srcByteOffset = args[1]->NumberValue(context).ToChecked();
|
|
1265
1238
|
|
|
1266
1239
|
auto array = dstDataObject.As<v8::ArrayBufferView>();
|
|
@@ -1271,7 +1244,6 @@ void WebGL2RenderingContext::GetBufferSubData(const v8::FunctionCallbackInfo<v8:
|
|
|
1271
1244
|
auto data = reinterpret_cast<uint8_t *>(buf->GetBackingStore()->Data()) + offset;
|
|
1272
1245
|
|
|
1273
1246
|
|
|
1274
|
-
|
|
1275
1247
|
auto BYTES_PER_ELEMENT = (ssize_t) array->Get(
|
|
1276
1248
|
context,
|
|
1277
1249
|
ConvertToV8String(isolate, "BYTES_PER_ELEMENT")).ToLocalChecked()->NumberValue(
|
|
@@ -1345,8 +1317,8 @@ void WebGL2RenderingContext::GetIndexedParameter(const v8::FunctionCallbackInfo<
|
|
|
1345
1317
|
auto isolate = args.GetIsolate();
|
|
1346
1318
|
auto context = isolate->GetCurrentContext();
|
|
1347
1319
|
|
|
1348
|
-
auto target =
|
|
1349
|
-
auto index =
|
|
1320
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
1321
|
+
auto index = args[1]->Uint32Value(context).ToChecked();
|
|
1350
1322
|
auto ret = canvas_native_webgl2_get_indexed_parameter(
|
|
1351
1323
|
target,
|
|
1352
1324
|
index,
|
|
@@ -1390,9 +1362,9 @@ void WebGL2RenderingContext::GetInternalformatParameter(
|
|
|
1390
1362
|
auto isolate = args.GetIsolate();
|
|
1391
1363
|
auto context = isolate->GetCurrentContext();
|
|
1392
1364
|
|
|
1393
|
-
auto target =
|
|
1394
|
-
auto internalformat =
|
|
1395
|
-
auto pname =
|
|
1365
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
1366
|
+
auto internalformat = args[1]->Uint32Value(context).ToChecked();
|
|
1367
|
+
auto pname = args[2]->Uint32Value(context).ToChecked();
|
|
1396
1368
|
switch (internalformat) {
|
|
1397
1369
|
case GL_RGB:
|
|
1398
1370
|
case GL_RGBA:
|
|
@@ -1461,7 +1433,7 @@ void WebGL2RenderingContext::GetInternalformatParameter(
|
|
|
1461
1433
|
if (pname == GL_SAMPLES) {
|
|
1462
1434
|
auto value = canvas_native_webgl_result_get_i32_array(ret);
|
|
1463
1435
|
|
|
1464
|
-
auto buf = (uint8_t*)canvas_native_i32_buffer_get_bytes(value);
|
|
1436
|
+
auto buf = (uint8_t *) canvas_native_i32_buffer_get_bytes(value);
|
|
1465
1437
|
auto size = canvas_native_i32_buffer_get_length(value);
|
|
1466
1438
|
auto bytes_size = size * sizeof(int32_t);
|
|
1467
1439
|
|
|
@@ -1469,7 +1441,8 @@ void WebGL2RenderingContext::GetInternalformatParameter(
|
|
|
1469
1441
|
[](void *data, size_t length,
|
|
1470
1442
|
void *deleter_data) {
|
|
1471
1443
|
if (deleter_data != nullptr) {
|
|
1472
|
-
canvas_native_i32_buffer_destroy(
|
|
1444
|
+
canvas_native_i32_buffer_destroy(
|
|
1445
|
+
(I32Buffer *) deleter_data);
|
|
1473
1446
|
}
|
|
1474
1447
|
},
|
|
1475
1448
|
value);
|
|
@@ -1495,7 +1468,7 @@ void WebGL2RenderingContext::GetParameter(const v8::FunctionCallbackInfo<v8::Val
|
|
|
1495
1468
|
auto isolate = args.GetIsolate();
|
|
1496
1469
|
auto context = isolate->GetCurrentContext();
|
|
1497
1470
|
|
|
1498
|
-
auto pname =
|
|
1471
|
+
auto pname = args[0]->Uint32Value(context).ToChecked();
|
|
1499
1472
|
auto result = canvas_native_webgl2_get_parameter(
|
|
1500
1473
|
pname,
|
|
1501
1474
|
ptr->GetState());
|
|
@@ -1510,7 +1483,7 @@ void WebGL2RenderingContext::GetParameter(const v8::FunctionCallbackInfo<v8::Val
|
|
|
1510
1483
|
return;
|
|
1511
1484
|
default: {
|
|
1512
1485
|
auto ret = ptr->GetParameterInternal(
|
|
1513
|
-
isolate, pname,result);
|
|
1486
|
+
isolate, pname, result);
|
|
1514
1487
|
|
|
1515
1488
|
canvas_native_webgl_WebGLResult_destroy(result);
|
|
1516
1489
|
|
|
@@ -1535,7 +1508,7 @@ void WebGL2RenderingContext::GetQueryParameter(const v8::FunctionCallbackInfo<v8
|
|
|
1535
1508
|
if (type == NativeType::WebGLQuery) {
|
|
1536
1509
|
auto query = WebGLQuery::GetPointer(queryValue.As<v8::Object>());
|
|
1537
1510
|
if (query != nullptr) {
|
|
1538
|
-
auto pname =
|
|
1511
|
+
auto pname = args[1]->Uint32Value(context).ToChecked();
|
|
1539
1512
|
|
|
1540
1513
|
|
|
1541
1514
|
auto ret = canvas_native_webgl2_get_query_parameter(
|
|
@@ -1549,7 +1522,7 @@ void WebGL2RenderingContext::GetQueryParameter(const v8::FunctionCallbackInfo<v8
|
|
|
1549
1522
|
return;
|
|
1550
1523
|
} else if (pname ==
|
|
1551
1524
|
GL_QUERY_RESULT_AVAILABLE) {
|
|
1552
|
-
args.GetReturnValue().Set(
|
|
1525
|
+
args.GetReturnValue().Set(canvas_native_webgl_result_get_u32(
|
|
1553
1526
|
ret));
|
|
1554
1527
|
canvas_native_webgl_WebGLResult_destroy(ret);
|
|
1555
1528
|
return;
|
|
@@ -1573,8 +1546,8 @@ void WebGL2RenderingContext::GetQuery(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
1573
1546
|
auto isolate = args.GetIsolate();
|
|
1574
1547
|
auto context = isolate->GetCurrentContext();
|
|
1575
1548
|
|
|
1576
|
-
auto target =
|
|
1577
|
-
auto pname =
|
|
1549
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
1550
|
+
auto pname = args[1]->Uint32Value(context).ToChecked();
|
|
1578
1551
|
auto ret = canvas_native_webgl2_get_query(
|
|
1579
1552
|
target,
|
|
1580
1553
|
pname,
|
|
@@ -1604,7 +1577,7 @@ void WebGL2RenderingContext::GetSamplerParameter(const v8::FunctionCallbackInfo<
|
|
|
1604
1577
|
if (type == NativeType::WebGLSampler) {
|
|
1605
1578
|
auto sampler = WebGLSampler::GetPointer(samplerValue.As<v8::Object>());
|
|
1606
1579
|
if (sampler != nullptr) {
|
|
1607
|
-
auto pname =
|
|
1580
|
+
auto pname = args[1]->Uint32Value(context).ToChecked();
|
|
1608
1581
|
auto ret = canvas_native_webgl2_get_sampler_parameter(
|
|
1609
1582
|
sampler->GetSampler(),
|
|
1610
1583
|
pname,
|
|
@@ -1653,7 +1626,7 @@ void WebGL2RenderingContext::GetSyncParameter(const v8::FunctionCallbackInfo<v8:
|
|
|
1653
1626
|
auto syncValue = args[0];
|
|
1654
1627
|
auto sync = WebGLSyncImpl::GetPointer(syncValue.As<v8::Object>());
|
|
1655
1628
|
if (sync != nullptr) {
|
|
1656
|
-
auto pname =
|
|
1629
|
+
auto pname = args[1]->Uint32Value(context).ToChecked();
|
|
1657
1630
|
auto ret = canvas_native_webgl2_get_sync_parameter(
|
|
1658
1631
|
sync->GetSync(),
|
|
1659
1632
|
pname,
|
|
@@ -1693,7 +1666,7 @@ void WebGL2RenderingContext::GetTransformFeedbackVarying(
|
|
|
1693
1666
|
auto type = GetNativeType(isolate, programValue);
|
|
1694
1667
|
if (type == NativeType::WebGLProgram) {
|
|
1695
1668
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
1696
|
-
auto index =
|
|
1669
|
+
auto index = args[1]->Uint32Value(context).ToChecked();
|
|
1697
1670
|
if (program != nullptr) {
|
|
1698
1671
|
auto ret = canvas_native_webgl2_get_transform_feedback_varying(
|
|
1699
1672
|
program->GetProgram(),
|
|
@@ -1776,7 +1749,7 @@ void WebGL2RenderingContext::GetUniformIndices(const v8::FunctionCallbackInfo<v8
|
|
|
1776
1749
|
}
|
|
1777
1750
|
|
|
1778
1751
|
|
|
1779
|
-
const char*
|
|
1752
|
+
const char *cStrings[store.size()];
|
|
1780
1753
|
for (size_t i = 0; i < store.size(); ++i) {
|
|
1781
1754
|
cStrings[i] = store[i].c_str();
|
|
1782
1755
|
}
|
|
@@ -1796,8 +1769,7 @@ void WebGL2RenderingContext::GetUniformIndices(const v8::FunctionCallbackInfo<v8
|
|
|
1796
1769
|
auto item = buf[j];
|
|
1797
1770
|
result->Set(context,
|
|
1798
1771
|
j,
|
|
1799
|
-
v8::
|
|
1800
|
-
(int32_t) item));
|
|
1772
|
+
v8::Integer::NewFromUnsigned(isolate, item));
|
|
1801
1773
|
}
|
|
1802
1774
|
|
|
1803
1775
|
args.GetReturnValue().Set(result);
|
|
@@ -1820,7 +1792,7 @@ WebGL2RenderingContext::InvalidateFramebuffer(const v8::FunctionCallbackInfo<v8:
|
|
|
1820
1792
|
auto context = isolate->GetCurrentContext();
|
|
1821
1793
|
|
|
1822
1794
|
auto attachments = args[1];
|
|
1823
|
-
auto target =
|
|
1795
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
1824
1796
|
|
|
1825
1797
|
if (attachments->IsArray()) {
|
|
1826
1798
|
auto array = attachments.As<v8::Array>();
|
|
@@ -1828,8 +1800,8 @@ WebGL2RenderingContext::InvalidateFramebuffer(const v8::FunctionCallbackInfo<v8:
|
|
|
1828
1800
|
std::vector<uint32_t> buf;
|
|
1829
1801
|
buf.reserve(len);
|
|
1830
1802
|
for (int j = 0; j < len; ++j) {
|
|
1831
|
-
auto item =
|
|
1832
|
-
context, j).ToLocalChecked()->
|
|
1803
|
+
auto item = array->Get(
|
|
1804
|
+
context, j).ToLocalChecked()->Uint32Value(context).ToChecked();
|
|
1833
1805
|
buf.push_back(item);
|
|
1834
1806
|
}
|
|
1835
1807
|
|
|
@@ -1851,19 +1823,19 @@ WebGL2RenderingContext::InvalidateSubFramebuffer(const v8::FunctionCallbackInfo<
|
|
|
1851
1823
|
|
|
1852
1824
|
auto attachments = args[1];
|
|
1853
1825
|
if (attachments->IsArray()) {
|
|
1854
|
-
auto target =
|
|
1855
|
-
auto x =
|
|
1856
|
-
auto y =
|
|
1857
|
-
auto width =
|
|
1858
|
-
auto height =
|
|
1826
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
1827
|
+
auto x = args[2]->Int32Value(context).ToChecked();
|
|
1828
|
+
auto y = args[3]->Int32Value(context).ToChecked();
|
|
1829
|
+
auto width = args[4]->Int32Value(context).ToChecked();
|
|
1830
|
+
auto height = args[5]->Int32Value(context).ToChecked();
|
|
1859
1831
|
|
|
1860
1832
|
auto array = attachments.As<v8::Array>();
|
|
1861
1833
|
auto len = array->Length();
|
|
1862
1834
|
std::vector<uint32_t> buf;
|
|
1863
1835
|
buf.reserve(len);
|
|
1864
1836
|
for (int j = 0; j < len; ++j) {
|
|
1865
|
-
auto item =
|
|
1866
|
-
context, j).ToLocalChecked()->
|
|
1837
|
+
auto item = array->Get(
|
|
1838
|
+
context, j).ToLocalChecked()->Uint32Value(context).ToChecked();
|
|
1867
1839
|
buf.push_back(item);
|
|
1868
1840
|
}
|
|
1869
1841
|
|
|
@@ -2022,7 +1994,7 @@ void WebGL2RenderingContext::ReadBuffer(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2022
1994
|
auto isolate = args.GetIsolate();
|
|
2023
1995
|
auto context = isolate->GetCurrentContext();
|
|
2024
1996
|
|
|
2025
|
-
auto src =
|
|
1997
|
+
auto src = args[0]->Uint32Value(context).ToChecked();
|
|
2026
1998
|
canvas_native_webgl2_read_buffer(
|
|
2027
1999
|
src,
|
|
2028
2000
|
ptr->GetState()
|
|
@@ -2039,11 +2011,11 @@ void WebGL2RenderingContext::RenderbufferStorageMultisample(
|
|
|
2039
2011
|
auto isolate = args.GetIsolate();
|
|
2040
2012
|
auto context = isolate->GetCurrentContext();
|
|
2041
2013
|
|
|
2042
|
-
auto target =
|
|
2043
|
-
auto samples =
|
|
2044
|
-
auto internalFormat =
|
|
2045
|
-
auto width =
|
|
2046
|
-
auto height =
|
|
2014
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
2015
|
+
auto samples = args[1]->Int32Value(context).ToChecked();
|
|
2016
|
+
auto internalFormat = args[2]->Uint32Value(context).ToChecked();
|
|
2017
|
+
auto width = args[3]->Int32Value(context).ToChecked();
|
|
2018
|
+
auto height = args[4]->Int32Value(context).ToChecked();
|
|
2047
2019
|
canvas_native_webgl2_renderbuffer_storage_multisample(
|
|
2048
2020
|
target,
|
|
2049
2021
|
samples,
|
|
@@ -2078,7 +2050,7 @@ void WebGL2RenderingContext::SamplerParameterf(const v8::FunctionCallbackInfo<v8
|
|
|
2078
2050
|
auto type = GetNativeType(isolate, samplerValue);
|
|
2079
2051
|
if (type == NativeType::WebGLSampler) {
|
|
2080
2052
|
auto sampler = WebGLSampler::GetPointer(samplerValue.As<v8::Object>());
|
|
2081
|
-
auto pname =
|
|
2053
|
+
auto pname = args[1]->Uint32Value(context).ToChecked();
|
|
2082
2054
|
auto param = args[2]->NumberValue(context).ToChecked();
|
|
2083
2055
|
if (sampler != nullptr) {
|
|
2084
2056
|
canvas_native_webgl2_sampler_parameterf(
|
|
@@ -2104,8 +2076,8 @@ void WebGL2RenderingContext::SamplerParameteri(const v8::FunctionCallbackInfo<v8
|
|
|
2104
2076
|
auto type = GetNativeType(isolate, samplerValue);
|
|
2105
2077
|
if (type == NativeType::WebGLSampler) {
|
|
2106
2078
|
auto sampler = WebGLSampler::GetPointer(samplerValue.As<v8::Object>());
|
|
2107
|
-
auto pname =
|
|
2108
|
-
auto param =
|
|
2079
|
+
auto pname = args[1]->Uint32Value(context).ToChecked();
|
|
2080
|
+
auto param = args[2]->Int32Value(context).ToChecked();
|
|
2109
2081
|
if (sampler != nullptr) {
|
|
2110
2082
|
canvas_native_webgl2_sampler_parameteri(
|
|
2111
2083
|
sampler->GetSampler(),
|
|
@@ -2130,23 +2102,23 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2130
2102
|
|
|
2131
2103
|
|
|
2132
2104
|
if (count == 10) {
|
|
2133
|
-
auto target =
|
|
2105
|
+
auto target = args[0]->Int32Value(
|
|
2134
2106
|
context).ToChecked();
|
|
2135
|
-
auto level =
|
|
2107
|
+
auto level = args[1]->Int32Value(
|
|
2136
2108
|
context).ToChecked();
|
|
2137
|
-
auto internalformat =
|
|
2109
|
+
auto internalformat = args[2]->Int32Value(
|
|
2138
2110
|
context).ToChecked();
|
|
2139
|
-
auto width =
|
|
2111
|
+
auto width = args[3]->Int32Value(
|
|
2140
2112
|
context).ToChecked();
|
|
2141
|
-
auto height =
|
|
2113
|
+
auto height = args[4]->Int32Value(
|
|
2142
2114
|
context).ToChecked();
|
|
2143
|
-
auto depth =
|
|
2115
|
+
auto depth = args[5]->Int32Value(
|
|
2144
2116
|
context).ToChecked();
|
|
2145
|
-
auto border =
|
|
2117
|
+
auto border = args[6]->Int32Value(
|
|
2146
2118
|
context).ToChecked();
|
|
2147
|
-
auto format =
|
|
2119
|
+
auto format = args[7]->Int32Value(
|
|
2148
2120
|
context).ToChecked();
|
|
2149
|
-
auto type =
|
|
2121
|
+
auto type = args[8]->Uint32Value(
|
|
2150
2122
|
context).ToChecked();
|
|
2151
2123
|
|
|
2152
2124
|
auto imageOrPixelsOrOffset = args[9];
|
|
@@ -2177,8 +2149,8 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2177
2149
|
auto array = buf->Buffer();
|
|
2178
2150
|
auto offset = buf->ByteOffset();
|
|
2179
2151
|
auto size = buf->ByteLength();
|
|
2180
|
-
auto data_ptr = static_cast<uint8_t*>(array->GetBackingStore()->Data()) + offset;
|
|
2181
|
-
auto data = static_cast<uint8_t *>((void*) data_ptr);
|
|
2152
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
2153
|
+
auto data = static_cast<uint8_t *>((void *) data_ptr);
|
|
2182
2154
|
|
|
2183
2155
|
|
|
2184
2156
|
canvas_native_webgl2_tex_image3d(
|
|
@@ -2250,23 +2222,23 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2250
2222
|
}
|
|
2251
2223
|
} else if (args.Length() > 10) {
|
|
2252
2224
|
|
|
2253
|
-
auto target =
|
|
2225
|
+
auto target = args[0]->Int32Value(
|
|
2254
2226
|
context).ToChecked();
|
|
2255
|
-
auto level =
|
|
2227
|
+
auto level = args[1]->Int32Value(
|
|
2256
2228
|
context).ToChecked();
|
|
2257
|
-
auto internalformat =
|
|
2229
|
+
auto internalformat = args[2]->Int32Value(
|
|
2258
2230
|
context).ToChecked();
|
|
2259
|
-
auto width =
|
|
2231
|
+
auto width = args[3]->Int32Value(
|
|
2260
2232
|
context).ToChecked();
|
|
2261
|
-
auto height =
|
|
2233
|
+
auto height = args[4]->Int32Value(
|
|
2262
2234
|
context).ToChecked();
|
|
2263
|
-
auto depth =
|
|
2235
|
+
auto depth = args[5]->Int32Value(
|
|
2264
2236
|
context).ToChecked();
|
|
2265
|
-
auto border =
|
|
2237
|
+
auto border = args[6]->Int32Value(
|
|
2266
2238
|
context).ToChecked();
|
|
2267
|
-
auto format =
|
|
2239
|
+
auto format = args[7]->Int32Value(
|
|
2268
2240
|
context).ToChecked();
|
|
2269
|
-
auto type =
|
|
2241
|
+
auto type = args[8]->Uint32Value(
|
|
2270
2242
|
context).ToChecked();
|
|
2271
2243
|
|
|
2272
2244
|
auto imageOrPixelsOrOffset = args[9];
|
|
@@ -2283,8 +2255,8 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2283
2255
|
auto array = buf->Buffer();
|
|
2284
2256
|
auto offset = buf->ByteOffset();
|
|
2285
2257
|
auto size = buf->ByteLength();
|
|
2286
|
-
auto data_ptr = static_cast<uint8_t*>(array->GetBackingStore()->Data()) + offset;
|
|
2287
|
-
auto data = static_cast<uint8_t *>((void*) data_ptr);
|
|
2258
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
2259
|
+
auto data = static_cast<uint8_t *>((void *) data_ptr);
|
|
2288
2260
|
|
|
2289
2261
|
srcOffsetValue =
|
|
2290
2262
|
srcOffsetValue * size;
|
|
@@ -2322,15 +2294,15 @@ void WebGL2RenderingContext::TexStorage2D(const v8::FunctionCallbackInfo<v8::Val
|
|
|
2322
2294
|
auto isolate = args.GetIsolate();
|
|
2323
2295
|
auto context = isolate->GetCurrentContext();
|
|
2324
2296
|
|
|
2325
|
-
auto target =
|
|
2297
|
+
auto target = args[0]->Uint32Value(
|
|
2326
2298
|
context).ToChecked();
|
|
2327
|
-
auto levels =
|
|
2299
|
+
auto levels = args[1]->Int32Value(
|
|
2328
2300
|
context).ToChecked();
|
|
2329
|
-
auto internalFormat =
|
|
2301
|
+
auto internalFormat = args[2]->Uint32Value(
|
|
2330
2302
|
context).ToChecked();
|
|
2331
|
-
auto width =
|
|
2303
|
+
auto width = args[3]->Int32Value(
|
|
2332
2304
|
context).ToChecked();
|
|
2333
|
-
auto height =
|
|
2305
|
+
auto height = args[4]->Int32Value(
|
|
2334
2306
|
context).ToChecked();
|
|
2335
2307
|
canvas_native_webgl2_tex_storage2d(
|
|
2336
2308
|
target,
|
|
@@ -2351,17 +2323,17 @@ void WebGL2RenderingContext::TexStorage3D(const v8::FunctionCallbackInfo<v8::Val
|
|
|
2351
2323
|
auto isolate = args.GetIsolate();
|
|
2352
2324
|
auto context = isolate->GetCurrentContext();
|
|
2353
2325
|
|
|
2354
|
-
auto target =
|
|
2326
|
+
auto target = args[0]->Uint32Value(
|
|
2355
2327
|
context).ToChecked();
|
|
2356
|
-
auto levels =
|
|
2328
|
+
auto levels = args[1]->Int32Value(
|
|
2357
2329
|
context).ToChecked();
|
|
2358
|
-
auto internalFormat =
|
|
2330
|
+
auto internalFormat = args[2]->Uint32Value(
|
|
2359
2331
|
context).ToChecked();
|
|
2360
|
-
auto width =
|
|
2332
|
+
auto width = args[3]->Int32Value(
|
|
2361
2333
|
context).ToChecked();
|
|
2362
|
-
auto height =
|
|
2334
|
+
auto height = args[4]->Int32Value(
|
|
2363
2335
|
context).ToChecked();
|
|
2364
|
-
auto depth =
|
|
2336
|
+
auto depth = args[5]->Int32Value(
|
|
2365
2337
|
context).ToChecked();
|
|
2366
2338
|
canvas_native_webgl2_tex_storage3d(
|
|
2367
2339
|
target,
|
|
@@ -2385,25 +2357,25 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2385
2357
|
|
|
2386
2358
|
auto count = args.Length();
|
|
2387
2359
|
if (count == 11) {
|
|
2388
|
-
auto target =
|
|
2360
|
+
auto target = args[0]->Uint32Value(
|
|
2389
2361
|
context).ToChecked();
|
|
2390
|
-
auto level =
|
|
2362
|
+
auto level = args[1]->Int32Value(
|
|
2391
2363
|
context).ToChecked();
|
|
2392
|
-
auto xoffset =
|
|
2364
|
+
auto xoffset = args[2]->Int32Value(
|
|
2393
2365
|
context).ToChecked();
|
|
2394
|
-
auto yoffset =
|
|
2366
|
+
auto yoffset = args[3]->Int32Value(
|
|
2395
2367
|
context).ToChecked();
|
|
2396
|
-
auto zoffset =
|
|
2368
|
+
auto zoffset = args[4]->Int32Value(
|
|
2397
2369
|
context).ToChecked();
|
|
2398
|
-
auto width =
|
|
2370
|
+
auto width = args[5]->Int32Value(
|
|
2399
2371
|
context).ToChecked();
|
|
2400
|
-
auto height =
|
|
2372
|
+
auto height = args[6]->Int32Value(
|
|
2401
2373
|
context).ToChecked();
|
|
2402
|
-
auto depth =
|
|
2374
|
+
auto depth = args[7]->Int32Value(
|
|
2403
2375
|
context).ToChecked();
|
|
2404
|
-
auto format =
|
|
2376
|
+
auto format = args[8]->Uint32Value(
|
|
2405
2377
|
context).ToChecked();
|
|
2406
|
-
auto type =
|
|
2378
|
+
auto type = args[9]->Uint32Value(
|
|
2407
2379
|
context).ToChecked();
|
|
2408
2380
|
|
|
2409
2381
|
if (args[10]->IsNumber()) {
|
|
@@ -2434,9 +2406,8 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2434
2406
|
auto array = buf->Buffer();
|
|
2435
2407
|
auto offset = buf->ByteOffset();
|
|
2436
2408
|
auto size = buf->ByteLength();
|
|
2437
|
-
auto data_ptr = static_cast<uint8_t*>(array->GetBackingStore()->Data()) + offset;
|
|
2438
|
-
auto data = static_cast<uint8_t *>((void*) data_ptr);
|
|
2439
|
-
|
|
2409
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
2410
|
+
auto data = static_cast<uint8_t *>((void *) data_ptr);
|
|
2440
2411
|
|
|
2441
2412
|
|
|
2442
2413
|
canvas_native_webgl2_tex_sub_image3d(
|
|
@@ -2482,25 +2453,25 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2482
2453
|
}
|
|
2483
2454
|
|
|
2484
2455
|
} else if (count > 11) {
|
|
2485
|
-
auto target =
|
|
2456
|
+
auto target = args[0]->Uint32Value(
|
|
2486
2457
|
context).ToChecked();
|
|
2487
|
-
auto level =
|
|
2458
|
+
auto level = args[1]->Int32Value(
|
|
2488
2459
|
context).ToChecked();
|
|
2489
|
-
auto xoffset =
|
|
2460
|
+
auto xoffset = args[2]->Int32Value(
|
|
2490
2461
|
context).ToChecked();
|
|
2491
|
-
auto yoffset =
|
|
2462
|
+
auto yoffset = args[3]->Int32Value(
|
|
2492
2463
|
context).ToChecked();
|
|
2493
|
-
auto zoffset =
|
|
2464
|
+
auto zoffset = args[4]->Int32Value(
|
|
2494
2465
|
context).ToChecked();
|
|
2495
|
-
auto width =
|
|
2466
|
+
auto width = args[5]->Int32Value(
|
|
2496
2467
|
context).ToChecked();
|
|
2497
|
-
auto height =
|
|
2468
|
+
auto height = args[6]->Int32Value(
|
|
2498
2469
|
context).ToChecked();
|
|
2499
|
-
auto depth =
|
|
2470
|
+
auto depth = args[7]->Int32Value(
|
|
2500
2471
|
context).ToChecked();
|
|
2501
|
-
auto format =
|
|
2472
|
+
auto format = args[8]->Uint32Value(
|
|
2502
2473
|
context).ToChecked();
|
|
2503
|
-
auto type =
|
|
2474
|
+
auto type = args[9]->Uint32Value(
|
|
2504
2475
|
context).ToChecked();
|
|
2505
2476
|
|
|
2506
2477
|
size_t srcOffsetValue = 0;
|
|
@@ -2519,8 +2490,8 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2519
2490
|
auto array = buf->Buffer();
|
|
2520
2491
|
auto offset = buf->ByteOffset();
|
|
2521
2492
|
auto size = buf->ByteLength();
|
|
2522
|
-
auto data_ptr = static_cast<uint8_t*>(array->GetBackingStore()->Data()) + offset;
|
|
2523
|
-
auto data = static_cast<uint8_t *>((void*) data_ptr);
|
|
2493
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
2494
|
+
auto data = static_cast<uint8_t *>((void *) data_ptr);
|
|
2524
2495
|
|
|
2525
2496
|
|
|
2526
2497
|
srcOffsetValue =
|
|
@@ -2564,7 +2535,7 @@ WebGL2RenderingContext::TransformFeedbackVaryings(const v8::FunctionCallbackInfo
|
|
|
2564
2535
|
if (type == NativeType::WebGLProgram) {
|
|
2565
2536
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
2566
2537
|
auto varyingsObject = args[1];
|
|
2567
|
-
auto bufferMode =
|
|
2538
|
+
auto bufferMode = args[2]->Uint32Value(
|
|
2568
2539
|
context).ToChecked();
|
|
2569
2540
|
|
|
2570
2541
|
if (program != nullptr &&
|
|
@@ -2584,10 +2555,10 @@ WebGL2RenderingContext::TransformFeedbackVaryings(const v8::FunctionCallbackInfo
|
|
|
2584
2555
|
}
|
|
2585
2556
|
|
|
2586
2557
|
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2558
|
+
const char *cStrings[store.size()];
|
|
2559
|
+
for (size_t i = 0; i < store.size(); ++i) {
|
|
2560
|
+
cStrings[i] = store[i].c_str();
|
|
2561
|
+
}
|
|
2591
2562
|
|
|
2592
2563
|
canvas_native_webgl2_transform_feedback_varyings(
|
|
2593
2564
|
program->GetProgram(),
|
|
@@ -2616,7 +2587,7 @@ void WebGL2RenderingContext::Uniform1ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2616
2587
|
if (type == NativeType::WebGLUniformLocation) {
|
|
2617
2588
|
|
|
2618
2589
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
2619
|
-
auto v0 =
|
|
2590
|
+
auto v0 = v0Value->Uint32Value(
|
|
2620
2591
|
context).ToChecked();
|
|
2621
2592
|
|
|
2622
2593
|
if (location != nullptr) {
|
|
@@ -2645,9 +2616,9 @@ void WebGL2RenderingContext::Uniform2ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2645
2616
|
if (type == NativeType::WebGLUniformLocation) {
|
|
2646
2617
|
|
|
2647
2618
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
2648
|
-
auto v0 =
|
|
2619
|
+
auto v0 = args[1]->Uint32Value(
|
|
2649
2620
|
context).ToChecked();
|
|
2650
|
-
auto v1 =
|
|
2621
|
+
auto v1 = args[2]->Uint32Value(
|
|
2651
2622
|
context).ToChecked();
|
|
2652
2623
|
|
|
2653
2624
|
if (location != nullptr) {
|
|
@@ -2677,13 +2648,13 @@ void WebGL2RenderingContext::Uniform3ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2677
2648
|
if (type == NativeType::WebGLUniformLocation) {
|
|
2678
2649
|
|
|
2679
2650
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
2680
|
-
auto v0 =
|
|
2651
|
+
auto v0 = args[1]->Uint32Value(
|
|
2681
2652
|
context).ToChecked();
|
|
2682
2653
|
|
|
2683
|
-
auto v1 =
|
|
2654
|
+
auto v1 = args[2]->Uint32Value(
|
|
2684
2655
|
context).ToChecked();
|
|
2685
2656
|
|
|
2686
|
-
auto v2 =
|
|
2657
|
+
auto v2 = args[3]->Uint32Value(
|
|
2687
2658
|
context).ToChecked();
|
|
2688
2659
|
|
|
2689
2660
|
if (location != nullptr) {
|
|
@@ -2714,15 +2685,15 @@ void WebGL2RenderingContext::Uniform4ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2714
2685
|
if (type == NativeType::WebGLUniformLocation) {
|
|
2715
2686
|
|
|
2716
2687
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
2717
|
-
auto v0 =
|
|
2688
|
+
auto v0 = args[1]->Uint32Value(
|
|
2718
2689
|
context).ToChecked();
|
|
2719
2690
|
|
|
2720
|
-
auto v1 =
|
|
2691
|
+
auto v1 = args[2]->Uint32Value(
|
|
2721
2692
|
context).ToChecked();
|
|
2722
2693
|
|
|
2723
|
-
auto v2 =
|
|
2694
|
+
auto v2 = args[3]->Uint32Value(
|
|
2724
2695
|
context).ToChecked();
|
|
2725
|
-
auto v3 =
|
|
2696
|
+
auto v3 = args[4]->Uint32Value(
|
|
2726
2697
|
context).ToChecked();
|
|
2727
2698
|
|
|
2728
2699
|
|
|
@@ -2758,13 +2729,13 @@ void WebGL2RenderingContext::Uniform1uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
2758
2729
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
2759
2730
|
auto dataValue = args[1];
|
|
2760
2731
|
if (location != nullptr &&
|
|
2761
|
-
|
|
2732
|
+
dataValue->IsUint32Array()) {
|
|
2762
2733
|
auto buf = dataValue.As<v8::Uint32Array>();
|
|
2763
2734
|
auto array = buf->Buffer();
|
|
2764
2735
|
auto offset = buf->ByteOffset();
|
|
2765
2736
|
auto size = buf->Length();
|
|
2766
|
-
auto data_ptr = static_cast<uint8_t*>(array->GetBackingStore()->Data()) + offset;
|
|
2767
|
-
auto data = static_cast<uint32_t *>((void*) data_ptr);
|
|
2737
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
2738
|
+
auto data = static_cast<uint32_t *>((void *) data_ptr);
|
|
2768
2739
|
|
|
2769
2740
|
|
|
2770
2741
|
canvas_native_webgl2_uniform1uiv(
|
|
@@ -2778,9 +2749,9 @@ void WebGL2RenderingContext::Uniform1uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
2778
2749
|
auto len = array->Length();
|
|
2779
2750
|
buf.reserve(len);
|
|
2780
2751
|
for (int i = 0; i < len; i++) {
|
|
2781
|
-
auto item =
|
|
2752
|
+
auto item = array->Get(
|
|
2782
2753
|
context,
|
|
2783
|
-
i).ToLocalChecked()->
|
|
2754
|
+
i).ToLocalChecked()->Uint32Value(
|
|
2784
2755
|
context).ToChecked();
|
|
2785
2756
|
buf.push_back(item);
|
|
2786
2757
|
}
|
|
@@ -2815,14 +2786,13 @@ void WebGL2RenderingContext::Uniform2uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
2815
2786
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
2816
2787
|
auto dataValue = args[1];
|
|
2817
2788
|
if (location != nullptr &&
|
|
2818
|
-
|
|
2789
|
+
dataValue->IsUint32Array()) {
|
|
2819
2790
|
auto buf = dataValue.As<v8::Uint32Array>();
|
|
2820
2791
|
auto array = buf->Buffer();
|
|
2821
2792
|
auto offset = buf->ByteOffset();
|
|
2822
2793
|
auto size = buf->Length();
|
|
2823
|
-
auto data_ptr = static_cast<uint8_t*>(array->GetBackingStore()->Data()) + offset;
|
|
2824
|
-
auto data = static_cast<uint32_t *>((void*) data_ptr);
|
|
2825
|
-
|
|
2794
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
2795
|
+
auto data = static_cast<uint32_t *>((void *) data_ptr);
|
|
2826
2796
|
|
|
2827
2797
|
|
|
2828
2798
|
canvas_native_webgl2_uniform2uiv(
|
|
@@ -2836,9 +2806,9 @@ void WebGL2RenderingContext::Uniform2uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
2836
2806
|
auto len = array->Length();
|
|
2837
2807
|
buf.reserve(len);
|
|
2838
2808
|
for (int i = 0; i < len; i++) {
|
|
2839
|
-
auto item =
|
|
2809
|
+
auto item = array->Get(
|
|
2840
2810
|
context,
|
|
2841
|
-
i).ToLocalChecked()->
|
|
2811
|
+
i).ToLocalChecked()->Uint32Value(
|
|
2842
2812
|
context).ToChecked();
|
|
2843
2813
|
buf.push_back(item);
|
|
2844
2814
|
}
|
|
@@ -2872,14 +2842,14 @@ void WebGL2RenderingContext::Uniform3uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
2872
2842
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
2873
2843
|
auto dataValue = args[1];
|
|
2874
2844
|
if (location != nullptr &&
|
|
2875
|
-
|
|
2845
|
+
dataValue->IsUint32Array()) {
|
|
2876
2846
|
auto buf = dataValue.As<v8::Uint32Array>();
|
|
2877
2847
|
|
|
2878
2848
|
auto array = buf->Buffer();
|
|
2879
2849
|
auto offset = buf->ByteOffset();
|
|
2880
2850
|
auto size = buf->Length();
|
|
2881
|
-
auto data_ptr = static_cast<uint8_t*>(array->GetBackingStore()->Data()) + offset;
|
|
2882
|
-
auto data = static_cast<uint32_t *>((void*) data_ptr);
|
|
2851
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
2852
|
+
auto data = static_cast<uint32_t *>((void *) data_ptr);
|
|
2883
2853
|
|
|
2884
2854
|
|
|
2885
2855
|
canvas_native_webgl2_uniform3uiv(
|
|
@@ -2893,9 +2863,9 @@ void WebGL2RenderingContext::Uniform3uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
2893
2863
|
auto len = array->Length();
|
|
2894
2864
|
buf.reserve(len);
|
|
2895
2865
|
for (int i = 0; i < len; i++) {
|
|
2896
|
-
auto item =
|
|
2866
|
+
auto item = array->Get(
|
|
2897
2867
|
context,
|
|
2898
|
-
i).ToLocalChecked()->
|
|
2868
|
+
i).ToLocalChecked()->Uint32Value(
|
|
2899
2869
|
context).ToChecked();
|
|
2900
2870
|
buf.push_back(item);
|
|
2901
2871
|
}
|
|
@@ -2929,14 +2899,14 @@ void WebGL2RenderingContext::Uniform4uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
2929
2899
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
2930
2900
|
auto dataValue = args[1];
|
|
2931
2901
|
if (location != nullptr &&
|
|
2932
|
-
|
|
2902
|
+
dataValue->IsUint32Array()) {
|
|
2933
2903
|
auto buf = dataValue.As<v8::Uint32Array>();
|
|
2934
2904
|
|
|
2935
2905
|
auto array = buf->Buffer();
|
|
2936
2906
|
auto offset = buf->ByteOffset();
|
|
2937
2907
|
auto size = buf->Length();
|
|
2938
|
-
auto data_ptr = static_cast<uint8_t*>(array->GetBackingStore()->Data()) + offset;
|
|
2939
|
-
auto data = static_cast<uint32_t *>((void*) data_ptr);
|
|
2908
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
2909
|
+
auto data = static_cast<uint32_t *>((void *) data_ptr);
|
|
2940
2910
|
|
|
2941
2911
|
|
|
2942
2912
|
canvas_native_webgl2_uniform4uiv(
|
|
@@ -2950,9 +2920,9 @@ void WebGL2RenderingContext::Uniform4uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
2950
2920
|
auto len = array->Length();
|
|
2951
2921
|
buf.reserve(len);
|
|
2952
2922
|
for (int i = 0; i < len; i++) {
|
|
2953
|
-
auto item =
|
|
2923
|
+
auto item = array->Get(
|
|
2954
2924
|
context,
|
|
2955
|
-
i).ToLocalChecked()->
|
|
2925
|
+
i).ToLocalChecked()->Uint32Value(
|
|
2956
2926
|
context).ToChecked();
|
|
2957
2927
|
buf.push_back(item);
|
|
2958
2928
|
}
|
|
@@ -2983,16 +2953,16 @@ void WebGL2RenderingContext::UniformBlockBinding(const v8::FunctionCallbackInfo<
|
|
|
2983
2953
|
if (type == NativeType::WebGLProgram) {
|
|
2984
2954
|
|
|
2985
2955
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
2986
|
-
auto uniformBlockIndex = args[1]->
|
|
2956
|
+
auto uniformBlockIndex = args[1]->Uint32Value(
|
|
2987
2957
|
context).ToChecked();
|
|
2988
|
-
auto uniformBlockBinding = args[2]->
|
|
2958
|
+
auto uniformBlockBinding = args[2]->Uint32Value(
|
|
2989
2959
|
context).ToChecked();
|
|
2990
2960
|
|
|
2991
2961
|
if (program != nullptr) {
|
|
2992
2962
|
canvas_native_webgl2_uniform_block_binding(
|
|
2993
2963
|
program->GetProgram(),
|
|
2994
|
-
|
|
2995
|
-
|
|
2964
|
+
uniformBlockIndex,
|
|
2965
|
+
uniformBlockBinding,
|
|
2996
2966
|
ptr->GetState()
|
|
2997
2967
|
);
|
|
2998
2968
|
}
|
|
@@ -3023,8 +2993,8 @@ void WebGL2RenderingContext::UniformMatrix2x3fv(const v8::FunctionCallbackInfo<v
|
|
|
3023
2993
|
auto array = buf->Buffer();
|
|
3024
2994
|
auto offset = buf->ByteOffset();
|
|
3025
2995
|
auto size = buf->Length();
|
|
3026
|
-
auto data_ptr = static_cast<uint8_t*>(array->GetBackingStore()->Data()) + offset;
|
|
3027
|
-
auto data = static_cast<float *>((void*) data_ptr);
|
|
2996
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
2997
|
+
auto data = static_cast<float *>((void *) data_ptr);
|
|
3028
2998
|
|
|
3029
2999
|
|
|
3030
3000
|
canvas_native_webgl2_uniform_matrix2x3fv(
|
|
@@ -3080,8 +3050,8 @@ void WebGL2RenderingContext::UniformMatrix2x4fv(const v8::FunctionCallbackInfo<v
|
|
|
3080
3050
|
auto array = buf->Buffer();
|
|
3081
3051
|
auto offset = buf->ByteOffset();
|
|
3082
3052
|
auto size = buf->Length();
|
|
3083
|
-
auto data_ptr = static_cast<uint8_t*>(array->GetBackingStore()->Data()) + offset;
|
|
3084
|
-
auto data = static_cast<float *>((void*) data_ptr);
|
|
3053
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3054
|
+
auto data = static_cast<float *>((void *) data_ptr);
|
|
3085
3055
|
|
|
3086
3056
|
|
|
3087
3057
|
canvas_native_webgl2_uniform_matrix2x4fv(
|
|
@@ -3103,7 +3073,6 @@ void WebGL2RenderingContext::UniformMatrix2x4fv(const v8::FunctionCallbackInfo<v
|
|
|
3103
3073
|
}
|
|
3104
3074
|
|
|
3105
3075
|
|
|
3106
|
-
|
|
3107
3076
|
canvas_native_webgl2_uniform_matrix2x4fv(
|
|
3108
3077
|
location->GetUniformLocation(),
|
|
3109
3078
|
transpose,
|
|
@@ -3139,8 +3108,8 @@ void WebGL2RenderingContext::UniformMatrix3x2fv(const v8::FunctionCallbackInfo<v
|
|
|
3139
3108
|
auto array = buf->Buffer();
|
|
3140
3109
|
auto offset = buf->ByteOffset();
|
|
3141
3110
|
auto size = buf->Length();
|
|
3142
|
-
auto data_ptr = static_cast<uint8_t*>(array->GetBackingStore()->Data()) + offset;
|
|
3143
|
-
auto data = static_cast<float *>((void*) data_ptr);
|
|
3111
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3112
|
+
auto data = static_cast<float *>((void *) data_ptr);
|
|
3144
3113
|
|
|
3145
3114
|
|
|
3146
3115
|
canvas_native_webgl2_uniform_matrix3x2fv(
|
|
@@ -3162,7 +3131,6 @@ void WebGL2RenderingContext::UniformMatrix3x2fv(const v8::FunctionCallbackInfo<v
|
|
|
3162
3131
|
}
|
|
3163
3132
|
|
|
3164
3133
|
|
|
3165
|
-
|
|
3166
3134
|
canvas_native_webgl2_uniform_matrix3x2fv(
|
|
3167
3135
|
location->GetUniformLocation(),
|
|
3168
3136
|
transpose,
|
|
@@ -3196,8 +3164,8 @@ void WebGL2RenderingContext::UniformMatrix3x4fv(const v8::FunctionCallbackInfo<v
|
|
|
3196
3164
|
auto array = buf->Buffer();
|
|
3197
3165
|
auto offset = buf->ByteOffset();
|
|
3198
3166
|
auto size = buf->Length();
|
|
3199
|
-
auto data_ptr = static_cast<uint8_t*>(array->GetBackingStore()->Data()) + offset;
|
|
3200
|
-
auto data = static_cast<float *>((void*) data_ptr);
|
|
3167
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3168
|
+
auto data = static_cast<float *>((void *) data_ptr);
|
|
3201
3169
|
|
|
3202
3170
|
|
|
3203
3171
|
canvas_native_webgl2_uniform_matrix3x4fv(
|
|
@@ -3219,7 +3187,6 @@ void WebGL2RenderingContext::UniformMatrix3x4fv(const v8::FunctionCallbackInfo<v
|
|
|
3219
3187
|
}
|
|
3220
3188
|
|
|
3221
3189
|
|
|
3222
|
-
|
|
3223
3190
|
canvas_native_webgl2_uniform_matrix3x4fv(
|
|
3224
3191
|
location->GetUniformLocation(),
|
|
3225
3192
|
transpose,
|
|
@@ -3254,8 +3221,8 @@ void WebGL2RenderingContext::UniformMatrix4x2fv(const v8::FunctionCallbackInfo<v
|
|
|
3254
3221
|
auto array = buf->Buffer();
|
|
3255
3222
|
auto offset = buf->ByteOffset();
|
|
3256
3223
|
auto size = buf->Length();
|
|
3257
|
-
auto data_ptr = static_cast<uint8_t*>(array->GetBackingStore()->Data()) + offset;
|
|
3258
|
-
auto data = static_cast<float *>((void*) data_ptr);
|
|
3224
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3225
|
+
auto data = static_cast<float *>((void *) data_ptr);
|
|
3259
3226
|
|
|
3260
3227
|
canvas_native_webgl2_uniform_matrix4x2fv(
|
|
3261
3228
|
location->GetUniformLocation(),
|
|
@@ -3276,7 +3243,6 @@ void WebGL2RenderingContext::UniformMatrix4x2fv(const v8::FunctionCallbackInfo<v
|
|
|
3276
3243
|
}
|
|
3277
3244
|
|
|
3278
3245
|
|
|
3279
|
-
|
|
3280
3246
|
canvas_native_webgl2_uniform_matrix4x2fv(
|
|
3281
3247
|
location->GetUniformLocation(),
|
|
3282
3248
|
transpose,
|
|
@@ -3310,8 +3276,8 @@ void WebGL2RenderingContext::UniformMatrix4x3fv(const v8::FunctionCallbackInfo<v
|
|
|
3310
3276
|
auto array = buf->Buffer();
|
|
3311
3277
|
auto offset = buf->ByteOffset();
|
|
3312
3278
|
auto size = buf->Length();
|
|
3313
|
-
auto data_ptr = static_cast<uint8_t*>(array->GetBackingStore()->Data()) + offset;
|
|
3314
|
-
auto data = static_cast<float *>((void*) data_ptr);
|
|
3279
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3280
|
+
auto data = static_cast<float *>((void *) data_ptr);
|
|
3315
3281
|
|
|
3316
3282
|
canvas_native_webgl2_uniform_matrix4x3fv(
|
|
3317
3283
|
location->GetUniformLocation(),
|
|
@@ -3353,13 +3319,13 @@ void WebGL2RenderingContext::VertexAttribDivisor(const v8::FunctionCallbackInfo<
|
|
|
3353
3319
|
auto context = isolate->GetCurrentContext();
|
|
3354
3320
|
|
|
3355
3321
|
|
|
3356
|
-
auto index = args[0]->
|
|
3322
|
+
auto index = args[0]->Uint32Value(
|
|
3357
3323
|
context).ToChecked();
|
|
3358
|
-
auto divisor = args[1]->
|
|
3324
|
+
auto divisor = args[1]->Uint32Value(
|
|
3359
3325
|
context).ToChecked();
|
|
3360
3326
|
canvas_native_webgl2_vertex_attrib_divisor(
|
|
3361
|
-
|
|
3362
|
-
|
|
3327
|
+
index,
|
|
3328
|
+
divisor,
|
|
3363
3329
|
ptr->GetState()
|
|
3364
3330
|
);
|
|
3365
3331
|
|
|
@@ -3375,22 +3341,22 @@ void WebGL2RenderingContext::VertexAttribI4i(const v8::FunctionCallbackInfo<v8::
|
|
|
3375
3341
|
auto context = isolate->GetCurrentContext();
|
|
3376
3342
|
|
|
3377
3343
|
|
|
3378
|
-
auto index = args[0]->
|
|
3344
|
+
auto index = args[0]->Int32Value(
|
|
3379
3345
|
context).ToChecked();
|
|
3380
|
-
auto v0 = args[1]->
|
|
3346
|
+
auto v0 = args[1]->Int32Value(
|
|
3381
3347
|
context).ToChecked();
|
|
3382
|
-
auto v1 = args[2]->
|
|
3348
|
+
auto v1 = args[2]->Int32Value(
|
|
3383
3349
|
context).ToChecked();
|
|
3384
|
-
auto v2 = args[3]->
|
|
3350
|
+
auto v2 = args[3]->Int32Value(
|
|
3385
3351
|
context).ToChecked();
|
|
3386
|
-
auto v3 = args[4]->
|
|
3352
|
+
auto v3 = args[4]->Int32Value(
|
|
3387
3353
|
context).ToChecked();
|
|
3388
3354
|
canvas_native_webgl2_vertex_attrib_i4i(
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3355
|
+
index,
|
|
3356
|
+
v0,
|
|
3357
|
+
v1,
|
|
3358
|
+
v2,
|
|
3359
|
+
v3,
|
|
3394
3360
|
ptr->GetState()
|
|
3395
3361
|
);
|
|
3396
3362
|
|
|
@@ -3406,7 +3372,7 @@ void WebGL2RenderingContext::VertexAttribI4iv(const v8::FunctionCallbackInfo<v8:
|
|
|
3406
3372
|
auto context = isolate->GetCurrentContext();
|
|
3407
3373
|
|
|
3408
3374
|
|
|
3409
|
-
auto index =
|
|
3375
|
+
auto index = args[0]->Uint32Value(
|
|
3410
3376
|
context).ToChecked();
|
|
3411
3377
|
auto value = args[1];
|
|
3412
3378
|
if (value->IsInt32Array()) {
|
|
@@ -3415,8 +3381,8 @@ void WebGL2RenderingContext::VertexAttribI4iv(const v8::FunctionCallbackInfo<v8:
|
|
|
3415
3381
|
auto array = buf->Buffer();
|
|
3416
3382
|
auto offset = buf->ByteOffset();
|
|
3417
3383
|
auto size = buf->Length();
|
|
3418
|
-
auto data_ptr = static_cast<uint8_t*>(array->GetBackingStore()->Data()) + offset;
|
|
3419
|
-
auto data = static_cast<int32_t *>((void*) data_ptr);
|
|
3384
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3385
|
+
auto data = static_cast<int32_t *>((void *) data_ptr);
|
|
3420
3386
|
|
|
3421
3387
|
|
|
3422
3388
|
canvas_native_webgl2_vertex_attrib_i4iv(
|
|
@@ -3430,9 +3396,9 @@ void WebGL2RenderingContext::VertexAttribI4iv(const v8::FunctionCallbackInfo<v8:
|
|
|
3430
3396
|
std::vector<int32_t> buf;
|
|
3431
3397
|
buf.reserve(len);
|
|
3432
3398
|
for (int i = 0; i < len; i++) {
|
|
3433
|
-
auto item =
|
|
3399
|
+
auto item = array->Get(
|
|
3434
3400
|
context,
|
|
3435
|
-
i).ToLocalChecked()->
|
|
3401
|
+
i).ToLocalChecked()->Int32Value(
|
|
3436
3402
|
context).ToChecked();
|
|
3437
3403
|
buf.push_back(item);
|
|
3438
3404
|
}
|
|
@@ -3457,15 +3423,15 @@ void WebGL2RenderingContext::VertexAttribI4ui(const v8::FunctionCallbackInfo<v8:
|
|
|
3457
3423
|
auto context = isolate->GetCurrentContext();
|
|
3458
3424
|
|
|
3459
3425
|
|
|
3460
|
-
auto index =
|
|
3426
|
+
auto index = args[0]->Uint32Value(
|
|
3461
3427
|
context).ToChecked();
|
|
3462
|
-
auto v0 =
|
|
3428
|
+
auto v0 = args[1]->Uint32Value(
|
|
3463
3429
|
context).ToChecked();
|
|
3464
|
-
auto v1 =
|
|
3430
|
+
auto v1 = args[2]->Uint32Value(
|
|
3465
3431
|
context).ToChecked();
|
|
3466
|
-
auto v2 =
|
|
3432
|
+
auto v2 = args[3]->Uint32Value(
|
|
3467
3433
|
context).ToChecked();
|
|
3468
|
-
auto v3 =
|
|
3434
|
+
auto v3 = args[4]->Uint32Value(
|
|
3469
3435
|
context).ToChecked();
|
|
3470
3436
|
|
|
3471
3437
|
canvas_native_webgl2_vertex_attrib_i4ui(
|
|
@@ -3488,7 +3454,7 @@ void WebGL2RenderingContext::VertexAttribI4uiv(const v8::FunctionCallbackInfo<v8
|
|
|
3488
3454
|
auto isolate = args.GetIsolate();
|
|
3489
3455
|
auto context = isolate->GetCurrentContext();
|
|
3490
3456
|
|
|
3491
|
-
auto index =
|
|
3457
|
+
auto index = args[0]->Uint32Value(
|
|
3492
3458
|
context).ToChecked();
|
|
3493
3459
|
auto value = args[1];
|
|
3494
3460
|
if (value->IsUint32Array()) {
|
|
@@ -3496,8 +3462,8 @@ void WebGL2RenderingContext::VertexAttribI4uiv(const v8::FunctionCallbackInfo<v8
|
|
|
3496
3462
|
auto array = buf->Buffer();
|
|
3497
3463
|
auto offset = buf->ByteOffset();
|
|
3498
3464
|
auto size = buf->Length();
|
|
3499
|
-
auto data_ptr = static_cast<uint8_t*>(array->GetBackingStore()->Data()) + offset;
|
|
3500
|
-
auto data = static_cast<uint32_t *>((void*) data_ptr);
|
|
3465
|
+
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3466
|
+
auto data = static_cast<uint32_t *>((void *) data_ptr);
|
|
3501
3467
|
|
|
3502
3468
|
|
|
3503
3469
|
canvas_native_webgl2_vertex_attrib_i4uiv(
|
|
@@ -3511,9 +3477,9 @@ void WebGL2RenderingContext::VertexAttribI4uiv(const v8::FunctionCallbackInfo<v8
|
|
|
3511
3477
|
std::vector<uint32_t> buf;
|
|
3512
3478
|
buf.reserve(len);
|
|
3513
3479
|
for (int i = 0; i < len; i++) {
|
|
3514
|
-
auto item =
|
|
3480
|
+
auto item = array->Get(
|
|
3515
3481
|
context,
|
|
3516
|
-
i).ToLocalChecked()->
|
|
3482
|
+
i).ToLocalChecked()->Uint32Value(
|
|
3517
3483
|
context).ToChecked();
|
|
3518
3484
|
buf.push_back(item);
|
|
3519
3485
|
}
|
|
@@ -3532,392 +3498,431 @@ void WebGL2RenderingContext::SetConstants(v8::Isolate *isolate,
|
|
|
3532
3498
|
const v8::Local<v8::ObjectTemplate> &tmpl) {
|
|
3533
3499
|
/* Getting GL parameter information */
|
|
3534
3500
|
|
|
3535
|
-
tmpl->Set(isolate, "READ_BUFFER", v8::
|
|
3536
|
-
|
|
3537
|
-
tmpl->Set(isolate, "UNPACK_ROW_LENGTH", v8::Uint32::New(isolate, 0x0CF2));
|
|
3501
|
+
tmpl->Set(isolate, "READ_BUFFER", v8::Integer::NewFromUnsigned(isolate, 0x0C02));
|
|
3538
3502
|
|
|
3539
|
-
tmpl->Set(isolate, "
|
|
3503
|
+
tmpl->Set(isolate, "UNPACK_ROW_LENGTH", v8::Integer::NewFromUnsigned(isolate, 0x0CF2));
|
|
3540
3504
|
|
|
3541
|
-
tmpl->Set(isolate, "
|
|
3505
|
+
tmpl->Set(isolate, "UNPACK_SKIP_ROWS", v8::Integer::NewFromUnsigned(isolate, 0x0CF3));
|
|
3542
3506
|
|
|
3543
|
-
tmpl->Set(isolate, "
|
|
3507
|
+
tmpl->Set(isolate, "UNPACK_SKIP_PIXELS", v8::Integer::NewFromUnsigned(isolate, 0x0CF4));
|
|
3544
3508
|
|
|
3545
|
-
tmpl->Set(isolate, "
|
|
3509
|
+
tmpl->Set(isolate, "PACK_ROW_LENGTH", v8::Integer::NewFromUnsigned(isolate, 0x0D02));
|
|
3546
3510
|
|
|
3547
|
-
tmpl->Set(isolate, "
|
|
3511
|
+
tmpl->Set(isolate, "PACK_SKIP_ROWS", v8::Integer::NewFromUnsigned(isolate, 0x0D03));
|
|
3548
3512
|
|
|
3549
|
-
tmpl->Set(isolate, "
|
|
3513
|
+
tmpl->Set(isolate, "PACK_SKIP_PIXELS", v8::Integer::NewFromUnsigned(isolate, 0x0D04));
|
|
3550
3514
|
|
|
3551
|
-
tmpl->Set(isolate, "
|
|
3515
|
+
tmpl->Set(isolate, "TEXTURE_BINDING_3D", v8::Integer::NewFromUnsigned(isolate, 0x806A));
|
|
3552
3516
|
|
|
3553
|
-
tmpl->Set(isolate, "
|
|
3517
|
+
tmpl->Set(isolate, "UNPACK_SKIP_IMAGES", v8::Integer::NewFromUnsigned(isolate, 0x806D));
|
|
3554
3518
|
|
|
3555
|
-
tmpl->Set(isolate, "
|
|
3519
|
+
tmpl->Set(isolate, "UNPACK_IMAGE_HEIGHT", v8::Integer::NewFromUnsigned(isolate, 0x806E));
|
|
3556
3520
|
|
|
3557
|
-
tmpl->Set(isolate, "
|
|
3521
|
+
tmpl->Set(isolate, "MAX_3D_TEXTURE_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x8073));
|
|
3558
3522
|
|
|
3559
|
-
tmpl->Set(isolate, "
|
|
3523
|
+
tmpl->Set(isolate, "MAX_ELEMENTS_VERTICES", v8::Integer::NewFromUnsigned(isolate, 0x80E8));
|
|
3560
3524
|
|
|
3561
|
-
tmpl->Set(isolate, "
|
|
3525
|
+
tmpl->Set(isolate, "MAX_ELEMENTS_INDICES", v8::Integer::NewFromUnsigned(isolate, 0x80E9));
|
|
3562
3526
|
|
|
3563
|
-
tmpl->Set(isolate, "
|
|
3527
|
+
tmpl->Set(isolate, "MAX_TEXTURE_LOD_BIAS", v8::Integer::NewFromUnsigned(isolate, 0x84FD));
|
|
3564
3528
|
|
|
3565
|
-
tmpl->Set(isolate, "
|
|
3529
|
+
tmpl->Set(isolate, "MAX_FRAGMENT_UNIFORM_COMPONENTS",
|
|
3530
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8B49));
|
|
3566
3531
|
|
|
3567
|
-
tmpl->Set(isolate, "
|
|
3532
|
+
tmpl->Set(isolate, "MAX_VERTEX_UNIFORM_COMPONENTS",
|
|
3533
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8B4A));
|
|
3568
3534
|
|
|
3569
|
-
tmpl->Set(isolate, "
|
|
3535
|
+
tmpl->Set(isolate, "MAX_ARRAY_TEXTURE_LAYERS", v8::Integer::NewFromUnsigned(isolate, 0x88FF));
|
|
3570
3536
|
|
|
3571
|
-
tmpl->Set(isolate, "
|
|
3537
|
+
tmpl->Set(isolate, "MIN_PROGRAM_TEXEL_OFFSET", v8::Integer::NewFromUnsigned(isolate, 0x8904));
|
|
3572
3538
|
|
|
3573
|
-
tmpl->Set(isolate, "
|
|
3539
|
+
tmpl->Set(isolate, "MAX_PROGRAM_TEXEL_OFFSET", v8::Integer::NewFromUnsigned(isolate, 0x8905));
|
|
3574
3540
|
|
|
3575
|
-
tmpl->Set(isolate, "
|
|
3541
|
+
tmpl->Set(isolate, "MAX_VARYING_COMPONENTS", v8::Integer::NewFromUnsigned(isolate, 0x8B4B));
|
|
3576
3542
|
|
|
3577
|
-
tmpl->Set(isolate, "
|
|
3543
|
+
tmpl->Set(isolate, "FRAGMENT_SHADER_DERIVATIVE_HINT",
|
|
3544
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8B8B));
|
|
3578
3545
|
|
|
3579
|
-
tmpl->Set(isolate, "
|
|
3580
|
-
tmpl->Set(isolate, "MAX_VERTEX_OUTPUT_COMPONENTS", v8::Uint32::New(isolate, 0x9122));
|
|
3581
|
-
tmpl->Set(isolate, "MAX_FRAGMENT_INPUT_COMPONENTS", v8::Uint32::New(isolate, 0x9125));
|
|
3582
|
-
tmpl->Set(isolate, "MAX_SERVER_WAIT_TIMEOUT", v8::Uint32::New(isolate, 0x9111));
|
|
3583
|
-
tmpl->Set(isolate, "MAX_ELEMENT_INDEX", v8::Uint32::New(isolate, 0x8D6B));
|
|
3546
|
+
tmpl->Set(isolate, "RASTERIZER_DISCARD", v8::Integer::NewFromUnsigned(isolate, 0x8C89));
|
|
3584
3547
|
|
|
3585
|
-
tmpl->Set(isolate, "
|
|
3586
|
-
tmpl->Set(isolate, "
|
|
3587
|
-
|
|
3588
|
-
tmpl->Set(isolate, "
|
|
3589
|
-
|
|
3548
|
+
tmpl->Set(isolate, "VERTEX_ARRAY_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x85B5));
|
|
3549
|
+
tmpl->Set(isolate, "MAX_VERTEX_OUTPUT_COMPONENTS",
|
|
3550
|
+
v8::Integer::NewFromUnsigned(isolate, 0x9122));
|
|
3551
|
+
tmpl->Set(isolate, "MAX_FRAGMENT_INPUT_COMPONENTS",
|
|
3552
|
+
v8::Integer::NewFromUnsigned(isolate, 0x9125));
|
|
3553
|
+
tmpl->Set(isolate, "MAX_SERVER_WAIT_TIMEOUT", v8::Integer::NewFromUnsigned(isolate, 0x9111));
|
|
3554
|
+
tmpl->Set(isolate, "MAX_ELEMENT_INDEX", v8::Integer::NewFromUnsigned(isolate, 0x8D6B));
|
|
3590
3555
|
|
|
3591
|
-
tmpl->Set(isolate, "
|
|
3592
|
-
tmpl->Set(isolate, "
|
|
3593
|
-
tmpl->Set(isolate, "
|
|
3594
|
-
tmpl->Set(isolate, "
|
|
3595
|
-
tmpl->Set(isolate, "
|
|
3556
|
+
tmpl->Set(isolate, "RED", v8::Integer::NewFromUnsigned(isolate, 0x1903));
|
|
3557
|
+
tmpl->Set(isolate, "RGB8", v8::Integer::NewFromUnsigned(isolate, 0x8051));
|
|
3558
|
+
tmpl->Set(isolate, "RGBA8", v8::Integer::NewFromUnsigned(isolate, 0x8058));
|
|
3559
|
+
tmpl->Set(isolate, "RGB10_A2", v8::Integer::NewFromUnsigned(isolate, 0x8059));
|
|
3560
|
+
tmpl->Set(isolate, "TEXTURE_3D", v8::Integer::NewFromUnsigned(isolate, 0x806F));
|
|
3596
3561
|
|
|
3562
|
+
tmpl->Set(isolate, "TEXTURE_WRAP_R", v8::Integer::NewFromUnsigned(isolate, 0x8072));
|
|
3563
|
+
tmpl->Set(isolate, "TEXTURE_MIN_LOD", v8::Integer::NewFromUnsigned(isolate, 0x813A));
|
|
3564
|
+
tmpl->Set(isolate, "TEXTURE_MAX_LOD", v8::Integer::NewFromUnsigned(isolate, 0x813B));
|
|
3565
|
+
tmpl->Set(isolate, "TEXTURE_BASE_LEVEL", v8::Integer::NewFromUnsigned(isolate, 0x813C));
|
|
3566
|
+
tmpl->Set(isolate, "TEXTURE_MAX_LEVEL", v8::Integer::NewFromUnsigned(isolate, 0x813D));
|
|
3597
3567
|
|
|
3598
|
-
tmpl->Set(isolate, "TEXTURE_COMPARE_MODE", v8::Uint32::New(isolate, 0x884C));
|
|
3599
|
-
tmpl->Set(isolate, "TEXTURE_COMPARE_FUNC", v8::Uint32::New(isolate, 0x884D));
|
|
3600
|
-
tmpl->Set(isolate, "SRGB", v8::Uint32::New(isolate, 0x8C40));
|
|
3601
|
-
tmpl->Set(isolate, "SRGB8", v8::Uint32::New(isolate, 0x8C41));
|
|
3602
|
-
tmpl->Set(isolate, "SRGB8_ALPHA8", v8::Uint32::New(isolate, 0x8C43));
|
|
3603
3568
|
|
|
3604
|
-
tmpl->Set(isolate, "
|
|
3605
|
-
tmpl->Set(isolate, "
|
|
3606
|
-
tmpl->Set(isolate, "
|
|
3607
|
-
tmpl->Set(isolate, "
|
|
3608
|
-
tmpl->Set(isolate, "
|
|
3569
|
+
tmpl->Set(isolate, "TEXTURE_COMPARE_MODE", v8::Integer::NewFromUnsigned(isolate, 0x884C));
|
|
3570
|
+
tmpl->Set(isolate, "TEXTURE_COMPARE_FUNC", v8::Integer::NewFromUnsigned(isolate, 0x884D));
|
|
3571
|
+
tmpl->Set(isolate, "SRGB", v8::Integer::NewFromUnsigned(isolate, 0x8C40));
|
|
3572
|
+
tmpl->Set(isolate, "SRGB8", v8::Integer::NewFromUnsigned(isolate, 0x8C41));
|
|
3573
|
+
tmpl->Set(isolate, "SRGB8_ALPHA8", v8::Integer::NewFromUnsigned(isolate, 0x8C43));
|
|
3609
3574
|
|
|
3610
|
-
tmpl->Set(isolate, "
|
|
3611
|
-
tmpl->Set(isolate, "
|
|
3612
|
-
tmpl->Set(isolate, "
|
|
3613
|
-
tmpl->Set(isolate, "
|
|
3614
|
-
tmpl->Set(isolate, "
|
|
3575
|
+
tmpl->Set(isolate, "COMPARE_REF_TO_TEXTURE", v8::Integer::NewFromUnsigned(isolate, 0x884E));
|
|
3576
|
+
tmpl->Set(isolate, "RGBA32F", v8::Integer::NewFromUnsigned(isolate, 0x8814));
|
|
3577
|
+
tmpl->Set(isolate, "RGB32F", v8::Integer::NewFromUnsigned(isolate, 0x8815));
|
|
3578
|
+
tmpl->Set(isolate, "RGBA16F", v8::Integer::NewFromUnsigned(isolate, 0x881A));
|
|
3579
|
+
tmpl->Set(isolate, "RGB16F", v8::Integer::NewFromUnsigned(isolate, 0x881B));
|
|
3615
3580
|
|
|
3581
|
+
tmpl->Set(isolate, "TEXTURE_2D_ARRAY", v8::Integer::NewFromUnsigned(isolate, 0x8C1A));
|
|
3582
|
+
tmpl->Set(isolate, "TEXTURE_BINDING_2D_ARRAY", v8::Integer::NewFromUnsigned(isolate, 0x8C1D));
|
|
3583
|
+
tmpl->Set(isolate, "R11F_G11F_B10F", v8::Integer::NewFromUnsigned(isolate, 0x8C3A));
|
|
3584
|
+
tmpl->Set(isolate, "RGB9_E5", v8::Integer::NewFromUnsigned(isolate, 0x8C3D));
|
|
3585
|
+
tmpl->Set(isolate, "RGBA32UI", v8::Integer::NewFromUnsigned(isolate, 0x8D70));
|
|
3616
3586
|
|
|
3617
|
-
tmpl->Set(isolate, "RGB32UI", v8::Uint32::New(isolate, 0x8D71));
|
|
3618
|
-
tmpl->Set(isolate, "RGBA16UI", v8::Uint32::New(isolate, 0x8D76));
|
|
3619
|
-
tmpl->Set(isolate, "RGB16UI", v8::Uint32::New(isolate, 0x8D77));
|
|
3620
|
-
tmpl->Set(isolate, "RGBA8UI", v8::Uint32::New(isolate, 0x8D7C));
|
|
3621
|
-
tmpl->Set(isolate, "RGB8UI", v8::Uint32::New(isolate, 0x8D7D));
|
|
3622
3587
|
|
|
3588
|
+
tmpl->Set(isolate, "RGB32UI", v8::Integer::NewFromUnsigned(isolate, 0x8D71));
|
|
3589
|
+
tmpl->Set(isolate, "RGBA16UI", v8::Integer::NewFromUnsigned(isolate, 0x8D76));
|
|
3590
|
+
tmpl->Set(isolate, "RGB16UI", v8::Integer::NewFromUnsigned(isolate, 0x8D77));
|
|
3591
|
+
tmpl->Set(isolate, "RGBA8UI", v8::Integer::NewFromUnsigned(isolate, 0x8D7C));
|
|
3592
|
+
tmpl->Set(isolate, "RGB8UI", v8::Integer::NewFromUnsigned(isolate, 0x8D7D));
|
|
3623
3593
|
|
|
3624
|
-
tmpl->Set(isolate, "RGBA32I", v8::Uint32::New(isolate, 0x8D82));
|
|
3625
|
-
tmpl->Set(isolate, "RGB32I", v8::Uint32::New(isolate, 0x8D83));
|
|
3626
|
-
tmpl->Set(isolate, "RGBA16I", v8::Uint32::New(isolate, 0x8D88));
|
|
3627
|
-
tmpl->Set(isolate, "RGB16I", v8::Uint32::New(isolate, 0x8D89));
|
|
3628
|
-
tmpl->Set(isolate, "RGBA8I", v8::Uint32::New(isolate, 0x8D8E));
|
|
3629
3594
|
|
|
3595
|
+
tmpl->Set(isolate, "RGBA32I", v8::Integer::NewFromUnsigned(isolate, 0x8D82));
|
|
3596
|
+
tmpl->Set(isolate, "RGB32I", v8::Integer::NewFromUnsigned(isolate, 0x8D83));
|
|
3597
|
+
tmpl->Set(isolate, "RGBA16I", v8::Integer::NewFromUnsigned(isolate, 0x8D88));
|
|
3598
|
+
tmpl->Set(isolate, "RGB16I", v8::Integer::NewFromUnsigned(isolate, 0x8D89));
|
|
3599
|
+
tmpl->Set(isolate, "RGBA8I", v8::Integer::NewFromUnsigned(isolate, 0x8D8E));
|
|
3630
3600
|
|
|
3631
|
-
tmpl->Set(isolate, "RGB8I", v8::Uint32::New(isolate, 0x8D8F));
|
|
3632
|
-
tmpl->Set(isolate, "RED_INTEGER", v8::Uint32::New(isolate, 0x8D94));
|
|
3633
|
-
tmpl->Set(isolate, "RGB_INTEGER", v8::Uint32::New(isolate, 0x8D98));
|
|
3634
|
-
tmpl->Set(isolate, "RGBA_INTEGER", v8::Uint32::New(isolate, 0x8D99));
|
|
3635
|
-
tmpl->Set(isolate, "R8", v8::Uint32::New(isolate, 0x8229));
|
|
3636
3601
|
|
|
3602
|
+
tmpl->Set(isolate, "RGB8I", v8::Integer::NewFromUnsigned(isolate, 0x8D8F));
|
|
3603
|
+
tmpl->Set(isolate, "RED_INTEGER", v8::Integer::NewFromUnsigned(isolate, 0x8D94));
|
|
3604
|
+
tmpl->Set(isolate, "RGB_INTEGER", v8::Integer::NewFromUnsigned(isolate, 0x8D98));
|
|
3605
|
+
tmpl->Set(isolate, "RGBA_INTEGER", v8::Integer::NewFromUnsigned(isolate, 0x8D99));
|
|
3606
|
+
tmpl->Set(isolate, "R8", v8::Integer::NewFromUnsigned(isolate, 0x8229));
|
|
3637
3607
|
|
|
3638
|
-
tmpl->Set(isolate, "RG8", v8::Uint32::New(isolate, 0x822B));
|
|
3639
|
-
tmpl->Set(isolate, "R16F", v8::Uint32::New(isolate, 0x822D));
|
|
3640
|
-
tmpl->Set(isolate, "R32F", v8::Uint32::New(isolate, 0x822E));
|
|
3641
|
-
tmpl->Set(isolate, "RG16F", v8::Uint32::New(isolate, 0x822F));
|
|
3642
|
-
tmpl->Set(isolate, "RG32F", v8::Uint32::New(isolate, 0x8230));
|
|
3643
3608
|
|
|
3609
|
+
tmpl->Set(isolate, "RG8", v8::Integer::NewFromUnsigned(isolate, 0x822B));
|
|
3610
|
+
tmpl->Set(isolate, "R16F", v8::Integer::NewFromUnsigned(isolate, 0x822D));
|
|
3611
|
+
tmpl->Set(isolate, "R32F", v8::Integer::NewFromUnsigned(isolate, 0x822E));
|
|
3612
|
+
tmpl->Set(isolate, "RG16F", v8::Integer::NewFromUnsigned(isolate, 0x822F));
|
|
3613
|
+
tmpl->Set(isolate, "RG32F", v8::Integer::NewFromUnsigned(isolate, 0x8230));
|
|
3644
3614
|
|
|
3645
|
-
tmpl->Set(isolate, "R8I", v8::Uint32::New(isolate, 0x8231));
|
|
3646
|
-
tmpl->Set(isolate, "R8UI", v8::Uint32::New(isolate, 0x8232));
|
|
3647
|
-
tmpl->Set(isolate, "R16I", v8::Uint32::New(isolate, 0x8233));
|
|
3648
|
-
tmpl->Set(isolate, "R16UI", v8::Uint32::New(isolate, 0x8234));
|
|
3649
|
-
tmpl->Set(isolate, "R32I", v8::Uint32::New(isolate, 0x8235));
|
|
3650
3615
|
|
|
3616
|
+
tmpl->Set(isolate, "R8I", v8::Integer::NewFromUnsigned(isolate, 0x8231));
|
|
3617
|
+
tmpl->Set(isolate, "R8UI", v8::Integer::NewFromUnsigned(isolate, 0x8232));
|
|
3618
|
+
tmpl->Set(isolate, "R16I", v8::Integer::NewFromUnsigned(isolate, 0x8233));
|
|
3619
|
+
tmpl->Set(isolate, "R16UI", v8::Integer::NewFromUnsigned(isolate, 0x8234));
|
|
3620
|
+
tmpl->Set(isolate, "R32I", v8::Integer::NewFromUnsigned(isolate, 0x8235));
|
|
3651
3621
|
|
|
3652
|
-
tmpl->Set(isolate, "R32UI", v8::Uint32::New(isolate, 0x8236));
|
|
3653
|
-
tmpl->Set(isolate, "RG8I", v8::Uint32::New(isolate, 0x8237));
|
|
3654
|
-
tmpl->Set(isolate, "RG8UI", v8::Uint32::New(isolate, 0x8238));
|
|
3655
|
-
tmpl->Set(isolate, "RG16I", v8::Uint32::New(isolate, 0x8239));
|
|
3656
|
-
tmpl->Set(isolate, "RG16UI", v8::Uint32::New(isolate, 0x823A));
|
|
3657
3622
|
|
|
3658
|
-
tmpl->Set(isolate, "
|
|
3659
|
-
tmpl->Set(isolate, "
|
|
3660
|
-
tmpl->Set(isolate, "
|
|
3661
|
-
tmpl->Set(isolate, "
|
|
3662
|
-
tmpl->Set(isolate, "
|
|
3623
|
+
tmpl->Set(isolate, "R32UI", v8::Integer::NewFromUnsigned(isolate, 0x8236));
|
|
3624
|
+
tmpl->Set(isolate, "RG8I", v8::Integer::NewFromUnsigned(isolate, 0x8237));
|
|
3625
|
+
tmpl->Set(isolate, "RG8UI", v8::Integer::NewFromUnsigned(isolate, 0x8238));
|
|
3626
|
+
tmpl->Set(isolate, "RG16I", v8::Integer::NewFromUnsigned(isolate, 0x8239));
|
|
3627
|
+
tmpl->Set(isolate, "RG16UI", v8::Integer::NewFromUnsigned(isolate, 0x823A));
|
|
3663
3628
|
|
|
3629
|
+
tmpl->Set(isolate, "RG32I", v8::Integer::NewFromUnsigned(isolate, 0x823B));
|
|
3630
|
+
tmpl->Set(isolate, "RG32UI", v8::Integer::NewFromUnsigned(isolate, 0x823C));
|
|
3631
|
+
tmpl->Set(isolate, "R8_SNORM", v8::Integer::NewFromUnsigned(isolate, 0x8F94));
|
|
3632
|
+
tmpl->Set(isolate, "RG8_SNORM", v8::Integer::NewFromUnsigned(isolate, 0x8F95));
|
|
3633
|
+
tmpl->Set(isolate, "RGB8_SNORM", v8::Integer::NewFromUnsigned(isolate, 0x8F96));
|
|
3664
3634
|
|
|
3665
|
-
tmpl->Set(isolate, "RGBA8_SNORM", v8::Uint32::New(isolate, 0x8F97));
|
|
3666
|
-
tmpl->Set(isolate, "RGB10_A2UI", v8::Uint32::New(isolate, 0x906F));
|
|
3667
|
-
tmpl->Set(isolate, "TEXTURE_IMMUTABLE_FORMAT", v8::Uint32::New(isolate, 0x912F));
|
|
3668
|
-
tmpl->Set(isolate, "TEXTURE_IMMUTABLE_LEVELS", v8::Uint32::New(isolate, 0x82DF));
|
|
3669
|
-
tmpl->Set(isolate, "UNSIGNED_INT_2_10_10_10_REV", v8::Uint32::New(isolate, 0x8368));
|
|
3670
3635
|
|
|
3671
|
-
|
|
3672
|
-
tmpl->Set(isolate, "
|
|
3673
|
-
tmpl->Set(isolate, "
|
|
3674
|
-
tmpl->Set(isolate, "
|
|
3675
|
-
tmpl->Set(isolate, "
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
tmpl->Set(isolate, "
|
|
3680
|
-
|
|
3681
|
-
tmpl->Set(isolate, "
|
|
3682
|
-
tmpl->Set(isolate, "
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
tmpl->Set(isolate, "
|
|
3689
|
-
tmpl->Set(isolate, "
|
|
3690
|
-
|
|
3691
|
-
tmpl->Set(isolate, "
|
|
3692
|
-
tmpl->Set(isolate, "
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
tmpl->Set(isolate, "
|
|
3696
|
-
tmpl->Set(isolate, "
|
|
3697
|
-
tmpl->Set(isolate, "
|
|
3698
|
-
|
|
3699
|
-
tmpl->Set(isolate, "
|
|
3700
|
-
|
|
3701
|
-
tmpl->Set(isolate, "
|
|
3636
|
+
tmpl->Set(isolate, "RGBA8_SNORM", v8::Integer::NewFromUnsigned(isolate, 0x8F97));
|
|
3637
|
+
tmpl->Set(isolate, "RGB10_A2UI", v8::Integer::NewFromUnsigned(isolate, 0x906F));
|
|
3638
|
+
tmpl->Set(isolate, "TEXTURE_IMMUTABLE_FORMAT", v8::Integer::NewFromUnsigned(isolate, 0x912F));
|
|
3639
|
+
tmpl->Set(isolate, "TEXTURE_IMMUTABLE_LEVELS", v8::Integer::NewFromUnsigned(isolate, 0x82DF));
|
|
3640
|
+
tmpl->Set(isolate, "UNSIGNED_INT_2_10_10_10_REV",
|
|
3641
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8368));
|
|
3642
|
+
|
|
3643
|
+
|
|
3644
|
+
tmpl->Set(isolate, "UNSIGNED_INT_10F_11F_11F_REV",
|
|
3645
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8C3B));
|
|
3646
|
+
tmpl->Set(isolate, "UNSIGNED_INT_5_9_9_9_REV", v8::Integer::NewFromUnsigned(isolate, 0x8C3E));
|
|
3647
|
+
tmpl->Set(isolate, "FLOAT_32_UNSIGNED_INT_24_8_REV",
|
|
3648
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8DAD));
|
|
3649
|
+
tmpl->Set(isolate, "UNSIGNED_INT_24_8", v8::Integer::NewFromUnsigned(isolate, 0x84FA));
|
|
3650
|
+
tmpl->Set(isolate, "HALF_FLOAT", v8::Integer::NewFromUnsigned(isolate, 0x140B));
|
|
3651
|
+
|
|
3652
|
+
|
|
3653
|
+
tmpl->Set(isolate, "RG", v8::Integer::NewFromUnsigned(isolate, 0x8227));
|
|
3654
|
+
tmpl->Set(isolate, "RG_INTEGER", v8::Integer::NewFromUnsigned(isolate, 0x8228));
|
|
3655
|
+
tmpl->Set(isolate, "INT_2_10_10_10_REV", v8::Integer::NewFromUnsigned(isolate, 0x8D9F));
|
|
3656
|
+
tmpl->Set(isolate, "QUERY_RESULT_AVAILABLE", v8::Integer::NewFromUnsigned(isolate, 0x8865));
|
|
3657
|
+
tmpl->Set(isolate, "QUERY_RESULT", v8::Integer::NewFromUnsigned(isolate, 0x8866));
|
|
3658
|
+
|
|
3659
|
+
|
|
3660
|
+
tmpl->Set(isolate, "CURRENT_QUERY", v8::Integer::NewFromUnsigned(isolate, 0x8867));
|
|
3661
|
+
tmpl->Set(isolate, "ANY_SAMPLES_PASSED", v8::Integer::NewFromUnsigned(isolate, 0x8C2F));
|
|
3662
|
+
tmpl->Set(isolate, "ANY_SAMPLES_PASSED_CONSERVATIVE",
|
|
3663
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8D6A));
|
|
3664
|
+
tmpl->Set(isolate, "MAX_DRAW_BUFFERS", v8::Integer::NewFromUnsigned(isolate, 0x8824));
|
|
3665
|
+
|
|
3666
|
+
tmpl->Set(isolate, "DRAW_BUFFER0", v8::Integer::NewFromUnsigned(isolate, 0x8825));
|
|
3667
|
+
tmpl->Set(isolate, "DRAW_BUFFER1", v8::Integer::NewFromUnsigned(isolate, 0x8826));
|
|
3668
|
+
tmpl->Set(isolate, "DRAW_BUFFER2", v8::Integer::NewFromUnsigned(isolate, 0x8827));
|
|
3669
|
+
tmpl->Set(isolate, "DRAW_BUFFER3", v8::Integer::NewFromUnsigned(isolate, 0x8828));
|
|
3670
|
+
tmpl->Set(isolate, "DRAW_BUFFER4", v8::Integer::NewFromUnsigned(isolate, 0x8829));
|
|
3671
|
+
tmpl->Set(isolate, "DRAW_BUFFER5", v8::Integer::NewFromUnsigned(isolate, 0x882A));
|
|
3672
|
+
tmpl->Set(isolate, "DRAW_BUFFER6", v8::Integer::NewFromUnsigned(isolate, 0x882B));
|
|
3673
|
+
tmpl->Set(isolate, "DRAW_BUFFER7", v8::Integer::NewFromUnsigned(isolate, 0x882C));
|
|
3674
|
+
tmpl->Set(isolate, "DRAW_BUFFER8", v8::Integer::NewFromUnsigned(isolate, 0x882D));
|
|
3675
|
+
tmpl->Set(isolate, "DRAW_BUFFER9", v8::Integer::NewFromUnsigned(isolate, 0x882E));
|
|
3676
|
+
tmpl->Set(isolate, "DRAW_BUFFER10", v8::Integer::NewFromUnsigned(isolate, 0x882F));
|
|
3702
3677
|
|
|
3703
3678
|
/* Getting GL parameter information */
|
|
3704
3679
|
|
|
3705
3680
|
/* Textures */
|
|
3706
3681
|
|
|
3707
|
-
tmpl->Set(isolate, "DRAW_BUFFER11", v8::
|
|
3708
|
-
tmpl->Set(isolate, "DRAW_BUFFER12", v8::
|
|
3709
|
-
tmpl->Set(isolate, "DRAW_BUFFER13", v8::
|
|
3710
|
-
tmpl->Set(isolate, "DRAW_BUFFER14", v8::
|
|
3711
|
-
tmpl->Set(isolate, "DRAW_BUFFER15", v8::
|
|
3712
|
-
|
|
3713
|
-
tmpl->Set(isolate, "MAX_COLOR_ATTACHMENTS", v8::
|
|
3714
|
-
tmpl->Set(isolate, "COLOR_ATTACHMENT1", v8::
|
|
3715
|
-
tmpl->Set(isolate, "COLOR_ATTACHMENT2", v8::
|
|
3716
|
-
tmpl->Set(isolate, "COLOR_ATTACHMENT3", v8::
|
|
3717
|
-
tmpl->Set(isolate, "COLOR_ATTACHMENT4", v8::
|
|
3718
|
-
tmpl->Set(isolate, "COLOR_ATTACHMENT5", v8::
|
|
3719
|
-
tmpl->Set(isolate, "COLOR_ATTACHMENT6", v8::
|
|
3720
|
-
tmpl->Set(isolate, "COLOR_ATTACHMENT7", v8::
|
|
3721
|
-
tmpl->Set(isolate, "COLOR_ATTACHMENT8", v8::
|
|
3722
|
-
tmpl->Set(isolate, "COLOR_ATTACHMENT9", v8::
|
|
3723
|
-
tmpl->Set(isolate, "COLOR_ATTACHMENT10", v8::
|
|
3724
|
-
tmpl->Set(isolate, "COLOR_ATTACHMENT11", v8::
|
|
3725
|
-
tmpl->Set(isolate, "COLOR_ATTACHMENT12", v8::
|
|
3726
|
-
tmpl->Set(isolate, "COLOR_ATTACHMENT13", v8::
|
|
3727
|
-
tmpl->Set(isolate, "COLOR_ATTACHMENT14", v8::
|
|
3728
|
-
tmpl->Set(isolate, "COLOR_ATTACHMENT15", v8::
|
|
3729
|
-
|
|
3730
|
-
tmpl->Set(isolate, "SAMPLER_3D", v8::
|
|
3731
|
-
tmpl->Set(isolate, "SAMPLER_2D_SHADOW", v8::
|
|
3732
|
-
tmpl->Set(isolate, "SAMPLER_2D_ARRAY", v8::
|
|
3733
|
-
tmpl->Set(isolate, "SAMPLER_2D_ARRAY_SHADOW", v8::
|
|
3734
|
-
tmpl->Set(isolate, "SAMPLER_CUBE_SHADOW", v8::
|
|
3735
|
-
|
|
3736
|
-
tmpl->Set(isolate, "INT_SAMPLER_2D", v8::
|
|
3737
|
-
tmpl->Set(isolate, "INT_SAMPLER_3D", v8::
|
|
3738
|
-
tmpl->Set(isolate, "INT_SAMPLER_CUBE", v8::
|
|
3739
|
-
tmpl->Set(isolate, "INT_SAMPLER_2D_ARRAY", v8::
|
|
3740
|
-
tmpl->Set(isolate, "UNSIGNED_INT_SAMPLER_2D", v8::
|
|
3741
|
-
|
|
3742
|
-
tmpl->Set(isolate, "UNSIGNED_INT_SAMPLER_3D", v8::
|
|
3743
|
-
tmpl->Set(isolate, "UNSIGNED_INT_SAMPLER_CUBE", v8::
|
|
3744
|
-
tmpl->Set(isolate, "UNSIGNED_INT_SAMPLER_2D_ARRAY",
|
|
3745
|
-
|
|
3746
|
-
tmpl->Set(isolate, "
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
tmpl->Set(isolate, "
|
|
3750
|
-
tmpl->Set(isolate, "
|
|
3751
|
-
tmpl->Set(isolate, "
|
|
3752
|
-
tmpl->Set(isolate, "
|
|
3753
|
-
|
|
3754
|
-
tmpl->Set(isolate, "
|
|
3755
|
-
|
|
3756
|
-
tmpl->Set(isolate, "
|
|
3757
|
-
tmpl->Set(isolate, "
|
|
3758
|
-
tmpl->Set(isolate, "
|
|
3759
|
-
|
|
3760
|
-
tmpl->Set(isolate, "
|
|
3761
|
-
|
|
3762
|
-
tmpl->Set(isolate, "
|
|
3763
|
-
tmpl->Set(isolate, "
|
|
3764
|
-
tmpl->Set(isolate, "
|
|
3765
|
-
|
|
3766
|
-
tmpl->Set(isolate, "
|
|
3767
|
-
|
|
3768
|
-
tmpl->Set(isolate, "
|
|
3769
|
-
tmpl->Set(isolate, "
|
|
3682
|
+
tmpl->Set(isolate, "DRAW_BUFFER11", v8::Integer::NewFromUnsigned(isolate, 0x8830));
|
|
3683
|
+
tmpl->Set(isolate, "DRAW_BUFFER12", v8::Integer::NewFromUnsigned(isolate, 0x8831));
|
|
3684
|
+
tmpl->Set(isolate, "DRAW_BUFFER13", v8::Integer::NewFromUnsigned(isolate, 0x8832));
|
|
3685
|
+
tmpl->Set(isolate, "DRAW_BUFFER14", v8::Integer::NewFromUnsigned(isolate, 0x8833));
|
|
3686
|
+
tmpl->Set(isolate, "DRAW_BUFFER15", v8::Integer::NewFromUnsigned(isolate, 0x8834));
|
|
3687
|
+
|
|
3688
|
+
tmpl->Set(isolate, "MAX_COLOR_ATTACHMENTS", v8::Integer::NewFromUnsigned(isolate, 0x8CDF));
|
|
3689
|
+
tmpl->Set(isolate, "COLOR_ATTACHMENT1", v8::Integer::NewFromUnsigned(isolate, 0x8CE1));
|
|
3690
|
+
tmpl->Set(isolate, "COLOR_ATTACHMENT2", v8::Integer::NewFromUnsigned(isolate, 0x8CE2));
|
|
3691
|
+
tmpl->Set(isolate, "COLOR_ATTACHMENT3", v8::Integer::NewFromUnsigned(isolate, 0x8CE3));
|
|
3692
|
+
tmpl->Set(isolate, "COLOR_ATTACHMENT4", v8::Integer::NewFromUnsigned(isolate, 0x8CE4));
|
|
3693
|
+
tmpl->Set(isolate, "COLOR_ATTACHMENT5", v8::Integer::NewFromUnsigned(isolate, 0x8CE5));
|
|
3694
|
+
tmpl->Set(isolate, "COLOR_ATTACHMENT6", v8::Integer::NewFromUnsigned(isolate, 0x8CE6));
|
|
3695
|
+
tmpl->Set(isolate, "COLOR_ATTACHMENT7", v8::Integer::NewFromUnsigned(isolate, 0x8CE7));
|
|
3696
|
+
tmpl->Set(isolate, "COLOR_ATTACHMENT8", v8::Integer::NewFromUnsigned(isolate, 0x8CE8));
|
|
3697
|
+
tmpl->Set(isolate, "COLOR_ATTACHMENT9", v8::Integer::NewFromUnsigned(isolate, 0x8CE9));
|
|
3698
|
+
tmpl->Set(isolate, "COLOR_ATTACHMENT10", v8::Integer::NewFromUnsigned(isolate, 0x8CEA));
|
|
3699
|
+
tmpl->Set(isolate, "COLOR_ATTACHMENT11", v8::Integer::NewFromUnsigned(isolate, 0x8CEB));
|
|
3700
|
+
tmpl->Set(isolate, "COLOR_ATTACHMENT12", v8::Integer::NewFromUnsigned(isolate, 0x8CEC));
|
|
3701
|
+
tmpl->Set(isolate, "COLOR_ATTACHMENT13", v8::Integer::NewFromUnsigned(isolate, 0x8CED));
|
|
3702
|
+
tmpl->Set(isolate, "COLOR_ATTACHMENT14", v8::Integer::NewFromUnsigned(isolate, 0x8CEE));
|
|
3703
|
+
tmpl->Set(isolate, "COLOR_ATTACHMENT15", v8::Integer::NewFromUnsigned(isolate, 0x8CEF));
|
|
3704
|
+
|
|
3705
|
+
tmpl->Set(isolate, "SAMPLER_3D", v8::Integer::NewFromUnsigned(isolate, 0x8B5F));
|
|
3706
|
+
tmpl->Set(isolate, "SAMPLER_2D_SHADOW", v8::Integer::NewFromUnsigned(isolate, 0x8B62));
|
|
3707
|
+
tmpl->Set(isolate, "SAMPLER_2D_ARRAY", v8::Integer::NewFromUnsigned(isolate, 0x8DC1));
|
|
3708
|
+
tmpl->Set(isolate, "SAMPLER_2D_ARRAY_SHADOW", v8::Integer::NewFromUnsigned(isolate, 0x8DC4));
|
|
3709
|
+
tmpl->Set(isolate, "SAMPLER_CUBE_SHADOW", v8::Integer::NewFromUnsigned(isolate, 0x8DC5));
|
|
3710
|
+
|
|
3711
|
+
tmpl->Set(isolate, "INT_SAMPLER_2D", v8::Integer::NewFromUnsigned(isolate, 0x8DCA));
|
|
3712
|
+
tmpl->Set(isolate, "INT_SAMPLER_3D", v8::Integer::NewFromUnsigned(isolate, 0x8DCB));
|
|
3713
|
+
tmpl->Set(isolate, "INT_SAMPLER_CUBE", v8::Integer::NewFromUnsigned(isolate, 0x8DCC));
|
|
3714
|
+
tmpl->Set(isolate, "INT_SAMPLER_2D_ARRAY", v8::Integer::NewFromUnsigned(isolate, 0x8DCF));
|
|
3715
|
+
tmpl->Set(isolate, "UNSIGNED_INT_SAMPLER_2D", v8::Integer::NewFromUnsigned(isolate, 0x8DD2));
|
|
3716
|
+
|
|
3717
|
+
tmpl->Set(isolate, "UNSIGNED_INT_SAMPLER_3D", v8::Integer::NewFromUnsigned(isolate, 0x8DD3));
|
|
3718
|
+
tmpl->Set(isolate, "UNSIGNED_INT_SAMPLER_CUBE", v8::Integer::NewFromUnsigned(isolate, 0x8DD4));
|
|
3719
|
+
tmpl->Set(isolate, "UNSIGNED_INT_SAMPLER_2D_ARRAY",
|
|
3720
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8DD7));
|
|
3721
|
+
tmpl->Set(isolate, "MAX_SAMPLES", v8::Integer::NewFromUnsigned(isolate, 0x8D57));
|
|
3722
|
+
tmpl->Set(isolate, "SAMPLER_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8919));
|
|
3723
|
+
|
|
3724
|
+
tmpl->Set(isolate, "PIXEL_PACK_BUFFER", v8::Integer::NewFromUnsigned(isolate, 0x88EB));
|
|
3725
|
+
tmpl->Set(isolate, "PIXEL_UNPACK_BUFFER", v8::Integer::NewFromUnsigned(isolate, 0x88EC));
|
|
3726
|
+
tmpl->Set(isolate, "PIXEL_PACK_BUFFER_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x88ED));
|
|
3727
|
+
tmpl->Set(isolate, "PIXEL_UNPACK_BUFFER_BINDING",
|
|
3728
|
+
v8::Integer::NewFromUnsigned(isolate, 0x88EF));
|
|
3729
|
+
tmpl->Set(isolate, "COPY_READ_BUFFER", v8::Integer::NewFromUnsigned(isolate, 0x8F36));
|
|
3730
|
+
|
|
3731
|
+
tmpl->Set(isolate, "COPY_WRITE_BUFFER", v8::Integer::NewFromUnsigned(isolate, 0x8F37));
|
|
3732
|
+
tmpl->Set(isolate, "COPY_READ_BUFFER_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8F36));
|
|
3733
|
+
tmpl->Set(isolate, "COPY_WRITE_BUFFER_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8F37));
|
|
3734
|
+
tmpl->Set(isolate, "FLOAT_MAT2x3", v8::Integer::NewFromUnsigned(isolate, 0x8B65));
|
|
3735
|
+
tmpl->Set(isolate, "FLOAT_MAT2x4", v8::Integer::NewFromUnsigned(isolate, 0x8B66));
|
|
3736
|
+
|
|
3737
|
+
tmpl->Set(isolate, "FLOAT_MAT3x2", v8::Integer::NewFromUnsigned(isolate, 0x8B67));
|
|
3738
|
+
tmpl->Set(isolate, "FLOAT_MAT3x4", v8::Integer::NewFromUnsigned(isolate, 0x8B68));
|
|
3739
|
+
tmpl->Set(isolate, "FLOAT_MAT4x2", v8::Integer::NewFromUnsigned(isolate, 0x8B69));
|
|
3740
|
+
tmpl->Set(isolate, "FLOAT_MAT4x3", v8::Integer::NewFromUnsigned(isolate, 0x8B6A));
|
|
3741
|
+
tmpl->Set(isolate, "UNSIGNED_INT_VEC2", v8::Integer::NewFromUnsigned(isolate, 0x8DC6));
|
|
3742
|
+
|
|
3743
|
+
tmpl->Set(isolate, "UNSIGNED_INT_VEC3", v8::Integer::NewFromUnsigned(isolate, 0x8DC7));
|
|
3744
|
+
tmpl->Set(isolate, "UNSIGNED_INT_VEC4", v8::Integer::NewFromUnsigned(isolate, 0x8DC8));
|
|
3745
|
+
tmpl->Set(isolate, "UNSIGNED_NORMALIZED", v8::Integer::NewFromUnsigned(isolate, 0x8C17));
|
|
3746
|
+
tmpl->Set(isolate, "SIGNED_NORMALIZED", v8::Integer::NewFromUnsigned(isolate, 0x8F9C));
|
|
3770
3747
|
|
|
3771
3748
|
/* Vertex attributes */
|
|
3772
3749
|
|
|
3773
|
-
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_INTEGER",
|
|
3774
|
-
|
|
3775
|
-
tmpl->Set(isolate, "
|
|
3750
|
+
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_INTEGER",
|
|
3751
|
+
v8::Integer::NewFromUnsigned(isolate, 0x88FD));
|
|
3752
|
+
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_DIVISOR",
|
|
3753
|
+
v8::Integer::NewFromUnsigned(isolate, 0x88FE));
|
|
3754
|
+
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_BUFFER_MODE",
|
|
3755
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8C7F));
|
|
3776
3756
|
tmpl->Set(isolate, "MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS",
|
|
3777
|
-
v8::
|
|
3778
|
-
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_VARYINGS",
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
tmpl->Set(isolate, "
|
|
3782
|
-
|
|
3757
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8C80));
|
|
3758
|
+
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_VARYINGS",
|
|
3759
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8C83));
|
|
3760
|
+
|
|
3761
|
+
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_BUFFER_START",
|
|
3762
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8C84));
|
|
3763
|
+
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_BUFFER_SIZE",
|
|
3764
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8C85));
|
|
3765
|
+
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN",
|
|
3766
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8C88));
|
|
3783
3767
|
tmpl->Set(isolate, "MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS",
|
|
3784
|
-
v8::
|
|
3768
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8C8A));
|
|
3785
3769
|
|
|
3786
3770
|
/* Textures */
|
|
3787
3771
|
|
|
3788
3772
|
/* Pixel types */
|
|
3789
3773
|
|
|
3790
|
-
tmpl->Set(isolate, "MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS",
|
|
3791
|
-
|
|
3792
|
-
tmpl->Set(isolate, "
|
|
3793
|
-
tmpl->Set(isolate, "
|
|
3794
|
-
tmpl->Set(isolate, "
|
|
3774
|
+
tmpl->Set(isolate, "MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS",
|
|
3775
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8C8B));
|
|
3776
|
+
tmpl->Set(isolate, "INTERLEAVED_ATTRIBS", v8::Integer::NewFromUnsigned(isolate, 0x8C8C));
|
|
3777
|
+
tmpl->Set(isolate, "SEPARATE_ATTRIBS", v8::Integer::NewFromUnsigned(isolate, 0x8C8D));
|
|
3778
|
+
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_BUFFER", v8::Integer::NewFromUnsigned(isolate, 0x8C8E));
|
|
3779
|
+
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_BUFFER_BINDING",
|
|
3780
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8C8F));
|
|
3795
3781
|
|
|
3796
|
-
tmpl->Set(isolate, "TRANSFORM_FEEDBACK", v8::
|
|
3797
|
-
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_PAUSED", v8::
|
|
3798
|
-
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_ACTIVE", v8::
|
|
3799
|
-
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_BINDING", v8::
|
|
3782
|
+
tmpl->Set(isolate, "TRANSFORM_FEEDBACK", v8::Integer::NewFromUnsigned(isolate, 0x8E22));
|
|
3783
|
+
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_PAUSED", v8::Integer::NewFromUnsigned(isolate, 0x8E23));
|
|
3784
|
+
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_ACTIVE", v8::Integer::NewFromUnsigned(isolate, 0x8E24));
|
|
3785
|
+
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8E25));
|
|
3800
3786
|
|
|
3801
3787
|
/* Pixel types */
|
|
3802
3788
|
|
|
3803
3789
|
/* Queries */
|
|
3804
3790
|
|
|
3805
|
-
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING",
|
|
3806
|
-
|
|
3807
|
-
tmpl->Set(isolate, "
|
|
3808
|
-
|
|
3809
|
-
tmpl->Set(isolate, "
|
|
3791
|
+
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING",
|
|
3792
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8210));
|
|
3793
|
+
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE",
|
|
3794
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8211));
|
|
3795
|
+
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_RED_SIZE",
|
|
3796
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8212));
|
|
3797
|
+
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_GREEN_SIZE",
|
|
3798
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8213));
|
|
3799
|
+
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_BLUE_SIZE",
|
|
3800
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8214));
|
|
3810
3801
|
|
|
3811
3802
|
/* Queries */
|
|
3812
3803
|
|
|
3813
3804
|
/* Draw buffers */
|
|
3814
3805
|
|
|
3815
|
-
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE",
|
|
3816
|
-
|
|
3817
|
-
tmpl->Set(isolate, "
|
|
3818
|
-
|
|
3819
|
-
tmpl->Set(isolate, "
|
|
3820
|
-
|
|
3821
|
-
tmpl->Set(isolate, "
|
|
3822
|
-
tmpl->Set(isolate, "
|
|
3823
|
-
|
|
3824
|
-
tmpl->Set(isolate, "
|
|
3825
|
-
tmpl->Set(isolate, "
|
|
3826
|
-
|
|
3827
|
-
tmpl->Set(isolate, "
|
|
3828
|
-
tmpl->Set(isolate, "
|
|
3829
|
-
|
|
3830
|
-
tmpl->Set(isolate, "
|
|
3831
|
-
tmpl->Set(isolate, "
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
tmpl->Set(isolate, "
|
|
3835
|
-
|
|
3836
|
-
tmpl->Set(isolate, "
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
tmpl->Set(isolate, "
|
|
3840
|
-
tmpl->Set(isolate, "
|
|
3841
|
-
tmpl->Set(isolate, "
|
|
3842
|
-
tmpl->Set(isolate, "
|
|
3806
|
+
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE",
|
|
3807
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8215));
|
|
3808
|
+
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE",
|
|
3809
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8216));
|
|
3810
|
+
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE",
|
|
3811
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8217));
|
|
3812
|
+
tmpl->Set(isolate, "FRAMEBUFFER_DEFAULT", v8::Integer::NewFromUnsigned(isolate, 0x8218));
|
|
3813
|
+
tmpl->Set(isolate, "DEPTH_STENCIL_ATTACHMENT", v8::Integer::NewFromUnsigned(isolate, 0x821A));
|
|
3814
|
+
|
|
3815
|
+
tmpl->Set(isolate, "DEPTH_STENCIL", v8::Integer::NewFromUnsigned(isolate, 0x84F9));
|
|
3816
|
+
tmpl->Set(isolate, "DEPTH24_STENCIL8", v8::Integer::NewFromUnsigned(isolate, 0x88F0));
|
|
3817
|
+
tmpl->Set(isolate, "DRAW_FRAMEBUFFER_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8CA6));
|
|
3818
|
+
tmpl->Set(isolate, "READ_FRAMEBUFFER", v8::Integer::NewFromUnsigned(isolate, 0x8CA8));
|
|
3819
|
+
tmpl->Set(isolate, "DRAW_FRAMEBUFFER", v8::Integer::NewFromUnsigned(isolate, 0x8CA9));
|
|
3820
|
+
|
|
3821
|
+
tmpl->Set(isolate, "READ_FRAMEBUFFER_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8CAA));
|
|
3822
|
+
tmpl->Set(isolate, "RENDERBUFFER_SAMPLES", v8::Integer::NewFromUnsigned(isolate, 0x8CAB));
|
|
3823
|
+
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER",
|
|
3824
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8CD4));
|
|
3825
|
+
tmpl->Set(isolate, "FRAMEBUFFER_INCOMPLETE_MULTISAMPLE",
|
|
3826
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8D56));
|
|
3827
|
+
tmpl->Set(isolate, "UNIFORM_BUFFER", v8::Integer::NewFromUnsigned(isolate, 0x8A11));
|
|
3828
|
+
|
|
3829
|
+
tmpl->Set(isolate, "UNIFORM_BUFFER_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8A28));
|
|
3830
|
+
tmpl->Set(isolate, "UNIFORM_BUFFER_START", v8::Integer::NewFromUnsigned(isolate, 0x8A29));
|
|
3831
|
+
tmpl->Set(isolate, "UNIFORM_BUFFER_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x8A2A));
|
|
3832
|
+
tmpl->Set(isolate, "MAX_VERTEX_UNIFORM_BLOCKS", v8::Integer::NewFromUnsigned(isolate, 0x8A2B));
|
|
3833
|
+
tmpl->Set(isolate, "MAX_FRAGMENT_UNIFORM_BLOCKS",
|
|
3834
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8A2D));
|
|
3835
|
+
|
|
3836
|
+
tmpl->Set(isolate, "MAX_COMBINED_UNIFORM_BLOCKS",
|
|
3837
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8A2E));
|
|
3838
|
+
tmpl->Set(isolate, "MAX_UNIFORM_BUFFER_BINDINGS",
|
|
3839
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8A2F));
|
|
3840
|
+
tmpl->Set(isolate, "MAX_UNIFORM_BLOCK_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x8A30));
|
|
3841
|
+
tmpl->Set(isolate, "MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS",
|
|
3842
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8A31));
|
|
3843
3843
|
tmpl->Set(isolate, "MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS",
|
|
3844
|
-
v8::
|
|
3844
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8A33));
|
|
3845
3845
|
|
|
3846
|
-
tmpl->Set(isolate, "UNIFORM_BUFFER_OFFSET_ALIGNMENT",
|
|
3847
|
-
|
|
3848
|
-
tmpl->Set(isolate, "
|
|
3849
|
-
tmpl->Set(isolate, "
|
|
3850
|
-
tmpl->Set(isolate, "
|
|
3846
|
+
tmpl->Set(isolate, "UNIFORM_BUFFER_OFFSET_ALIGNMENT",
|
|
3847
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8A34));
|
|
3848
|
+
tmpl->Set(isolate, "ACTIVE_UNIFORM_BLOCKS", v8::Integer::NewFromUnsigned(isolate, 0x8A36));
|
|
3849
|
+
tmpl->Set(isolate, "UNIFORM_TYPE", v8::Integer::NewFromUnsigned(isolate, 0x8A37));
|
|
3850
|
+
tmpl->Set(isolate, "UNIFORM_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x8A38));
|
|
3851
|
+
tmpl->Set(isolate, "UNIFORM_BLOCK_INDEX", v8::Integer::NewFromUnsigned(isolate, 0x8A3A));
|
|
3851
3852
|
|
|
3852
|
-
tmpl->Set(isolate, "UNIFORM_OFFSET", v8::
|
|
3853
|
-
tmpl->Set(isolate, "UNIFORM_ARRAY_STRIDE", v8::
|
|
3854
|
-
tmpl->Set(isolate, "UNIFORM_MATRIX_STRIDE", v8::
|
|
3853
|
+
tmpl->Set(isolate, "UNIFORM_OFFSET", v8::Integer::NewFromUnsigned(isolate, 0x8A3B));
|
|
3854
|
+
tmpl->Set(isolate, "UNIFORM_ARRAY_STRIDE", v8::Integer::NewFromUnsigned(isolate, 0x8A3C));
|
|
3855
|
+
tmpl->Set(isolate, "UNIFORM_MATRIX_STRIDE", v8::Integer::NewFromUnsigned(isolate, 0x8A3D));
|
|
3855
3856
|
|
|
3856
3857
|
/* Draw buffers */
|
|
3857
3858
|
|
|
3858
3859
|
/* Samplers */
|
|
3859
3860
|
|
|
3860
|
-
tmpl->Set(isolate, "UNIFORM_IS_ROW_MAJOR", v8::
|
|
3861
|
-
tmpl->Set(isolate, "UNIFORM_BLOCK_BINDING", v8::
|
|
3862
|
-
tmpl->Set(isolate, "UNIFORM_BLOCK_DATA_SIZE", v8::
|
|
3863
|
-
tmpl->Set(isolate, "UNIFORM_BLOCK_ACTIVE_UNIFORMS",
|
|
3864
|
-
|
|
3861
|
+
tmpl->Set(isolate, "UNIFORM_IS_ROW_MAJOR", v8::Integer::NewFromUnsigned(isolate, 0x8A3E));
|
|
3862
|
+
tmpl->Set(isolate, "UNIFORM_BLOCK_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8A3F));
|
|
3863
|
+
tmpl->Set(isolate, "UNIFORM_BLOCK_DATA_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x8A40));
|
|
3864
|
+
tmpl->Set(isolate, "UNIFORM_BLOCK_ACTIVE_UNIFORMS",
|
|
3865
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8A42));
|
|
3866
|
+
tmpl->Set(isolate, "UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES",
|
|
3867
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8A43));
|
|
3865
3868
|
|
|
3866
3869
|
tmpl->Set(isolate, "UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER",
|
|
3867
|
-
v8::
|
|
3870
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8A44));
|
|
3868
3871
|
tmpl->Set(isolate, "UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER",
|
|
3869
|
-
v8::
|
|
3870
|
-
tmpl->Set(isolate, "OBJECT_TYPE", v8::
|
|
3871
|
-
tmpl->Set(isolate, "SYNC_CONDITION", v8::
|
|
3872
|
-
tmpl->Set(isolate, "SYNC_STATUS", v8::
|
|
3872
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8A46));
|
|
3873
|
+
tmpl->Set(isolate, "OBJECT_TYPE", v8::Integer::NewFromUnsigned(isolate, 0x9112));
|
|
3874
|
+
tmpl->Set(isolate, "SYNC_CONDITION", v8::Integer::NewFromUnsigned(isolate, 0x9113));
|
|
3875
|
+
tmpl->Set(isolate, "SYNC_STATUS", v8::Integer::NewFromUnsigned(isolate, 0x9114));
|
|
3873
3876
|
|
|
3874
|
-
tmpl->Set(isolate, "SYNC_FLAGS", v8::
|
|
3875
|
-
tmpl->Set(isolate, "SYNC_FENCE", v8::
|
|
3876
|
-
tmpl->Set(isolate, "SYNC_GPU_COMMANDS_COMPLETE", v8::
|
|
3877
|
-
tmpl->Set(isolate, "UNSIGNALED", v8::
|
|
3878
|
-
tmpl->Set(isolate, "SIGNALED", v8::
|
|
3877
|
+
tmpl->Set(isolate, "SYNC_FLAGS", v8::Integer::NewFromUnsigned(isolate, 0x9115));
|
|
3878
|
+
tmpl->Set(isolate, "SYNC_FENCE", v8::Integer::NewFromUnsigned(isolate, 0x9116));
|
|
3879
|
+
tmpl->Set(isolate, "SYNC_GPU_COMMANDS_COMPLETE", v8::Integer::NewFromUnsigned(isolate, 0x9117));
|
|
3880
|
+
tmpl->Set(isolate, "UNSIGNALED", v8::Integer::NewFromUnsigned(isolate, 0x9118));
|
|
3881
|
+
tmpl->Set(isolate, "SIGNALED", v8::Integer::NewFromUnsigned(isolate, 0x9119));
|
|
3879
3882
|
|
|
3880
3883
|
/* Samplers */
|
|
3881
3884
|
|
|
3882
3885
|
/* Buffers */
|
|
3883
3886
|
|
|
3884
|
-
tmpl->Set(isolate, "ALREADY_SIGNALED", v8::
|
|
3885
|
-
tmpl->Set(isolate, "TIMEOUT_EXPIRED", v8::
|
|
3886
|
-
tmpl->Set(isolate, "CONDITION_SATISFIED", v8::
|
|
3887
|
-
tmpl->Set(isolate, "WAIT_FAILED", v8::
|
|
3888
|
-
tmpl->Set(isolate, "SYNC_FLUSH_COMMANDS_BIT",
|
|
3887
|
+
tmpl->Set(isolate, "ALREADY_SIGNALED", v8::Integer::NewFromUnsigned(isolate, 0x911A));
|
|
3888
|
+
tmpl->Set(isolate, "TIMEOUT_EXPIRED", v8::Integer::NewFromUnsigned(isolate, 0x911B));
|
|
3889
|
+
tmpl->Set(isolate, "CONDITION_SATISFIED", v8::Integer::NewFromUnsigned(isolate, 0x911C));
|
|
3890
|
+
tmpl->Set(isolate, "WAIT_FAILED", v8::Integer::NewFromUnsigned(isolate, 0x911D));
|
|
3891
|
+
tmpl->Set(isolate, "SYNC_FLUSH_COMMANDS_BIT",
|
|
3892
|
+
v8::Integer::NewFromUnsigned(isolate, 0x00000001));
|
|
3889
3893
|
|
|
3890
|
-
tmpl->Set(isolate, "COLOR", v8::
|
|
3891
|
-
tmpl->Set(isolate, "DEPTH", v8::
|
|
3892
|
-
tmpl->Set(isolate, "STENCIL", v8::
|
|
3894
|
+
tmpl->Set(isolate, "COLOR", v8::Integer::NewFromUnsigned(isolate, 0x1800));
|
|
3895
|
+
tmpl->Set(isolate, "DEPTH", v8::Integer::NewFromUnsigned(isolate, 0x1801));
|
|
3896
|
+
tmpl->Set(isolate, "STENCIL", v8::Integer::NewFromUnsigned(isolate, 0x1802));
|
|
3893
3897
|
|
|
3894
3898
|
/* Buffers */
|
|
3895
3899
|
|
|
3896
3900
|
/* Data types */
|
|
3897
3901
|
|
|
3898
|
-
tmpl->Set(isolate, "MIN", v8::
|
|
3899
|
-
tmpl->Set(isolate, "MAX", v8::
|
|
3900
|
-
tmpl->Set(isolate, "DEPTH_COMPONENT24", v8::
|
|
3901
|
-
tmpl->Set(isolate, "STREAM_READ", v8::
|
|
3902
|
-
tmpl->Set(isolate, "STREAM_COPY", v8::
|
|
3902
|
+
tmpl->Set(isolate, "MIN", v8::Integer::NewFromUnsigned(isolate, 0x8007));
|
|
3903
|
+
tmpl->Set(isolate, "MAX", v8::Integer::NewFromUnsigned(isolate, 0x8008));
|
|
3904
|
+
tmpl->Set(isolate, "DEPTH_COMPONENT24", v8::Integer::NewFromUnsigned(isolate, 0x81A6));
|
|
3905
|
+
tmpl->Set(isolate, "STREAM_READ", v8::Integer::NewFromUnsigned(isolate, 0x88E1));
|
|
3906
|
+
tmpl->Set(isolate, "STREAM_COPY", v8::Integer::NewFromUnsigned(isolate, 0x88E2));
|
|
3903
3907
|
|
|
3904
|
-
tmpl->Set(isolate, "STATIC_READ", v8::
|
|
3905
|
-
tmpl->Set(isolate, "STATIC_COPY", v8::
|
|
3906
|
-
tmpl->Set(isolate, "DYNAMIC_READ", v8::
|
|
3907
|
-
tmpl->Set(isolate, "DYNAMIC_COPY", v8::
|
|
3908
|
-
tmpl->Set(isolate, "DEPTH_COMPONENT32F", v8::
|
|
3909
|
-
tmpl->Set(isolate, "DEPTH32F_STENCIL8", v8::
|
|
3908
|
+
tmpl->Set(isolate, "STATIC_READ", v8::Integer::NewFromUnsigned(isolate, 0x88E5));
|
|
3909
|
+
tmpl->Set(isolate, "STATIC_COPY", v8::Integer::NewFromUnsigned(isolate, 0x88E6));
|
|
3910
|
+
tmpl->Set(isolate, "DYNAMIC_READ", v8::Integer::NewFromUnsigned(isolate, 0x88E9));
|
|
3911
|
+
tmpl->Set(isolate, "DYNAMIC_COPY", v8::Integer::NewFromUnsigned(isolate, 0x88EA));
|
|
3912
|
+
tmpl->Set(isolate, "DEPTH_COMPONENT32F", v8::Integer::NewFromUnsigned(isolate, 0x8CAC));
|
|
3913
|
+
tmpl->Set(isolate, "DEPTH32F_STENCIL8", v8::Integer::NewFromUnsigned(isolate, 0x8CAD));
|
|
3910
3914
|
|
|
3911
3915
|
/* Data types */
|
|
3912
3916
|
|
|
3913
|
-
tmpl->Set(isolate, "INVALID_INDEX", v8::
|
|
3917
|
+
tmpl->Set(isolate, "INVALID_INDEX", v8::Integer::NewFromUnsigned(isolate, 0xFFFFFFFF));
|
|
3914
3918
|
tmpl->Set(isolate, "TIMEOUT_IGNORED", v8::Int32::New(isolate, -1));
|
|
3915
3919
|
|
|
3916
3920
|
/* Vertex attributes */
|
|
3917
3921
|
|
|
3918
3922
|
/* Transform feedback */
|
|
3919
3923
|
|
|
3920
|
-
tmpl->Set(isolate, "MAX_CLIENT_WAIT_TIMEOUT_WEBGL",
|
|
3924
|
+
tmpl->Set(isolate, "MAX_CLIENT_WAIT_TIMEOUT_WEBGL",
|
|
3925
|
+
v8::Integer::NewFromUnsigned(isolate, 0x9247));
|
|
3921
3926
|
|
|
3922
3927
|
/* Transform feedback */
|
|
3923
3928
|
|