@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
|
@@ -122,12 +122,12 @@ v8::Local<v8::Value> WebGLRenderingContext::GetParameterInternal(v8::Isolate *is
|
|
|
122
122
|
value == 0) {
|
|
123
123
|
return scope.Escape(v8::Null(isolate));
|
|
124
124
|
}
|
|
125
|
-
return scope.Escape(v8::
|
|
125
|
+
return scope.Escape(v8::Integer::New(isolate, value));
|
|
126
126
|
}
|
|
127
127
|
case (uint32_t) GLConstants::UNPACK_COLORSPACE_CONVERSION_WEBGL:
|
|
128
|
-
return scope.Escape(v8::
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
return scope.Escape(v8::Integer::New(isolate,
|
|
129
|
+
canvas_native_webgl_state_get_unpack_colorspace_conversion_webgl(
|
|
130
|
+
this->GetState())));
|
|
131
131
|
case GL_ALIASED_LINE_WIDTH_RANGE:
|
|
132
132
|
case GL_ALIASED_POINT_SIZE_RANGE:
|
|
133
133
|
case GL_BLEND_COLOR:
|
|
@@ -307,7 +307,7 @@ void WebGLRenderingContext::ActiveTexture(const v8::FunctionCallbackInfo<v8::Val
|
|
|
307
307
|
|
|
308
308
|
auto isolate = args.GetIsolate();
|
|
309
309
|
auto context = isolate->GetCurrentContext();
|
|
310
|
-
auto texture =
|
|
310
|
+
auto texture = args[0]->Uint32Value(context).ToChecked();
|
|
311
311
|
canvas_native_webgl_active_texture(texture,
|
|
312
312
|
ptr->GetState());
|
|
313
313
|
}
|
|
@@ -322,32 +322,33 @@ void WebGLRenderingContext::AttachShader(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
322
322
|
|
|
323
323
|
auto programValue = args[0];
|
|
324
324
|
auto shaderValue = args[1];
|
|
325
|
-
if (programValue->IsObject() && shaderValue->IsObject()) {
|
|
326
|
-
WebGLProgram *program = nullptr;
|
|
327
|
-
WebGLShader *shader = nullptr;
|
|
328
|
-
if (GetNativeType(isolate, programValue.As<v8::Object>()) == NativeType::WebGLProgram) {
|
|
329
|
-
program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
330
|
-
}
|
|
331
325
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
}
|
|
326
|
+
auto programType = GetNativeType(isolate, programValue);
|
|
327
|
+
auto shaderType = GetNativeType(isolate, shaderValue);
|
|
335
328
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
329
|
+
WebGLProgram *program = nullptr;
|
|
330
|
+
WebGLShader *shader = nullptr;
|
|
331
|
+
if (programType == NativeType::WebGLProgram) {
|
|
332
|
+
program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
333
|
+
}
|
|
339
334
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
335
|
+
if (shaderType == NativeType::WebGLShader) {
|
|
336
|
+
shader = WebGLShader::GetPointer(shaderValue.As<v8::Object>());
|
|
337
|
+
}
|
|
343
338
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
ptr->GetState()
|
|
348
|
-
);
|
|
339
|
+
if (program == nullptr) {
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
349
342
|
|
|
343
|
+
if (shader == nullptr) {
|
|
344
|
+
return;
|
|
350
345
|
}
|
|
346
|
+
|
|
347
|
+
canvas_native_webgl_attach_shader(
|
|
348
|
+
program->GetProgram(),
|
|
349
|
+
shader->GetShader(),
|
|
350
|
+
ptr->GetState()
|
|
351
|
+
);
|
|
351
352
|
}
|
|
352
353
|
|
|
353
354
|
void WebGLRenderingContext::BindAttribLocation(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -361,11 +362,10 @@ void WebGLRenderingContext::BindAttribLocation(const v8::FunctionCallbackInfo<v8
|
|
|
361
362
|
|
|
362
363
|
auto programValue = args[0];
|
|
363
364
|
auto type = GetNativeType(isolate, programValue);
|
|
364
|
-
if (type == NativeType::WebGLProgram
|
|
365
|
-
args[2]->IsString()) {
|
|
365
|
+
if (type == NativeType::WebGLProgram) {
|
|
366
366
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
367
367
|
|
|
368
|
-
auto index =
|
|
368
|
+
auto index = args[1]->Uint32Value(context).ToChecked();
|
|
369
369
|
auto name = ConvertFromV8String(isolate, args[2]);
|
|
370
370
|
canvas_native_webgl_bind_attrib_location(
|
|
371
371
|
program->GetProgram(),
|
|
@@ -386,31 +386,29 @@ void WebGLRenderingContext::BindBuffer(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
386
386
|
auto isolate = args.GetIsolate();
|
|
387
387
|
auto context = isolate->GetCurrentContext();
|
|
388
388
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
nullptr) { return; }
|
|
398
|
-
canvas_native_webgl_bind_buffer(
|
|
399
|
-
target,
|
|
400
|
-
buffer->GetBuffer(),
|
|
401
|
-
ptr->GetState()
|
|
402
|
-
);
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
} else {
|
|
406
|
-
// unbind
|
|
407
|
-
// check for null or undefined ?
|
|
389
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
390
|
+
if (!args[1]->IsNull() &&
|
|
391
|
+
args[1]->IsObject()) {
|
|
392
|
+
auto type = GetNativeType(isolate, args[1].As<v8::Object>());
|
|
393
|
+
if (type == NativeType::WebGLBuffer) {
|
|
394
|
+
auto buffer = WebGLBuffer::GetPointer(args[1].As<v8::Object>());
|
|
395
|
+
if (buffer ==
|
|
396
|
+
nullptr) { return; }
|
|
408
397
|
canvas_native_webgl_bind_buffer(
|
|
409
398
|
target,
|
|
410
|
-
|
|
399
|
+
buffer->GetBuffer(),
|
|
411
400
|
ptr->GetState()
|
|
412
401
|
);
|
|
413
402
|
}
|
|
403
|
+
|
|
404
|
+
} else {
|
|
405
|
+
// unbind
|
|
406
|
+
// check for null or undefined ?
|
|
407
|
+
canvas_native_webgl_bind_buffer(
|
|
408
|
+
target,
|
|
409
|
+
0,
|
|
410
|
+
ptr->GetState()
|
|
411
|
+
);
|
|
414
412
|
}
|
|
415
413
|
}
|
|
416
414
|
|
|
@@ -424,9 +422,9 @@ void WebGLRenderingContext::BindFramebuffer(const v8::FunctionCallbackInfo<v8::V
|
|
|
424
422
|
auto context = isolate->GetCurrentContext();
|
|
425
423
|
|
|
426
424
|
if (args[0]->IsNumber()) {
|
|
427
|
-
auto target =
|
|
425
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
428
426
|
if (args[1]->IsObject()) {
|
|
429
|
-
auto type = GetNativeType(isolate, args[1]
|
|
427
|
+
auto type = GetNativeType(isolate, args[1]);
|
|
430
428
|
if (type == NativeType::WebGLFramebuffer) {
|
|
431
429
|
auto framebuffer = WebGLFramebuffer::GetPointer(args[1].As<v8::Object>());
|
|
432
430
|
canvas_native_webgl_bind_frame_buffer(
|
|
@@ -456,28 +454,26 @@ void WebGLRenderingContext::BindRenderbuffer(const v8::FunctionCallbackInfo<v8::
|
|
|
456
454
|
auto isolate = args.GetIsolate();
|
|
457
455
|
auto context = isolate->GetCurrentContext();
|
|
458
456
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
auto renderbuffer = WebGLRenderbuffer::GetPointer(args[1].As<v8::Object>());
|
|
457
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
458
|
+
if (args[1]->IsObject()) {
|
|
459
|
+
auto type = GetNativeType(isolate, args[1].As<v8::Object>());
|
|
460
|
+
if (type == NativeType::WebGLRenderbuffer) {
|
|
461
|
+
auto renderbuffer = WebGLRenderbuffer::GetPointer(args[1].As<v8::Object>());
|
|
465
462
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
canvas_native_webgl_bind_render_buffer(
|
|
469
|
-
target,
|
|
470
|
-
renderbuffer->GetRenderBuffer(),
|
|
471
|
-
ptr->GetState()
|
|
472
|
-
);
|
|
473
|
-
}
|
|
474
|
-
} else {
|
|
463
|
+
if (renderbuffer ==
|
|
464
|
+
nullptr) { return; }
|
|
475
465
|
canvas_native_webgl_bind_render_buffer(
|
|
476
466
|
target,
|
|
477
|
-
|
|
467
|
+
renderbuffer->GetRenderBuffer(),
|
|
478
468
|
ptr->GetState()
|
|
479
469
|
);
|
|
480
470
|
}
|
|
471
|
+
} else {
|
|
472
|
+
canvas_native_webgl_bind_render_buffer(
|
|
473
|
+
target,
|
|
474
|
+
0,
|
|
475
|
+
ptr->GetState()
|
|
476
|
+
);
|
|
481
477
|
}
|
|
482
478
|
}
|
|
483
479
|
|
|
@@ -490,25 +486,23 @@ void WebGLRenderingContext::BindTexture(const v8::FunctionCallbackInfo<v8::Value
|
|
|
490
486
|
auto isolate = args.GetIsolate();
|
|
491
487
|
auto context = isolate->GetCurrentContext();
|
|
492
488
|
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
auto texture = WebGLTexture::GetPointer(args[1].As<v8::Object>());
|
|
499
|
-
canvas_native_webgl_bind_texture(
|
|
500
|
-
target,
|
|
501
|
-
texture->GetTexture(),
|
|
502
|
-
ptr->GetState()
|
|
503
|
-
);
|
|
504
|
-
}
|
|
505
|
-
} else {
|
|
489
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
490
|
+
if (args[1]->IsObject()) {
|
|
491
|
+
auto type = GetNativeType(isolate, args[1].As<v8::Object>());
|
|
492
|
+
if (type == NativeType::WebGLTexture) {
|
|
493
|
+
auto texture = WebGLTexture::GetPointer(args[1].As<v8::Object>());
|
|
506
494
|
canvas_native_webgl_bind_texture(
|
|
507
495
|
target,
|
|
508
|
-
|
|
496
|
+
texture->GetTexture(),
|
|
509
497
|
ptr->GetState()
|
|
510
498
|
);
|
|
511
499
|
}
|
|
500
|
+
} else {
|
|
501
|
+
canvas_native_webgl_bind_texture(
|
|
502
|
+
target,
|
|
503
|
+
0,
|
|
504
|
+
ptr->GetState()
|
|
505
|
+
);
|
|
512
506
|
}
|
|
513
507
|
}
|
|
514
508
|
|
|
@@ -544,8 +538,8 @@ void WebGLRenderingContext::BlendEquationSeparate(const v8::FunctionCallbackInfo
|
|
|
544
538
|
auto isolate = args.GetIsolate();
|
|
545
539
|
auto context = isolate->GetCurrentContext();
|
|
546
540
|
|
|
547
|
-
auto modeRGB =
|
|
548
|
-
auto modeAlpha =
|
|
541
|
+
auto modeRGB = args[0]->Uint32Value(context).ToChecked();
|
|
542
|
+
auto modeAlpha = args[1]->Uint32Value(context).ToChecked();
|
|
549
543
|
|
|
550
544
|
canvas_native_webgl_blend_equation_separate(
|
|
551
545
|
modeRGB,
|
|
@@ -563,7 +557,7 @@ void WebGLRenderingContext::BlendEquation(const v8::FunctionCallbackInfo<v8::Val
|
|
|
563
557
|
auto isolate = args.GetIsolate();
|
|
564
558
|
auto context = isolate->GetCurrentContext();
|
|
565
559
|
|
|
566
|
-
auto mode =
|
|
560
|
+
auto mode = args[0]->Uint32Value(context).ToChecked();
|
|
567
561
|
canvas_native_webgl_blend_equation(
|
|
568
562
|
mode,
|
|
569
563
|
ptr->GetState()
|
|
@@ -579,10 +573,10 @@ void WebGLRenderingContext::BlendFuncSeparate(const v8::FunctionCallbackInfo<v8:
|
|
|
579
573
|
auto isolate = args.GetIsolate();
|
|
580
574
|
auto context = isolate->GetCurrentContext();
|
|
581
575
|
|
|
582
|
-
auto srcRGB =
|
|
583
|
-
auto dstRGB =
|
|
584
|
-
auto srcAlpha =
|
|
585
|
-
auto dstAlpha =
|
|
576
|
+
auto srcRGB = args[0]->Uint32Value(context).ToChecked();
|
|
577
|
+
auto dstRGB = args[1]->Uint32Value(context).ToChecked();
|
|
578
|
+
auto srcAlpha = args[2]->Uint32Value(context).ToChecked();
|
|
579
|
+
auto dstAlpha = args[3]->Uint32Value(context).ToChecked();
|
|
586
580
|
|
|
587
581
|
canvas_native_webgl_blend_func_separate(
|
|
588
582
|
srcRGB,
|
|
@@ -602,8 +596,8 @@ void WebGLRenderingContext::BlendFunc(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
602
596
|
auto isolate = args.GetIsolate();
|
|
603
597
|
auto context = isolate->GetCurrentContext();
|
|
604
598
|
|
|
605
|
-
auto sfactor =
|
|
606
|
-
auto dfactor =
|
|
599
|
+
auto sfactor = args[0]->Uint32Value(context).ToChecked();
|
|
600
|
+
auto dfactor = args[1]->Uint32Value(context).ToChecked();
|
|
607
601
|
|
|
608
602
|
canvas_native_webgl_blend_func(
|
|
609
603
|
sfactor,
|
|
@@ -624,8 +618,8 @@ void WebGLRenderingContext::BufferData(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
624
618
|
auto count = args.Length();
|
|
625
619
|
|
|
626
620
|
if (count == 2) {
|
|
627
|
-
auto target =
|
|
628
|
-
auto usage =
|
|
621
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
622
|
+
auto usage = args[1]->Uint32Value(context).ToChecked();
|
|
629
623
|
|
|
630
624
|
canvas_native_webgl_buffer_data_none(
|
|
631
625
|
target,
|
|
@@ -634,9 +628,9 @@ void WebGLRenderingContext::BufferData(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
634
628
|
ptr->GetState()
|
|
635
629
|
);
|
|
636
630
|
} else if (count == 3) {
|
|
637
|
-
auto target =
|
|
631
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
638
632
|
|
|
639
|
-
auto usage =
|
|
633
|
+
auto usage = args[2]->Uint32Value(context).ToChecked();
|
|
640
634
|
|
|
641
635
|
if (args[1]->IsObject()) {
|
|
642
636
|
|
|
@@ -730,7 +724,7 @@ void WebGLRenderingContext::BufferSubData(const v8::FunctionCallbackInfo<v8::Val
|
|
|
730
724
|
auto count = args.Length();
|
|
731
725
|
|
|
732
726
|
if (count == 2) {
|
|
733
|
-
auto target =
|
|
727
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
734
728
|
auto offset = args[1]->NumberValue(context).ToChecked();
|
|
735
729
|
|
|
736
730
|
canvas_native_webgl_buffer_sub_data_none(
|
|
@@ -739,7 +733,7 @@ void WebGLRenderingContext::BufferSubData(const v8::FunctionCallbackInfo<v8::Val
|
|
|
739
733
|
ptr->GetState()
|
|
740
734
|
);
|
|
741
735
|
} else if (count == 3) {
|
|
742
|
-
auto target =
|
|
736
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
743
737
|
auto offset = args[1]->NumberValue(context).ToChecked();
|
|
744
738
|
|
|
745
739
|
if (args[2]->IsObject()) {
|
|
@@ -793,14 +787,14 @@ WebGLRenderingContext::CheckFramebufferStatus(const v8::FunctionCallbackInfo<v8:
|
|
|
793
787
|
auto count = args.Length();
|
|
794
788
|
|
|
795
789
|
if (args[0]->IsNumber()) {
|
|
796
|
-
auto target =
|
|
790
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
797
791
|
|
|
798
792
|
auto ret = canvas_native_webgl_check_frame_buffer_status(
|
|
799
793
|
target,
|
|
800
794
|
ptr->GetState()
|
|
801
795
|
);
|
|
802
796
|
|
|
803
|
-
args.GetReturnValue().Set(
|
|
797
|
+
args.GetReturnValue().Set(ret);
|
|
804
798
|
return;
|
|
805
799
|
}
|
|
806
800
|
|
|
@@ -856,7 +850,7 @@ void WebGLRenderingContext::ClearStencil(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
856
850
|
auto isolate = args.GetIsolate();
|
|
857
851
|
auto context = isolate->GetCurrentContext();
|
|
858
852
|
|
|
859
|
-
auto stencil =
|
|
853
|
+
auto stencil = args[0]->Int32Value(context).ToChecked();
|
|
860
854
|
canvas_native_webgl_clear_stencil(
|
|
861
855
|
stencil,
|
|
862
856
|
ptr->GetState()
|
|
@@ -872,7 +866,7 @@ void WebGLRenderingContext::Clear(const v8::FunctionCallbackInfo<v8::Value> &arg
|
|
|
872
866
|
auto isolate = args.GetIsolate();
|
|
873
867
|
auto context = isolate->GetCurrentContext();
|
|
874
868
|
|
|
875
|
-
auto mask =
|
|
869
|
+
auto mask = args[0]->Uint32Value(context).ToChecked();
|
|
876
870
|
|
|
877
871
|
canvas_native_webgl_clear(
|
|
878
872
|
mask,
|
|
@@ -938,12 +932,12 @@ void WebGLRenderingContext::CompressedTexImage2D(const v8::FunctionCallbackInfo<
|
|
|
938
932
|
auto count = args.Length();
|
|
939
933
|
|
|
940
934
|
if (count == 6) {
|
|
941
|
-
auto target =
|
|
942
|
-
auto level =
|
|
943
|
-
auto internalformat =
|
|
944
|
-
auto width =
|
|
945
|
-
auto height =
|
|
946
|
-
auto border =
|
|
935
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
936
|
+
auto level = args[1]->Int32Value(context).ToChecked();
|
|
937
|
+
auto internalformat = args[2]->Uint32Value(context).ToChecked();
|
|
938
|
+
auto width = args[3]->Int32Value(context).ToChecked();
|
|
939
|
+
auto height = args[4]->Int32Value(context).ToChecked();
|
|
940
|
+
auto border = args[5]->Int32Value(context).ToChecked();
|
|
947
941
|
|
|
948
942
|
canvas_native_webgl_compressed_tex_image2d_none(
|
|
949
943
|
target,
|
|
@@ -955,12 +949,12 @@ void WebGLRenderingContext::CompressedTexImage2D(const v8::FunctionCallbackInfo<
|
|
|
955
949
|
ptr->GetState()
|
|
956
950
|
);
|
|
957
951
|
} else if (count > 6) {
|
|
958
|
-
auto target =
|
|
959
|
-
auto level =
|
|
960
|
-
auto internalformat =
|
|
961
|
-
auto width =
|
|
962
|
-
auto height =
|
|
963
|
-
auto border =
|
|
952
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
953
|
+
auto level = args[1]->Int32Value(context).ToChecked();
|
|
954
|
+
auto internalformat = args[2]->Uint32Value(context).ToChecked();
|
|
955
|
+
auto width = args[3]->Int32Value(context).ToChecked();
|
|
956
|
+
auto height = args[4]->Int32Value(context).ToChecked();
|
|
957
|
+
auto border = args[5]->Int32Value(context).ToChecked();
|
|
964
958
|
auto pixels = args[6];
|
|
965
959
|
if (pixels->IsObject()) {
|
|
966
960
|
if (pixels->IsArrayBufferView()) {
|
|
@@ -1015,13 +1009,13 @@ WebGLRenderingContext::CompressedTexSubImage2D(const v8::FunctionCallbackInfo<v8
|
|
|
1015
1009
|
auto isolate = args.GetIsolate();
|
|
1016
1010
|
auto context = isolate->GetCurrentContext();
|
|
1017
1011
|
|
|
1018
|
-
auto target =
|
|
1019
|
-
auto level =
|
|
1020
|
-
auto xoffset =
|
|
1021
|
-
auto yoffset =
|
|
1022
|
-
auto width =
|
|
1023
|
-
auto height =
|
|
1024
|
-
auto format =
|
|
1012
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
1013
|
+
auto level = args[1]->Int32Value(context).ToChecked();
|
|
1014
|
+
auto xoffset = args[2]->Int32Value(context).ToChecked();
|
|
1015
|
+
auto yoffset = args[3]->Int32Value(context).ToChecked();
|
|
1016
|
+
auto width = args[4]->Int32Value(context).ToChecked();
|
|
1017
|
+
auto height = args[5]->Int32Value(context).ToChecked();
|
|
1018
|
+
auto format = args[6]->Uint32Value(context).ToChecked();
|
|
1025
1019
|
if (args[7]->IsObject()) {
|
|
1026
1020
|
auto pixels = args[7];
|
|
1027
1021
|
if (pixels->IsArrayBufferView()) {
|
|
@@ -1076,14 +1070,14 @@ void WebGLRenderingContext::CopyTexImage2D(const v8::FunctionCallbackInfo<v8::Va
|
|
|
1076
1070
|
auto count = args.Length();
|
|
1077
1071
|
|
|
1078
1072
|
|
|
1079
|
-
auto target =
|
|
1080
|
-
auto level =
|
|
1081
|
-
auto internalformat =
|
|
1082
|
-
auto x =
|
|
1083
|
-
auto y =
|
|
1084
|
-
auto width =
|
|
1085
|
-
auto height =
|
|
1086
|
-
auto border =
|
|
1073
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
1074
|
+
auto level = args[1]->Int32Value(context).ToChecked();
|
|
1075
|
+
auto internalformat = args[2]->Uint32Value(context).ToChecked();
|
|
1076
|
+
auto x = args[3]->Int32Value(context).ToChecked();
|
|
1077
|
+
auto y = args[4]->Int32Value(context).ToChecked();
|
|
1078
|
+
auto width = args[5]->Int32Value(context).ToChecked();
|
|
1079
|
+
auto height = args[6]->Int32Value(context).ToChecked();
|
|
1080
|
+
auto border = args[7]->Int32Value(context).ToChecked();
|
|
1087
1081
|
|
|
1088
1082
|
canvas_native_webgl_copy_tex_image2d(
|
|
1089
1083
|
target,
|
|
@@ -1111,14 +1105,14 @@ void WebGLRenderingContext::CopyTexSubImage2D(const v8::FunctionCallbackInfo<v8:
|
|
|
1111
1105
|
auto count = args.Length();
|
|
1112
1106
|
|
|
1113
1107
|
|
|
1114
|
-
auto target =
|
|
1115
|
-
auto level =
|
|
1116
|
-
auto xoffset =
|
|
1117
|
-
auto yoffset =
|
|
1118
|
-
auto x =
|
|
1119
|
-
auto y =
|
|
1120
|
-
auto width =
|
|
1121
|
-
auto height =
|
|
1108
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
1109
|
+
auto level = args[1]->Int32Value(context).ToChecked();
|
|
1110
|
+
auto xoffset = args[2]->Int32Value(context).ToChecked();
|
|
1111
|
+
auto yoffset = args[3]->Int32Value(context).ToChecked();
|
|
1112
|
+
auto x = args[4]->Int32Value(context).ToChecked();
|
|
1113
|
+
auto y = args[5]->Int32Value(context).ToChecked();
|
|
1114
|
+
auto width = args[6]->Int32Value(context).ToChecked();
|
|
1115
|
+
auto height = args[7]->Int32Value(context).ToChecked();
|
|
1122
1116
|
|
|
1123
1117
|
canvas_native_webgl_copy_tex_sub_image2d(
|
|
1124
1118
|
target,
|
|
@@ -1243,7 +1237,7 @@ void WebGLRenderingContext::CreateShader(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1243
1237
|
return;
|
|
1244
1238
|
}
|
|
1245
1239
|
|
|
1246
|
-
auto type =
|
|
1240
|
+
auto type = args[0]->Uint32Value(context).ToChecked();
|
|
1247
1241
|
auto shader = canvas_native_webgl_create_shader(
|
|
1248
1242
|
type, ptr->GetState());
|
|
1249
1243
|
if (shader != 0) {
|
|
@@ -1290,7 +1284,7 @@ void WebGLRenderingContext::CullFace(const v8::FunctionCallbackInfo<v8::Value> &
|
|
|
1290
1284
|
auto context = isolate->GetCurrentContext();
|
|
1291
1285
|
|
|
1292
1286
|
|
|
1293
|
-
auto mode =
|
|
1287
|
+
auto mode = args[0]->Uint32Value(context).ToChecked();
|
|
1294
1288
|
|
|
1295
1289
|
canvas_native_webgl_cull_face(
|
|
1296
1290
|
mode,
|
|
@@ -1454,7 +1448,7 @@ void WebGLRenderingContext::DepthFunc(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
1454
1448
|
|
|
1455
1449
|
auto value = args[0];
|
|
1456
1450
|
|
|
1457
|
-
auto func =
|
|
1451
|
+
auto func = value->Uint32Value(context).ToChecked();
|
|
1458
1452
|
|
|
1459
1453
|
canvas_native_webgl_depth_func(
|
|
1460
1454
|
func,
|
|
@@ -1470,9 +1464,7 @@ void WebGLRenderingContext::DepthMask(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
1470
1464
|
|
|
1471
1465
|
auto isolate = args.GetIsolate();
|
|
1472
1466
|
|
|
1473
|
-
auto
|
|
1474
|
-
|
|
1475
|
-
auto mask = value->BooleanValue(isolate);
|
|
1467
|
+
auto mask = args[0]->BooleanValue(isolate);
|
|
1476
1468
|
|
|
1477
1469
|
canvas_native_webgl_depth_mask(
|
|
1478
1470
|
mask,
|
|
@@ -1543,7 +1535,7 @@ WebGLRenderingContext::DisableVertexAttribArray(const v8::FunctionCallbackInfo<v
|
|
|
1543
1535
|
auto context = isolate->GetCurrentContext();
|
|
1544
1536
|
|
|
1545
1537
|
|
|
1546
|
-
auto index =
|
|
1538
|
+
auto index = args[0]->Uint32Value(context).ToChecked();
|
|
1547
1539
|
|
|
1548
1540
|
canvas_native_webgl_disable_vertex_attrib_array(
|
|
1549
1541
|
index,
|
|
@@ -1560,7 +1552,7 @@ void WebGLRenderingContext::Disable(const v8::FunctionCallbackInfo<v8::Value> &a
|
|
|
1560
1552
|
auto isolate = args.GetIsolate();
|
|
1561
1553
|
auto context = isolate->GetCurrentContext();
|
|
1562
1554
|
|
|
1563
|
-
auto cap =
|
|
1555
|
+
auto cap = args[0]->Uint32Value(context).ToChecked();
|
|
1564
1556
|
|
|
1565
1557
|
canvas_native_webgl_disable(
|
|
1566
1558
|
cap,
|
|
@@ -1577,9 +1569,9 @@ void WebGLRenderingContext::DrawArrays(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
1577
1569
|
auto isolate = args.GetIsolate();
|
|
1578
1570
|
auto context = isolate->GetCurrentContext();
|
|
1579
1571
|
|
|
1580
|
-
auto mode =
|
|
1581
|
-
auto first =
|
|
1582
|
-
auto count =
|
|
1572
|
+
auto mode = args[0]->Uint32Value(context).ToChecked();
|
|
1573
|
+
auto first = args[1]->Int32Value(context).ToChecked();
|
|
1574
|
+
auto count = args[2]->Int32Value(context).ToChecked();
|
|
1583
1575
|
|
|
1584
1576
|
canvas_native_webgl_draw_arrays(
|
|
1585
1577
|
mode,
|
|
@@ -1600,9 +1592,9 @@ void WebGLRenderingContext::DrawElements(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1600
1592
|
auto context = isolate->GetCurrentContext();
|
|
1601
1593
|
|
|
1602
1594
|
|
|
1603
|
-
auto mode =
|
|
1604
|
-
auto count =
|
|
1605
|
-
auto type =
|
|
1595
|
+
auto mode = args[0]->Uint32Value(context).ToChecked();
|
|
1596
|
+
auto count = args[1]->Int32Value(context).ToChecked();
|
|
1597
|
+
auto type = args[2]->Int32Value(context).ToChecked();
|
|
1606
1598
|
auto offset = args[3]->NumberValue(context).ToChecked();
|
|
1607
1599
|
|
|
1608
1600
|
canvas_native_webgl_draw_elements(
|
|
@@ -1625,7 +1617,7 @@ WebGLRenderingContext::EnableVertexAttribArray(const v8::FunctionCallbackInfo<v8
|
|
|
1625
1617
|
auto isolate = args.GetIsolate();
|
|
1626
1618
|
auto context = isolate->GetCurrentContext();
|
|
1627
1619
|
|
|
1628
|
-
auto index =
|
|
1620
|
+
auto index = args[0]->Uint32Value(context).ToChecked();
|
|
1629
1621
|
|
|
1630
1622
|
canvas_native_webgl_enable_vertex_attrib_array(
|
|
1631
1623
|
index,
|
|
@@ -1642,7 +1634,7 @@ void WebGLRenderingContext::Enable(const v8::FunctionCallbackInfo<v8::Value> &ar
|
|
|
1642
1634
|
auto isolate = args.GetIsolate();
|
|
1643
1635
|
auto context = isolate->GetCurrentContext();
|
|
1644
1636
|
|
|
1645
|
-
auto cap =
|
|
1637
|
+
auto cap = args[0]->Uint32Value(context).ToChecked();
|
|
1646
1638
|
|
|
1647
1639
|
canvas_native_webgl_enable(
|
|
1648
1640
|
cap,
|
|
@@ -1682,9 +1674,9 @@ WebGLRenderingContext::FramebufferRenderbuffer(const v8::FunctionCallbackInfo<v8
|
|
|
1682
1674
|
auto isolate = args.GetIsolate();
|
|
1683
1675
|
auto context = isolate->GetCurrentContext();
|
|
1684
1676
|
|
|
1685
|
-
auto target =
|
|
1686
|
-
auto attachment =
|
|
1687
|
-
auto renderbuffertarget =
|
|
1677
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
1678
|
+
auto attachment = args[1]->Uint32Value(context).ToChecked();
|
|
1679
|
+
auto renderbuffertarget = args[2]->Uint32Value(context).ToChecked();
|
|
1688
1680
|
auto renderbufferValue = args[3];
|
|
1689
1681
|
auto type = GetNativeType(isolate, renderbufferValue);
|
|
1690
1682
|
if (type == NativeType::WebGLRenderbuffer) {
|
|
@@ -1710,10 +1702,10 @@ void WebGLRenderingContext::FramebufferTexture2D(const v8::FunctionCallbackInfo<
|
|
|
1710
1702
|
auto isolate = args.GetIsolate();
|
|
1711
1703
|
auto context = isolate->GetCurrentContext();
|
|
1712
1704
|
|
|
1713
|
-
auto target =
|
|
1714
|
-
auto attachment =
|
|
1715
|
-
auto textarget =
|
|
1716
|
-
auto level =
|
|
1705
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
1706
|
+
auto attachment = args[1]->Uint32Value(context).ToChecked();
|
|
1707
|
+
auto textarget = args[2]->Uint32Value(context).ToChecked();
|
|
1708
|
+
auto level = args[4]->Int32Value(context).ToChecked();
|
|
1717
1709
|
auto textureValue = args[3];
|
|
1718
1710
|
auto type = GetNativeType(isolate, textureValue);
|
|
1719
1711
|
if (type == NativeType::WebGLTexture) {
|
|
@@ -1740,7 +1732,7 @@ void WebGLRenderingContext::FrontFace(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
1740
1732
|
auto isolate = args.GetIsolate();
|
|
1741
1733
|
auto context = isolate->GetCurrentContext();
|
|
1742
1734
|
|
|
1743
|
-
auto mode =
|
|
1735
|
+
auto mode = args[0]->Uint32Value(context).ToChecked();
|
|
1744
1736
|
|
|
1745
1737
|
canvas_native_webgl_front_face(
|
|
1746
1738
|
mode,
|
|
@@ -1757,7 +1749,7 @@ void WebGLRenderingContext::GenerateMipmap(const v8::FunctionCallbackInfo<v8::Va
|
|
|
1757
1749
|
auto isolate = args.GetIsolate();
|
|
1758
1750
|
auto context = isolate->GetCurrentContext();
|
|
1759
1751
|
|
|
1760
|
-
auto target =
|
|
1752
|
+
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
1761
1753
|
|
|
1762
1754
|
canvas_native_webgl_generate_mipmap(
|
|
1763
1755
|
target,
|
|
@@ -1777,7 +1769,7 @@ void WebGLRenderingContext::GetActiveAttrib(const v8::FunctionCallbackInfo<v8::V
|
|
|
1777
1769
|
auto programValue = args[0];
|
|
1778
1770
|
auto type = GetNativeType(isolate, programValue);
|
|
1779
1771
|
if (type == NativeType::WebGLProgram) {
|
|
1780
|
-
auto index =
|
|
1772
|
+
auto index = args[1]->Int32Value(context).ToChecked();
|
|
1781
1773
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
1782
1774
|
if (program != nullptr) {
|
|
1783
1775
|
auto info = canvas_native_webgl_get_active_attrib(
|
|
@@ -1808,7 +1800,7 @@ void WebGLRenderingContext::GetActiveUniform(const v8::FunctionCallbackInfo<v8::
|
|
|
1808
1800
|
auto programValue = args[0];
|
|
1809
1801
|
auto type = GetNativeType(isolate, programValue);
|
|
1810
1802
|
if (type == NativeType::WebGLProgram) {
|
|
1811
|
-
auto index =
|
|
1803
|
+
auto index = args[1]->Int32Value(
|
|
1812
1804
|
context).ToChecked();
|
|
1813
1805
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
1814
1806
|
if (program != nullptr) {
|
|
@@ -1906,9 +1898,9 @@ void WebGLRenderingContext::GetBufferParameter(const v8::FunctionCallbackInfo<v8
|
|
|
1906
1898
|
auto isolate = args.GetIsolate();
|
|
1907
1899
|
auto context = isolate->GetCurrentContext();
|
|
1908
1900
|
|
|
1909
|
-
auto target =
|
|
1901
|
+
auto target = args[0]->Uint32Value(
|
|
1910
1902
|
context).ToChecked();
|
|
1911
|
-
auto pname =
|
|
1903
|
+
auto pname = args[1]->Uint32Value(
|
|
1912
1904
|
context).ToChecked();
|
|
1913
1905
|
|
|
1914
1906
|
auto param = canvas_native_webgl_get_buffer_parameter(
|
|
@@ -2014,7 +2006,7 @@ void WebGLRenderingContext::GetError(const v8::FunctionCallbackInfo<v8::Value> &
|
|
|
2014
2006
|
auto ret = canvas_native_webgl_get_error(
|
|
2015
2007
|
ptr->GetState());
|
|
2016
2008
|
|
|
2017
|
-
args.GetReturnValue().Set(
|
|
2009
|
+
args.GetReturnValue().Set(ret);
|
|
2018
2010
|
|
|
2019
2011
|
}
|
|
2020
2012
|
|
|
@@ -2265,11 +2257,11 @@ void WebGLRenderingContext::GetFramebufferAttachmentParameter(
|
|
|
2265
2257
|
auto isolate = args.GetIsolate();
|
|
2266
2258
|
auto context = isolate->GetCurrentContext();
|
|
2267
2259
|
|
|
2268
|
-
auto target =
|
|
2260
|
+
auto target = args[0]->Uint32Value(
|
|
2269
2261
|
context).ToChecked();
|
|
2270
|
-
auto attachment =
|
|
2262
|
+
auto attachment = args[1]->Uint32Value(
|
|
2271
2263
|
context).ToChecked();
|
|
2272
|
-
auto pname =
|
|
2264
|
+
auto pname = args[2]->Uint32Value(
|
|
2273
2265
|
context).ToChecked();
|
|
2274
2266
|
auto ret = canvas_native_webgl_get_framebuffer_attachment_parameter(
|
|
2275
2267
|
target,
|
|
@@ -2327,7 +2319,7 @@ void WebGLRenderingContext::GetParameter(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
2327
2319
|
auto isolate = args.GetIsolate();
|
|
2328
2320
|
auto context = isolate->GetCurrentContext();
|
|
2329
2321
|
|
|
2330
|
-
auto pname =
|
|
2322
|
+
auto pname = args[0]->Uint32Value(
|
|
2331
2323
|
context).ToChecked();
|
|
2332
2324
|
auto result = canvas_native_webgl_get_parameter(
|
|
2333
2325
|
pname,
|
|
@@ -2386,7 +2378,7 @@ void WebGLRenderingContext::GetProgramParameter(const v8::FunctionCallbackInfo<v
|
|
|
2386
2378
|
|
|
2387
2379
|
auto programValue = args[0];
|
|
2388
2380
|
auto type = GetNativeType(isolate, programValue);
|
|
2389
|
-
auto pname =
|
|
2381
|
+
auto pname = args[1]->Uint32Value(
|
|
2390
2382
|
context).ToChecked();
|
|
2391
2383
|
if (type == NativeType::WebGLProgram) {
|
|
2392
2384
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
@@ -2439,9 +2431,9 @@ WebGLRenderingContext::GetRenderbufferParameter(const v8::FunctionCallbackInfo<v
|
|
|
2439
2431
|
auto context = isolate->GetCurrentContext();
|
|
2440
2432
|
|
|
2441
2433
|
if (args.Length() > 1) {
|
|
2442
|
-
auto target =
|
|
2434
|
+
auto target = args[0]->Uint32Value(
|
|
2443
2435
|
context).ToChecked();
|
|
2444
|
-
auto pname =
|
|
2436
|
+
auto pname = args[1]->Uint32Value(
|
|
2445
2437
|
context).ToChecked();
|
|
2446
2438
|
auto ret = canvas_native_webgl_get_renderbuffer_parameter(
|
|
2447
2439
|
target,
|
|
@@ -2502,7 +2494,7 @@ void WebGLRenderingContext::GetShaderParameter(const v8::FunctionCallbackInfo<v8
|
|
|
2502
2494
|
|
|
2503
2495
|
auto value = args[0];
|
|
2504
2496
|
auto type = GetNativeType(isolate, value);
|
|
2505
|
-
auto pname =
|
|
2497
|
+
auto pname = args[1]->Uint32Value(
|
|
2506
2498
|
context).ToChecked();
|
|
2507
2499
|
if (type == NativeType::WebGLShader) {
|
|
2508
2500
|
auto shader = WebGLShader::GetPointer(value.As<v8::Object>());
|
|
@@ -2556,9 +2548,9 @@ WebGLRenderingContext::GetShaderPrecisionFormat(const v8::FunctionCallbackInfo<v
|
|
|
2556
2548
|
auto isolate = args.GetIsolate();
|
|
2557
2549
|
auto context = isolate->GetCurrentContext();
|
|
2558
2550
|
|
|
2559
|
-
auto shaderType =
|
|
2551
|
+
auto shaderType = args[0]->Uint32Value(
|
|
2560
2552
|
context).ToChecked();
|
|
2561
|
-
auto precisionType =
|
|
2553
|
+
auto precisionType = args[1]->Uint32Value(
|
|
2562
2554
|
context).ToChecked();
|
|
2563
2555
|
auto ret = canvas_native_webgl_get_shader_precision_format(
|
|
2564
2556
|
shaderType,
|
|
@@ -2665,9 +2657,9 @@ WebGLRenderingContext::GetTexParameter(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
2665
2657
|
auto isolate = args.GetIsolate();
|
|
2666
2658
|
auto context = isolate->GetCurrentContext();
|
|
2667
2659
|
|
|
2668
|
-
auto target =
|
|
2660
|
+
auto target = args[0]->Uint32Value(
|
|
2669
2661
|
context).ToChecked();
|
|
2670
|
-
auto pname =
|
|
2662
|
+
auto pname = args[1]->Uint32Value(
|
|
2671
2663
|
context).ToChecked();
|
|
2672
2664
|
auto ret = canvas_native_webgl_get_tex_parameter(
|
|
2673
2665
|
target,
|
|
@@ -2918,9 +2910,9 @@ WebGLRenderingContext::GetVertexAttribOffset(const v8::FunctionCallbackInfo<v8::
|
|
|
2918
2910
|
auto isolate = args.GetIsolate();
|
|
2919
2911
|
auto context = isolate->GetCurrentContext();
|
|
2920
2912
|
|
|
2921
|
-
auto index =
|
|
2913
|
+
auto index = args[0]->Uint32Value(
|
|
2922
2914
|
context).ToChecked();
|
|
2923
|
-
auto pname =
|
|
2915
|
+
auto pname = args[1]->Uint32Value(
|
|
2924
2916
|
context).ToChecked();
|
|
2925
2917
|
auto ret = canvas_native_webgl_get_vertex_attrib_offset(
|
|
2926
2918
|
index,
|
|
@@ -2941,9 +2933,9 @@ WebGLRenderingContext::GetVertexAttrib(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
2941
2933
|
auto context = isolate->GetCurrentContext();
|
|
2942
2934
|
|
|
2943
2935
|
|
|
2944
|
-
auto index =
|
|
2936
|
+
auto index = args[0]->Uint32Value(
|
|
2945
2937
|
context).ToChecked();
|
|
2946
|
-
auto pname =
|
|
2938
|
+
auto pname = args[1]->Uint32Value(
|
|
2947
2939
|
context).ToChecked();
|
|
2948
2940
|
auto ret = canvas_native_webgl_get_vertex_attrib(
|
|
2949
2941
|
index,
|
|
@@ -3006,9 +2998,9 @@ WebGLRenderingContext::Hint(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
|
3006
2998
|
auto isolate = args.GetIsolate();
|
|
3007
2999
|
auto context = isolate->GetCurrentContext();
|
|
3008
3000
|
|
|
3009
|
-
auto target =
|
|
3001
|
+
auto target = args[0]->Uint32Value(
|
|
3010
3002
|
context).ToChecked();
|
|
3011
|
-
auto mode =
|
|
3003
|
+
auto mode = args[1]->Uint32Value(
|
|
3012
3004
|
context).ToChecked();
|
|
3013
3005
|
canvas_native_webgl_hint(target,
|
|
3014
3006
|
mode,
|
|
@@ -3067,7 +3059,7 @@ WebGLRenderingContext::IsEnabled(const v8::FunctionCallbackInfo<v8::Value> &args
|
|
|
3067
3059
|
auto isolate = args.GetIsolate();
|
|
3068
3060
|
auto context = isolate->GetCurrentContext();
|
|
3069
3061
|
|
|
3070
|
-
auto cap =
|
|
3062
|
+
auto cap = args[0]->Uint32Value(
|
|
3071
3063
|
context).ToChecked();
|
|
3072
3064
|
auto ret = canvas_native_webgl_is_enabled(
|
|
3073
3065
|
cap, ptr->GetState());
|
|
@@ -3259,7 +3251,7 @@ WebGLRenderingContext::PixelStorei(const v8::FunctionCallbackInfo<v8::Value> &ar
|
|
|
3259
3251
|
auto isolate = args.GetIsolate();
|
|
3260
3252
|
auto context = isolate->GetCurrentContext();
|
|
3261
3253
|
|
|
3262
|
-
auto pname =
|
|
3254
|
+
auto pname = args[0]->Uint32Value(
|
|
3263
3255
|
context).ToChecked();
|
|
3264
3256
|
if (args[1]->IsBoolean()) {
|
|
3265
3257
|
auto param = args[1]->BooleanValue(isolate);
|
|
@@ -3269,7 +3261,7 @@ WebGLRenderingContext::PixelStorei(const v8::FunctionCallbackInfo<v8::Value> &ar
|
|
|
3269
3261
|
ptr->GetState()
|
|
3270
3262
|
);
|
|
3271
3263
|
} else {
|
|
3272
|
-
auto param =
|
|
3264
|
+
auto param = args[1]->Int32Value(
|
|
3273
3265
|
context).ToChecked();
|
|
3274
3266
|
canvas_native_webgl_pixel_storei(
|
|
3275
3267
|
pname,
|
|
@@ -3312,17 +3304,17 @@ WebGLRenderingContext::ReadPixels(const v8::FunctionCallbackInfo<v8::Value> &arg
|
|
|
3312
3304
|
auto context = isolate->GetCurrentContext();
|
|
3313
3305
|
|
|
3314
3306
|
|
|
3315
|
-
auto x =
|
|
3307
|
+
auto x = args[0]->Int32Value(
|
|
3316
3308
|
context).ToChecked();
|
|
3317
|
-
auto y =
|
|
3309
|
+
auto y = args[1]->Int32Value(
|
|
3318
3310
|
context).ToChecked();
|
|
3319
|
-
auto width =
|
|
3311
|
+
auto width = args[2]->Int32Value(
|
|
3320
3312
|
context).ToChecked();
|
|
3321
|
-
auto height =
|
|
3313
|
+
auto height = args[3]->Int32Value(
|
|
3322
3314
|
context).ToChecked();
|
|
3323
|
-
auto format =
|
|
3315
|
+
auto format = args[4]->Uint32Value(
|
|
3324
3316
|
context).ToChecked();
|
|
3325
|
-
auto type =
|
|
3317
|
+
auto type = args[5]->Uint32Value(
|
|
3326
3318
|
context).ToChecked();
|
|
3327
3319
|
|
|
3328
3320
|
auto pixels = args[6];
|
|
@@ -3380,13 +3372,13 @@ WebGLRenderingContext::RenderbufferStorage(const v8::FunctionCallbackInfo<v8::Va
|
|
|
3380
3372
|
auto isolate = args.GetIsolate();
|
|
3381
3373
|
auto context = isolate->GetCurrentContext();
|
|
3382
3374
|
|
|
3383
|
-
auto target =
|
|
3375
|
+
auto target = args[0]->Uint32Value(
|
|
3384
3376
|
context).ToChecked();
|
|
3385
|
-
auto internalFormat =
|
|
3377
|
+
auto internalFormat = args[1]->Uint32Value(
|
|
3386
3378
|
context).ToChecked();
|
|
3387
|
-
auto width =
|
|
3379
|
+
auto width = args[2]->Int32Value(
|
|
3388
3380
|
context).ToChecked();
|
|
3389
|
-
auto height =
|
|
3381
|
+
auto height = args[3]->Int32Value(
|
|
3390
3382
|
context).ToChecked();
|
|
3391
3383
|
canvas_native_webgl_renderbuffer_storage(
|
|
3392
3384
|
target,
|
|
@@ -3429,13 +3421,13 @@ WebGLRenderingContext::Scissor(const v8::FunctionCallbackInfo<v8::Value> &args)
|
|
|
3429
3421
|
auto isolate = args.GetIsolate();
|
|
3430
3422
|
auto context = isolate->GetCurrentContext();
|
|
3431
3423
|
|
|
3432
|
-
auto x =
|
|
3424
|
+
auto x = args[0]->Int32Value(
|
|
3433
3425
|
context).ToChecked();
|
|
3434
|
-
auto y =
|
|
3426
|
+
auto y = args[1]->Int32Value(
|
|
3435
3427
|
context).ToChecked();
|
|
3436
|
-
auto width =
|
|
3428
|
+
auto width = args[2]->Int32Value(
|
|
3437
3429
|
context).ToChecked();
|
|
3438
|
-
auto height =
|
|
3430
|
+
auto height = args[3]->Int32Value(
|
|
3439
3431
|
context).ToChecked();
|
|
3440
3432
|
canvas_native_webgl_scissor(
|
|
3441
3433
|
x,
|
|
@@ -3459,7 +3451,7 @@ WebGLRenderingContext::ShaderSource(const v8::FunctionCallbackInfo<v8::Value> &a
|
|
|
3459
3451
|
auto value = args[0];
|
|
3460
3452
|
auto type = GetNativeType(isolate, value);
|
|
3461
3453
|
auto sourceValue = args[1];
|
|
3462
|
-
if (type == NativeType::WebGLShader
|
|
3454
|
+
if (type == NativeType::WebGLShader) {
|
|
3463
3455
|
auto shader = WebGLShader::GetPointer(value.As<v8::Object>());
|
|
3464
3456
|
auto source = ConvertFromV8String(isolate, sourceValue);
|
|
3465
3457
|
if (shader != nullptr) {
|
|
@@ -3482,13 +3474,13 @@ WebGLRenderingContext::StencilFuncSeparate(const v8::FunctionCallbackInfo<v8::Va
|
|
|
3482
3474
|
auto isolate = args.GetIsolate();
|
|
3483
3475
|
auto context = isolate->GetCurrentContext();
|
|
3484
3476
|
|
|
3485
|
-
auto face =
|
|
3477
|
+
auto face = args[0]->Uint32Value(
|
|
3486
3478
|
context).ToChecked();
|
|
3487
|
-
auto func =
|
|
3479
|
+
auto func = args[1]->Uint32Value(
|
|
3488
3480
|
context).ToChecked();
|
|
3489
|
-
auto ref =
|
|
3481
|
+
auto ref = args[2]->Int32Value(
|
|
3490
3482
|
context).ToChecked();
|
|
3491
|
-
auto mask =
|
|
3483
|
+
auto mask = args[3]->Uint32Value(
|
|
3492
3484
|
context).ToChecked();
|
|
3493
3485
|
canvas_native_webgl_stencil_func_separate(
|
|
3494
3486
|
face,
|
|
@@ -3510,11 +3502,11 @@ WebGLRenderingContext::StencilFunc(const v8::FunctionCallbackInfo<v8::Value> &ar
|
|
|
3510
3502
|
auto isolate = args.GetIsolate();
|
|
3511
3503
|
auto context = isolate->GetCurrentContext();
|
|
3512
3504
|
|
|
3513
|
-
auto func =
|
|
3505
|
+
auto func = args[0]->Uint32Value(
|
|
3514
3506
|
context).ToChecked();
|
|
3515
|
-
auto ref =
|
|
3507
|
+
auto ref = args[1]->Int32Value(
|
|
3516
3508
|
context).ToChecked();
|
|
3517
|
-
auto mask =
|
|
3509
|
+
auto mask = args[2]->Uint32Value(
|
|
3518
3510
|
context).ToChecked();
|
|
3519
3511
|
canvas_native_webgl_stencil_func(
|
|
3520
3512
|
func,
|
|
@@ -3535,9 +3527,9 @@ WebGLRenderingContext::StencilMaskSeparate(const v8::FunctionCallbackInfo<v8::Va
|
|
|
3535
3527
|
auto isolate = args.GetIsolate();
|
|
3536
3528
|
auto context = isolate->GetCurrentContext();
|
|
3537
3529
|
|
|
3538
|
-
auto face =
|
|
3530
|
+
auto face = args[0]->Uint32Value(
|
|
3539
3531
|
context).ToChecked();
|
|
3540
|
-
auto mask =
|
|
3532
|
+
auto mask = args[1]->Uint32Value(
|
|
3541
3533
|
context).ToChecked();
|
|
3542
3534
|
canvas_native_webgl_stencil_mask_separate(
|
|
3543
3535
|
face,
|
|
@@ -3557,7 +3549,7 @@ WebGLRenderingContext::StencilMask(const v8::FunctionCallbackInfo<v8::Value> &ar
|
|
|
3557
3549
|
auto isolate = args.GetIsolate();
|
|
3558
3550
|
auto context = isolate->GetCurrentContext();
|
|
3559
3551
|
|
|
3560
|
-
auto mask =
|
|
3552
|
+
auto mask = args[0]->Uint32Value(
|
|
3561
3553
|
context).ToChecked();
|
|
3562
3554
|
canvas_native_webgl_stencil_mask(
|
|
3563
3555
|
mask,
|
|
@@ -3577,13 +3569,13 @@ WebGLRenderingContext::StencilOpSeparate(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3577
3569
|
auto context = isolate->GetCurrentContext();
|
|
3578
3570
|
|
|
3579
3571
|
|
|
3580
|
-
auto face =
|
|
3572
|
+
auto face = args[0]->Uint32Value(
|
|
3581
3573
|
context).ToChecked();
|
|
3582
|
-
auto fail =
|
|
3574
|
+
auto fail = args[1]->Uint32Value(
|
|
3583
3575
|
context).ToChecked();
|
|
3584
|
-
auto zfail =
|
|
3576
|
+
auto zfail = args[2]->Uint32Value(
|
|
3585
3577
|
context).ToChecked();
|
|
3586
|
-
auto zpass =
|
|
3578
|
+
auto zpass = args[3]->Uint32Value(
|
|
3587
3579
|
context).ToChecked();
|
|
3588
3580
|
canvas_native_webgl_stencil_op_separate(
|
|
3589
3581
|
face,
|
|
@@ -3605,11 +3597,11 @@ WebGLRenderingContext::StencilOp(const v8::FunctionCallbackInfo<v8::Value> &args
|
|
|
3605
3597
|
auto isolate = args.GetIsolate();
|
|
3606
3598
|
auto context = isolate->GetCurrentContext();
|
|
3607
3599
|
|
|
3608
|
-
auto fail =
|
|
3600
|
+
auto fail = args[0]->Uint32Value(
|
|
3609
3601
|
context).ToChecked();
|
|
3610
|
-
auto zfail =
|
|
3602
|
+
auto zfail = args[1]->Uint32Value(
|
|
3611
3603
|
context).ToChecked();
|
|
3612
|
-
auto zpass =
|
|
3604
|
+
auto zpass = args[2]->Uint32Value(
|
|
3613
3605
|
context).ToChecked();
|
|
3614
3606
|
canvas_native_webgl_stencil_op(
|
|
3615
3607
|
fail,
|
|
@@ -3636,15 +3628,15 @@ WebGLRenderingContext::TexImage2D(const v8::FunctionCallbackInfo<v8::Value> &arg
|
|
|
3636
3628
|
// TODO tidy
|
|
3637
3629
|
|
|
3638
3630
|
if (count == 5) {
|
|
3639
|
-
auto target =
|
|
3631
|
+
auto target = args[0]->Int32Value(
|
|
3640
3632
|
context).ToChecked();
|
|
3641
|
-
auto level =
|
|
3633
|
+
auto level = args[1]->Int32Value(
|
|
3642
3634
|
context).ToChecked();
|
|
3643
|
-
auto internalformat =
|
|
3635
|
+
auto internalformat = args[2]->Int32Value(
|
|
3644
3636
|
context).ToChecked();
|
|
3645
|
-
auto format =
|
|
3637
|
+
auto format = args[3]->Int32Value(
|
|
3646
3638
|
context).ToChecked();
|
|
3647
|
-
auto type =
|
|
3639
|
+
auto type = args[4]->Int32Value(
|
|
3648
3640
|
context).ToChecked();
|
|
3649
3641
|
|
|
3650
3642
|
canvas_native_webgl_tex_image2d_image_none(
|
|
@@ -3657,15 +3649,15 @@ WebGLRenderingContext::TexImage2D(const v8::FunctionCallbackInfo<v8::Value> &arg
|
|
|
3657
3649
|
);
|
|
3658
3650
|
|
|
3659
3651
|
} else if (count == 6) {
|
|
3660
|
-
auto target =
|
|
3652
|
+
auto target = args[0]->Int32Value(
|
|
3661
3653
|
context).ToChecked();
|
|
3662
|
-
auto level =
|
|
3654
|
+
auto level = args[1]->Int32Value(
|
|
3663
3655
|
context).ToChecked();
|
|
3664
|
-
auto internalformat =
|
|
3656
|
+
auto internalformat = args[2]->Int32Value(
|
|
3665
3657
|
context).ToChecked();
|
|
3666
|
-
auto format =
|
|
3658
|
+
auto format = args[3]->Int32Value(
|
|
3667
3659
|
context).ToChecked();
|
|
3668
|
-
auto type =
|
|
3660
|
+
auto type = args[4]->Int32Value(
|
|
3669
3661
|
context).ToChecked();
|
|
3670
3662
|
|
|
3671
3663
|
auto pixels = args[5];
|
|
@@ -3746,21 +3738,21 @@ WebGLRenderingContext::TexImage2D(const v8::FunctionCallbackInfo<v8::Value> &arg
|
|
|
3746
3738
|
break;
|
|
3747
3739
|
}
|
|
3748
3740
|
} else if (count == 8) {
|
|
3749
|
-
auto target =
|
|
3741
|
+
auto target = args[0]->Int32Value(
|
|
3750
3742
|
context).ToChecked();
|
|
3751
|
-
auto level =
|
|
3743
|
+
auto level = args[1]->Int32Value(
|
|
3752
3744
|
context).ToChecked();
|
|
3753
|
-
auto internalformat =
|
|
3745
|
+
auto internalformat = args[2]->Int32Value(
|
|
3754
3746
|
context).ToChecked();
|
|
3755
|
-
auto width =
|
|
3747
|
+
auto width = args[3]->Int32Value(
|
|
3756
3748
|
context).ToChecked();
|
|
3757
|
-
auto height =
|
|
3749
|
+
auto height = args[4]->Int32Value(
|
|
3758
3750
|
context).ToChecked();
|
|
3759
|
-
auto border =
|
|
3751
|
+
auto border = args[5]->Int32Value(
|
|
3760
3752
|
context).ToChecked();
|
|
3761
|
-
auto format =
|
|
3753
|
+
auto format = args[6]->Int32Value(
|
|
3762
3754
|
context).ToChecked();
|
|
3763
|
-
auto type =
|
|
3755
|
+
auto type = args[7]->Int32Value(
|
|
3764
3756
|
context).ToChecked();
|
|
3765
3757
|
canvas_native_webgl_tex_image2d_none(
|
|
3766
3758
|
target,
|
|
@@ -3774,21 +3766,21 @@ WebGLRenderingContext::TexImage2D(const v8::FunctionCallbackInfo<v8::Value> &arg
|
|
|
3774
3766
|
ptr->GetState()
|
|
3775
3767
|
);
|
|
3776
3768
|
} else if (count == 9) {
|
|
3777
|
-
auto target =
|
|
3769
|
+
auto target = args[0]->Int32Value(
|
|
3778
3770
|
context).ToChecked();
|
|
3779
|
-
auto level =
|
|
3771
|
+
auto level = args[1]->Int32Value(
|
|
3780
3772
|
context).ToChecked();
|
|
3781
|
-
auto internalformat =
|
|
3773
|
+
auto internalformat = args[2]->Int32Value(
|
|
3782
3774
|
context).ToChecked();
|
|
3783
|
-
auto width =
|
|
3775
|
+
auto width = args[3]->Int32Value(
|
|
3784
3776
|
context).ToChecked();
|
|
3785
|
-
auto height =
|
|
3777
|
+
auto height = args[4]->Int32Value(
|
|
3786
3778
|
context).ToChecked();
|
|
3787
|
-
auto border =
|
|
3779
|
+
auto border = args[5]->Int32Value(
|
|
3788
3780
|
context).ToChecked();
|
|
3789
|
-
auto format =
|
|
3781
|
+
auto format = args[6]->Int32Value(
|
|
3790
3782
|
context).ToChecked();
|
|
3791
|
-
auto type =
|
|
3783
|
+
auto type = args[7]->Int32Value(
|
|
3792
3784
|
context).ToChecked();
|
|
3793
3785
|
|
|
3794
3786
|
|
|
@@ -3863,9 +3855,9 @@ WebGLRenderingContext::TexParameterf(const v8::FunctionCallbackInfo<v8::Value> &
|
|
|
3863
3855
|
auto isolate = args.GetIsolate();
|
|
3864
3856
|
auto context = isolate->GetCurrentContext();
|
|
3865
3857
|
|
|
3866
|
-
auto target =
|
|
3858
|
+
auto target = args[0]->Uint32Value(
|
|
3867
3859
|
context).ToChecked();
|
|
3868
|
-
auto pname =
|
|
3860
|
+
auto pname = args[1]->Uint32Value(
|
|
3869
3861
|
context).ToChecked();
|
|
3870
3862
|
auto param = args[2]->NumberValue(
|
|
3871
3863
|
context).ToChecked();
|
|
@@ -3888,11 +3880,11 @@ WebGLRenderingContext::TexParameteri(const v8::FunctionCallbackInfo<v8::Value> &
|
|
|
3888
3880
|
auto isolate = args.GetIsolate();
|
|
3889
3881
|
auto context = isolate->GetCurrentContext();
|
|
3890
3882
|
|
|
3891
|
-
auto target =
|
|
3883
|
+
auto target = args[0]->Uint32Value(
|
|
3892
3884
|
context).ToChecked();
|
|
3893
|
-
auto pname =
|
|
3885
|
+
auto pname = args[1]->Uint32Value(
|
|
3894
3886
|
context).ToChecked();
|
|
3895
|
-
auto param =
|
|
3887
|
+
auto param = args[2]->Int32Value(
|
|
3896
3888
|
context).ToChecked();
|
|
3897
3889
|
canvas_native_webgl_tex_parameteri(
|
|
3898
3890
|
target,
|
|
@@ -3915,17 +3907,17 @@ WebGLRenderingContext::TexSubImage2D(const v8::FunctionCallbackInfo<v8::Value> &
|
|
|
3915
3907
|
|
|
3916
3908
|
auto count = args.Length();
|
|
3917
3909
|
if (count == 7) {
|
|
3918
|
-
auto target =
|
|
3910
|
+
auto target = args[0]->Uint32Value(
|
|
3919
3911
|
context).ToChecked();
|
|
3920
|
-
auto level =
|
|
3912
|
+
auto level = args[1]->Int32Value(
|
|
3921
3913
|
context).ToChecked();
|
|
3922
|
-
auto xoffset =
|
|
3914
|
+
auto xoffset = args[2]->Int32Value(
|
|
3923
3915
|
context).ToChecked();
|
|
3924
|
-
auto yoffset =
|
|
3916
|
+
auto yoffset = args[3]->Int32Value(
|
|
3925
3917
|
context).ToChecked();
|
|
3926
|
-
auto format =
|
|
3918
|
+
auto format = args[4]->Uint32Value(
|
|
3927
3919
|
context).ToChecked();
|
|
3928
|
-
auto type =
|
|
3920
|
+
auto type = args[5]->Int32Value(
|
|
3929
3921
|
context).ToChecked();
|
|
3930
3922
|
|
|
3931
3923
|
|
|
@@ -4006,21 +3998,21 @@ WebGLRenderingContext::TexSubImage2D(const v8::FunctionCallbackInfo<v8::Value> &
|
|
|
4006
3998
|
}
|
|
4007
3999
|
|
|
4008
4000
|
} else if (count == 9) {
|
|
4009
|
-
auto target =
|
|
4001
|
+
auto target = args[0]->Uint32Value(
|
|
4010
4002
|
context).ToChecked();
|
|
4011
|
-
auto level =
|
|
4003
|
+
auto level = args[1]->Int32Value(
|
|
4012
4004
|
context).ToChecked();
|
|
4013
|
-
auto xoffset =
|
|
4005
|
+
auto xoffset = args[2]->Int32Value(
|
|
4014
4006
|
context).ToChecked();
|
|
4015
|
-
auto yoffset =
|
|
4007
|
+
auto yoffset = args[3]->Int32Value(
|
|
4016
4008
|
context).ToChecked();
|
|
4017
|
-
auto width =
|
|
4009
|
+
auto width = args[4]->Int32Value(
|
|
4018
4010
|
context).ToChecked();
|
|
4019
|
-
auto height =
|
|
4011
|
+
auto height = args[5]->Int32Value(
|
|
4020
4012
|
context).ToChecked();
|
|
4021
|
-
auto format =
|
|
4013
|
+
auto format = args[6]->Uint32Value(
|
|
4022
4014
|
context).ToChecked();
|
|
4023
|
-
auto type =
|
|
4015
|
+
auto type = args[7]->Int32Value(
|
|
4024
4016
|
context).ToChecked();
|
|
4025
4017
|
|
|
4026
4018
|
auto pixels = args[8];
|
|
@@ -4083,7 +4075,7 @@ WebGLRenderingContext::VertexAttrib1f(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
4083
4075
|
auto isolate = args.GetIsolate();
|
|
4084
4076
|
auto context = isolate->GetCurrentContext();
|
|
4085
4077
|
|
|
4086
|
-
auto index =
|
|
4078
|
+
auto index = args[0]->Uint32Value(
|
|
4087
4079
|
context).ToChecked();
|
|
4088
4080
|
auto v0 = static_cast<float>(args[1]->NumberValue(
|
|
4089
4081
|
context).ToChecked());
|
|
@@ -4102,7 +4094,7 @@ WebGLRenderingContext::VertexAttrib2f(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
4102
4094
|
auto isolate = args.GetIsolate();
|
|
4103
4095
|
auto context = isolate->GetCurrentContext();
|
|
4104
4096
|
|
|
4105
|
-
auto index =
|
|
4097
|
+
auto index = args[0]->Uint32Value(
|
|
4106
4098
|
context).ToChecked();
|
|
4107
4099
|
auto v0 = static_cast<float>(args[1]->NumberValue(
|
|
4108
4100
|
context).ToChecked());
|
|
@@ -4124,7 +4116,7 @@ WebGLRenderingContext::VertexAttrib3f(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
4124
4116
|
auto isolate = args.GetIsolate();
|
|
4125
4117
|
auto context = isolate->GetCurrentContext();
|
|
4126
4118
|
|
|
4127
|
-
auto index =
|
|
4119
|
+
auto index = args[0]->Uint32Value(
|
|
4128
4120
|
context).ToChecked();
|
|
4129
4121
|
auto v0 = static_cast<float>(args[1]->NumberValue(
|
|
4130
4122
|
context).ToChecked());
|
|
@@ -4148,7 +4140,7 @@ WebGLRenderingContext::VertexAttrib4f(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
4148
4140
|
auto isolate = args.GetIsolate();
|
|
4149
4141
|
auto context = isolate->GetCurrentContext();
|
|
4150
4142
|
|
|
4151
|
-
auto index =
|
|
4143
|
+
auto index = args[0]->Uint32Value(
|
|
4152
4144
|
context).ToChecked();
|
|
4153
4145
|
auto v0 = static_cast<float>(args[1]->NumberValue(
|
|
4154
4146
|
context).ToChecked());
|
|
@@ -4174,7 +4166,7 @@ WebGLRenderingContext::VertexAttrib1fv(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
4174
4166
|
auto isolate = args.GetIsolate();
|
|
4175
4167
|
auto context = isolate->GetCurrentContext();
|
|
4176
4168
|
|
|
4177
|
-
auto index =
|
|
4169
|
+
auto index = args[0]->Uint32Value(
|
|
4178
4170
|
context).ToChecked();
|
|
4179
4171
|
|
|
4180
4172
|
auto value = args[1];
|
|
@@ -4204,7 +4196,7 @@ WebGLRenderingContext::VertexAttrib2fv(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
4204
4196
|
auto isolate = args.GetIsolate();
|
|
4205
4197
|
auto context = isolate->GetCurrentContext();
|
|
4206
4198
|
|
|
4207
|
-
auto index =
|
|
4199
|
+
auto index = args[0]->Uint32Value(
|
|
4208
4200
|
context).ToChecked();
|
|
4209
4201
|
|
|
4210
4202
|
auto value = args[1];
|
|
@@ -4234,7 +4226,7 @@ WebGLRenderingContext::VertexAttrib3fv(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
4234
4226
|
auto isolate = args.GetIsolate();
|
|
4235
4227
|
auto context = isolate->GetCurrentContext();
|
|
4236
4228
|
|
|
4237
|
-
auto index =
|
|
4229
|
+
auto index = args[0]->Uint32Value(
|
|
4238
4230
|
context).ToChecked();
|
|
4239
4231
|
|
|
4240
4232
|
auto value = args[1];
|
|
@@ -4264,7 +4256,7 @@ WebGLRenderingContext::VertexAttrib4fv(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
4264
4256
|
auto isolate = args.GetIsolate();
|
|
4265
4257
|
auto context = isolate->GetCurrentContext();
|
|
4266
4258
|
|
|
4267
|
-
auto index =
|
|
4259
|
+
auto index = args[0]->Uint32Value(
|
|
4268
4260
|
context).ToChecked();
|
|
4269
4261
|
|
|
4270
4262
|
auto value = args[1];
|
|
@@ -4294,14 +4286,14 @@ WebGLRenderingContext::VertexAttribPointer(const v8::FunctionCallbackInfo<v8::Va
|
|
|
4294
4286
|
auto isolate = args.GetIsolate();
|
|
4295
4287
|
auto context = isolate->GetCurrentContext();
|
|
4296
4288
|
|
|
4297
|
-
auto index =
|
|
4289
|
+
auto index = args[0]->Uint32Value(
|
|
4298
4290
|
context).ToChecked();
|
|
4299
|
-
auto size =
|
|
4291
|
+
auto size = args[1]->Int32Value(
|
|
4300
4292
|
context).ToChecked();
|
|
4301
|
-
auto type =
|
|
4293
|
+
auto type = args[2]->Uint32Value(
|
|
4302
4294
|
context).ToChecked();
|
|
4303
4295
|
auto normalized = args[3]->BooleanValue(isolate);
|
|
4304
|
-
auto stride =
|
|
4296
|
+
auto stride = args[4]->Int32Value(
|
|
4305
4297
|
context).ToChecked();
|
|
4306
4298
|
auto offset = static_cast<ssize_t>(args[5]->NumberValue(
|
|
4307
4299
|
context).ToChecked());
|
|
@@ -4662,12 +4654,12 @@ WebGLRenderingContext::Uniform1i(const v8::FunctionCallbackInfo<v8::Value> &args
|
|
|
4662
4654
|
|
|
4663
4655
|
auto value = args[0];
|
|
4664
4656
|
auto location = WebGLUniformLocation::GetPointer(value.As<v8::Object>());
|
|
4665
|
-
auto v0 = args[1]->
|
|
4657
|
+
auto v0 = args[1]->Int32Value(
|
|
4666
4658
|
context).ToChecked();
|
|
4667
4659
|
if (location != nullptr) {
|
|
4668
4660
|
canvas_native_webgl_uniform1i(
|
|
4669
4661
|
location->GetUniformLocation(),
|
|
4670
|
-
|
|
4662
|
+
v0,
|
|
4671
4663
|
ptr->GetState()
|
|
4672
4664
|
);
|
|
4673
4665
|
}
|
|
@@ -4685,15 +4677,15 @@ WebGLRenderingContext::Uniform2i(const v8::FunctionCallbackInfo<v8::Value> &args
|
|
|
4685
4677
|
|
|
4686
4678
|
auto value = args[0];
|
|
4687
4679
|
auto location = WebGLUniformLocation::GetPointer(value.As<v8::Object>());
|
|
4688
|
-
auto v0 = args[1]->
|
|
4680
|
+
auto v0 = args[1]->Int32Value(
|
|
4689
4681
|
context).ToChecked();
|
|
4690
|
-
auto v1 = args[2]->
|
|
4682
|
+
auto v1 = args[2]->Int32Value(
|
|
4691
4683
|
context).ToChecked();
|
|
4692
4684
|
if (location != nullptr) {
|
|
4693
4685
|
canvas_native_webgl_uniform2i(
|
|
4694
4686
|
location->GetUniformLocation(),
|
|
4695
|
-
|
|
4696
|
-
|
|
4687
|
+
v0,
|
|
4688
|
+
v1,
|
|
4697
4689
|
ptr->GetState()
|
|
4698
4690
|
);
|
|
4699
4691
|
}
|
|
@@ -4711,18 +4703,18 @@ WebGLRenderingContext::Uniform3i(const v8::FunctionCallbackInfo<v8::Value> &args
|
|
|
4711
4703
|
|
|
4712
4704
|
auto value = args[0];
|
|
4713
4705
|
auto location = WebGLUniformLocation::GetPointer(value.As<v8::Object>());
|
|
4714
|
-
auto v0 = args[1]->
|
|
4706
|
+
auto v0 = args[1]->Int32Value(
|
|
4715
4707
|
context).ToChecked();
|
|
4716
|
-
auto v1 = args[2]->
|
|
4708
|
+
auto v1 = args[2]->Int32Value(
|
|
4717
4709
|
context).ToChecked();
|
|
4718
|
-
auto v2 = args[3]->
|
|
4710
|
+
auto v2 = args[3]->Int32Value(
|
|
4719
4711
|
context).ToChecked();
|
|
4720
4712
|
if (location != nullptr) {
|
|
4721
4713
|
canvas_native_webgl_uniform3i(
|
|
4722
4714
|
location->GetUniformLocation(),
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4715
|
+
v0,
|
|
4716
|
+
v1,
|
|
4717
|
+
v2,
|
|
4726
4718
|
ptr->GetState()
|
|
4727
4719
|
);
|
|
4728
4720
|
}
|
|
@@ -4740,21 +4732,21 @@ WebGLRenderingContext::Uniform4i(const v8::FunctionCallbackInfo<v8::Value> &args
|
|
|
4740
4732
|
|
|
4741
4733
|
auto value = args[0];
|
|
4742
4734
|
auto location = WebGLUniformLocation::GetPointer(value.As<v8::Object>());
|
|
4743
|
-
auto v0 = args[1]->
|
|
4735
|
+
auto v0 = args[1]->Int32Value(
|
|
4744
4736
|
context).ToChecked();
|
|
4745
|
-
auto v1 = args[2]->
|
|
4737
|
+
auto v1 = args[2]->Int32Value(
|
|
4746
4738
|
context).ToChecked();
|
|
4747
|
-
auto v2 = args[3]->
|
|
4739
|
+
auto v2 = args[3]->Int32Value(
|
|
4748
4740
|
context).ToChecked();
|
|
4749
|
-
auto v3 = args[4]->
|
|
4741
|
+
auto v3 = args[4]->Int32Value(
|
|
4750
4742
|
context).ToChecked();
|
|
4751
4743
|
if (location != nullptr) {
|
|
4752
4744
|
canvas_native_webgl_uniform4i(
|
|
4753
4745
|
location->GetUniformLocation(),
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4746
|
+
v0,
|
|
4747
|
+
v1,
|
|
4748
|
+
v2,
|
|
4749
|
+
v3,
|
|
4758
4750
|
ptr->GetState()
|
|
4759
4751
|
);
|
|
4760
4752
|
}
|
|
@@ -5223,13 +5215,13 @@ WebGLRenderingContext::Viewport(const v8::FunctionCallbackInfo<v8::Value> &args)
|
|
|
5223
5215
|
auto isolate = args.GetIsolate();
|
|
5224
5216
|
auto context = isolate->GetCurrentContext();
|
|
5225
5217
|
|
|
5226
|
-
auto x =
|
|
5218
|
+
auto x = args[0]->Int32Value(
|
|
5227
5219
|
context).ToChecked();
|
|
5228
|
-
auto y =
|
|
5220
|
+
auto y = args[1]->Int32Value(
|
|
5229
5221
|
context).ToChecked();
|
|
5230
|
-
auto width =
|
|
5222
|
+
auto width = args[2]->Int32Value(
|
|
5231
5223
|
context).ToChecked();
|
|
5232
|
-
auto height =
|
|
5224
|
+
auto height = args[3]->Int32Value(
|
|
5233
5225
|
context).ToChecked();
|
|
5234
5226
|
canvas_native_webgl_viewport(x, y,
|
|
5235
5227
|
width,
|
|
@@ -5272,446 +5264,473 @@ WebGLRenderingContext::__ToDataURL(const v8::FunctionCallbackInfo<v8::Value> &ar
|
|
|
5272
5264
|
|
|
5273
5265
|
void WebGLRenderingContext::SetConstants(v8::Isolate *isolate,
|
|
5274
5266
|
const v8::Local<v8::ObjectTemplate> &tmpl) {
|
|
5275
|
-
tmpl->Set(isolate, "DEPTH_BUFFER_BIT", v8::
|
|
5267
|
+
tmpl->Set(isolate, "DEPTH_BUFFER_BIT", v8::Integer::NewFromUnsigned(isolate, 0x00000100));
|
|
5276
5268
|
|
|
5277
|
-
tmpl->Set(isolate, "STENCIL_BUFFER_BIT", v8::
|
|
5269
|
+
tmpl->Set(isolate, "STENCIL_BUFFER_BIT", v8::Integer::NewFromUnsigned(isolate, 0x00000400));
|
|
5278
5270
|
|
|
5279
|
-
tmpl->Set(isolate, "COLOR_BUFFER_BIT", v8::
|
|
5271
|
+
tmpl->Set(isolate, "COLOR_BUFFER_BIT", v8::Integer::NewFromUnsigned(isolate, 0x00004000));
|
|
5280
5272
|
|
|
5281
|
-
tmpl->Set(isolate, "POINTS", v8::
|
|
5273
|
+
tmpl->Set(isolate, "POINTS", v8::Integer::NewFromUnsigned(isolate, 0x0000));
|
|
5282
5274
|
|
|
5283
|
-
tmpl->Set(isolate, "LINES", v8::
|
|
5275
|
+
tmpl->Set(isolate, "LINES", v8::Integer::NewFromUnsigned(isolate, 0x0001));
|
|
5284
5276
|
|
|
5285
|
-
tmpl->Set(isolate, "LINE_LOOP", v8::
|
|
5277
|
+
tmpl->Set(isolate, "LINE_LOOP", v8::Integer::NewFromUnsigned(isolate, 0x0002));
|
|
5286
5278
|
|
|
5287
|
-
tmpl->Set(isolate, "LINE_STRIP", v8::
|
|
5279
|
+
tmpl->Set(isolate, "LINE_STRIP", v8::Integer::NewFromUnsigned(isolate, 0x0003));
|
|
5288
5280
|
|
|
5289
|
-
tmpl->Set(isolate, "TRIANGLES", v8::
|
|
5281
|
+
tmpl->Set(isolate, "TRIANGLES", v8::Integer::NewFromUnsigned(isolate, 0x0004));
|
|
5290
5282
|
|
|
5291
|
-
tmpl->Set(isolate, "TRIANGLE_STRIP", v8::
|
|
5283
|
+
tmpl->Set(isolate, "TRIANGLE_STRIP", v8::Integer::NewFromUnsigned(isolate, 0x0005));
|
|
5292
5284
|
|
|
5293
|
-
tmpl->Set(isolate, "TRIANGLE_FAN", v8::
|
|
5285
|
+
tmpl->Set(isolate, "TRIANGLE_FAN", v8::Integer::NewFromUnsigned(isolate, 0x0006));
|
|
5294
5286
|
|
|
5295
|
-
tmpl->Set(isolate, "ZERO", v8::
|
|
5287
|
+
tmpl->Set(isolate, "ZERO", v8::Integer::NewFromUnsigned(isolate, 0));
|
|
5296
5288
|
|
|
5297
|
-
tmpl->Set(isolate, "ONE", v8::
|
|
5289
|
+
tmpl->Set(isolate, "ONE", v8::Integer::NewFromUnsigned(isolate, 1));
|
|
5298
5290
|
|
|
5299
|
-
tmpl->Set(isolate, "SRC_COLOR", v8::
|
|
5291
|
+
tmpl->Set(isolate, "SRC_COLOR", v8::Integer::NewFromUnsigned(isolate, 0x0300));
|
|
5300
5292
|
|
|
5301
|
-
tmpl->Set(isolate, "ONE_MINUS_SRC_COLOR", v8::
|
|
5293
|
+
tmpl->Set(isolate, "ONE_MINUS_SRC_COLOR", v8::Integer::NewFromUnsigned(isolate, 0x0301));
|
|
5302
5294
|
|
|
5303
|
-
tmpl->Set(isolate, "SRC_ALPHA", v8::
|
|
5295
|
+
tmpl->Set(isolate, "SRC_ALPHA", v8::Integer::NewFromUnsigned(isolate, 0x0302));
|
|
5304
5296
|
|
|
5305
|
-
tmpl->Set(isolate, "ONE_MINUS_SRC_ALPHA", v8::
|
|
5297
|
+
tmpl->Set(isolate, "ONE_MINUS_SRC_ALPHA", v8::Integer::NewFromUnsigned(isolate, 0x0303));
|
|
5306
5298
|
|
|
5307
|
-
tmpl->Set(isolate, "DST_ALPHA", v8::
|
|
5299
|
+
tmpl->Set(isolate, "DST_ALPHA", v8::Integer::NewFromUnsigned(isolate, 0x0304));
|
|
5308
5300
|
|
|
5309
|
-
tmpl->Set(isolate, "ONE_MINUS_DST_ALPHA", v8::
|
|
5301
|
+
tmpl->Set(isolate, "ONE_MINUS_DST_ALPHA", v8::Integer::NewFromUnsigned(isolate, 0x0305));
|
|
5310
5302
|
|
|
5311
|
-
tmpl->Set(isolate, "DST_COLOR", v8::
|
|
5303
|
+
tmpl->Set(isolate, "DST_COLOR", v8::Integer::NewFromUnsigned(isolate, 0x0306));
|
|
5312
5304
|
|
|
5313
|
-
tmpl->Set(isolate, "ONE_MINUS_DST_COLOR", v8::
|
|
5305
|
+
tmpl->Set(isolate, "ONE_MINUS_DST_COLOR", v8::Integer::NewFromUnsigned(isolate, 0x0307));
|
|
5314
5306
|
|
|
5315
|
-
tmpl->Set(isolate, "SRC_ALPHA_SATURATE", v8::
|
|
5307
|
+
tmpl->Set(isolate, "SRC_ALPHA_SATURATE", v8::Integer::NewFromUnsigned(isolate, 0x0308));
|
|
5316
5308
|
|
|
5317
5309
|
|
|
5318
|
-
tmpl->Set(isolate, "CONSTANT_COLOR", v8::
|
|
5319
|
-
tmpl->Set(isolate, "ONE_MINUS_CONSTANT_COLOR", v8::
|
|
5320
|
-
tmpl->Set(isolate, "CONSTANT_ALPHA", v8::
|
|
5321
|
-
tmpl->Set(isolate, "ONE_MINUS_CONSTANT_ALPHA", v8::
|
|
5310
|
+
tmpl->Set(isolate, "CONSTANT_COLOR", v8::Integer::NewFromUnsigned(isolate, 0x8001));
|
|
5311
|
+
tmpl->Set(isolate, "ONE_MINUS_CONSTANT_COLOR", v8::Integer::NewFromUnsigned(isolate, 0x8002));
|
|
5312
|
+
tmpl->Set(isolate, "CONSTANT_ALPHA", v8::Integer::NewFromUnsigned(isolate, 0x8003));
|
|
5313
|
+
tmpl->Set(isolate, "ONE_MINUS_CONSTANT_ALPHA", v8::Integer::NewFromUnsigned(isolate, 0x8004));
|
|
5322
5314
|
|
|
5323
5315
|
|
|
5324
5316
|
/* Blending equations */
|
|
5325
5317
|
|
|
5326
|
-
tmpl->Set(isolate, "FUNC_ADD", v8::
|
|
5327
|
-
tmpl->Set(isolate, "FUNC_SUBTRACT", v8::
|
|
5328
|
-
tmpl->Set(isolate, "FUNC_REVERSE_SUBTRACT", v8::
|
|
5329
|
-
tmpl->Set(isolate, "BLEND_EQUATION", v8::
|
|
5330
|
-
tmpl->Set(isolate, "BLEND_EQUATION_RGB", v8::
|
|
5331
|
-
tmpl->Set(isolate, "BLEND_EQUATION_ALPHA", v8::
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
tmpl->Set(isolate, "BLEND_DST_RGB", v8::Uint32::New(isolate, 0x80C8));
|
|
5335
|
-
tmpl->Set(isolate, "BLEND_SRC_RGB", v8::Uint32::New(isolate, 0x80C9));
|
|
5336
|
-
tmpl->Set(isolate, "BLEND_DST_ALPHA", v8::Uint32::New(isolate, 0x80CA));
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
tmpl->Set(isolate, "BLEND_SRC_ALPHA", v8::Uint32::New(isolate, 0x80CB));
|
|
5340
|
-
tmpl->Set(isolate, "BLEND_COLOR", v8::Uint32::New(isolate, 0x8005));
|
|
5341
|
-
tmpl->Set(isolate, "ARRAY_BUFFER_BINDING", v8::Uint32::New(isolate, 0x8894));
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
tmpl->Set(isolate, "ELEMENT_ARRAY_BUFFER_BINDING", v8::Uint32::New(isolate, 0x8895));
|
|
5345
|
-
tmpl->Set(isolate, "LINE_WIDTH", v8::Uint32::New(isolate, 0x0B21));
|
|
5346
|
-
tmpl->Set(isolate, "ALIASED_POINT_SIZE_RANGE", v8::Uint32::New(isolate, 0x846D));
|
|
5347
|
-
|
|
5348
|
-
tmpl->Set(isolate, "ALIASED_LINE_WIDTH_RANGE", v8::Uint32::New(isolate, 0x846E));
|
|
5349
|
-
tmpl->Set(isolate, "CULL_FACE_MODE", v8::Uint32::New(isolate, 0x0B45));
|
|
5350
|
-
tmpl->Set(isolate, "FRONT_FACE", v8::Uint32::New(isolate, 0x0B46));
|
|
5351
|
-
|
|
5352
|
-
tmpl->Set(isolate, "DEPTH_RANGE", v8::Uint32::New(isolate, 0x0B70));
|
|
5353
|
-
tmpl->Set(isolate, "DEPTH_WRITEMASK", v8::Uint32::New(isolate, 0x0B72));
|
|
5354
|
-
tmpl->Set(isolate, "DEPTH_CLEAR_VALUE", v8::Uint32::New(isolate, 0x0B73));
|
|
5355
|
-
|
|
5356
|
-
tmpl->Set(isolate, "DEPTH_FUNC", v8::Uint32::New(isolate, 0x0B74));
|
|
5357
|
-
tmpl->Set(isolate, "STENCIL_CLEAR_VALUE", v8::Uint32::New(isolate, 0x0B91));
|
|
5358
|
-
tmpl->Set(isolate, "STENCIL_FUNC", v8::Uint32::New(isolate, 0x0B92));
|
|
5359
|
-
|
|
5360
|
-
tmpl->Set(isolate, "STENCIL_FAIL", v8::Uint32::New(isolate, 0x0B94));
|
|
5361
|
-
tmpl->Set(isolate, "STENCIL_PASS_DEPTH_FAIL", v8::Uint32::New(isolate, 0x0B95));
|
|
5362
|
-
tmpl->Set(isolate, "STENCIL_PASS_DEPTH_PASS", v8::Uint32::New(isolate, 0x0B96));
|
|
5363
|
-
|
|
5364
|
-
tmpl->Set(isolate, "STENCIL_REF", v8::Uint32::New(isolate, 0x0B97));
|
|
5365
|
-
tmpl->Set(isolate, "STENCIL_VALUE_MASK", v8::Uint32::New(isolate, 0x0B93));
|
|
5366
|
-
tmpl->Set(isolate, "STENCIL_WRITEMASK", v8::Uint32::New(isolate, 0x0B98));
|
|
5367
|
-
|
|
5368
|
-
tmpl->Set(isolate, "STENCIL_BACK_FUNC", v8::Uint32::New(isolate, 0x8800));
|
|
5369
|
-
tmpl->Set(isolate, "STENCIL_BACK_FAIL", v8::Uint32::New(isolate, 0x8801));
|
|
5370
|
-
tmpl->Set(isolate, "STENCIL_BACK_PASS_DEPTH_FAIL", v8::Uint32::New(isolate, 0x8802));
|
|
5371
|
-
|
|
5372
|
-
tmpl->Set(isolate, "STENCIL_BACK_PASS_DEPTH_PASS", v8::Uint32::New(isolate, 0x8803));
|
|
5373
|
-
tmpl->Set(isolate, "STENCIL_BACK_REF", v8::Uint32::New(isolate, 0x8CA3));
|
|
5374
|
-
tmpl->Set(isolate, "STENCIL_BACK_VALUE_MASK", v8::Uint32::New(isolate, 0x8CA4));
|
|
5375
|
-
tmpl->Set(isolate, "STENCIL_BACK_WRITEMASK", v8::Uint32::New(isolate, 0x8CA5));
|
|
5376
|
-
|
|
5377
|
-
tmpl->Set(isolate, "VIEWPORT", v8::Uint32::New(isolate, 0x0BA2));
|
|
5378
|
-
tmpl->Set(isolate, "SCISSOR_BOX", v8::Uint32::New(isolate, 0x0C10));
|
|
5379
|
-
tmpl->Set(isolate, "COLOR_CLEAR_VALUE", v8::Uint32::New(isolate, 0x0C22));
|
|
5380
|
-
tmpl->Set(isolate, "COLOR_WRITEMASK", v8::Uint32::New(isolate, 0x0C23));
|
|
5381
|
-
|
|
5382
|
-
tmpl->Set(isolate, "UNPACK_ALIGNMENT", v8::Uint32::New(isolate, 0x0CF5));
|
|
5383
|
-
tmpl->Set(isolate, "PACK_ALIGNMENT", v8::Uint32::New(isolate, 0x0D05));
|
|
5384
|
-
tmpl->Set(isolate, "MAX_TEXTURE_SIZE", v8::Uint32::New(isolate, 0x0D33));
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
tmpl->Set(isolate, "MAX_VIEWPORT_DIMS", v8::Uint32::New(isolate, 0x0D3A));
|
|
5388
|
-
tmpl->Set(isolate, "SUBPIXEL_BITS", v8::Uint32::New(isolate, 0x0D50));
|
|
5389
|
-
|
|
5390
|
-
tmpl->Set(isolate, "RED_BITS", v8::Uint32::New(isolate, 0x0D52));
|
|
5391
|
-
tmpl->Set(isolate, "GREEN_BITS", v8::Uint32::New(isolate, 0x0D53));
|
|
5392
|
-
tmpl->Set(isolate, "BLUE_BITS", v8::Uint32::New(isolate, 0x0D54));
|
|
5393
|
-
tmpl->Set(isolate, "ALPHA_BITS", v8::Uint32::New(isolate, 0x0D55));
|
|
5394
|
-
|
|
5395
|
-
tmpl->Set(isolate, "STENCIL_BITS", v8::Uint32::New(isolate, 0x0D57));
|
|
5396
|
-
tmpl->Set(isolate, "POLYGON_OFFSET_UNITS", v8::Uint32::New(isolate, 0x2A00));
|
|
5397
|
-
tmpl->Set(isolate, "POLYGON_OFFSET_FACTOR", v8::Uint32::New(isolate, 0x8038));
|
|
5398
|
-
|
|
5399
|
-
tmpl->Set(isolate, "TEXTURE_BINDING_2D", v8::Uint32::New(isolate, 0x8069));
|
|
5400
|
-
tmpl->Set(isolate, "SAMPLE_BUFFERS", v8::Uint32::New(isolate, 0x80A8));
|
|
5401
|
-
tmpl->Set(isolate, "SAMPLES", v8::Uint32::New(isolate, 0x80A9));
|
|
5402
|
-
tmpl->Set(isolate, "SAMPLE_COVERAGE_VALUE", v8::Uint32::New(isolate, 0x80AA));
|
|
5403
|
-
|
|
5404
|
-
tmpl->Set(isolate, "SAMPLE_COVERAGE_INVERT", v8::Uint32::New(isolate, 0x80AB));
|
|
5405
|
-
tmpl->Set(isolate, "COMPRESSED_TEXTURE_FORMATS", v8::Uint32::New(isolate, 0x86A3));
|
|
5406
|
-
tmpl->Set(isolate, "VENDOR", v8::Uint32::New(isolate, 0x1F00));
|
|
5407
|
-
tmpl->Set(isolate, "RENDERER", v8::Uint32::New(isolate, 0x1F01));
|
|
5408
|
-
|
|
5409
|
-
tmpl->Set(isolate, "VERSION", v8::Uint32::New(isolate, 0x1F02));
|
|
5410
|
-
tmpl->Set(isolate, "IMPLEMENTATION_COLOR_READ_TYPE", v8::Uint32::New(isolate, 0x8B9A));
|
|
5411
|
-
tmpl->Set(isolate, "IMPLEMENTATION_COLOR_READ_FORMAT", v8::Uint32::New(isolate, 0x8B9B));
|
|
5412
|
-
tmpl->Set(isolate, "BROWSER_DEFAULT_WEBGL", v8::Uint32::New(isolate, 0x9244));
|
|
5413
|
-
|
|
5414
|
-
tmpl->Set(isolate, "STATIC_DRAW", v8::Uint32::New(isolate, 0x88E4));
|
|
5415
|
-
tmpl->Set(isolate, "STREAM_DRAW", v8::Uint32::New(isolate, 0x88E0));
|
|
5416
|
-
tmpl->Set(isolate, "DYNAMIC_DRAW", v8::Uint32::New(isolate, 0x88E8));
|
|
5417
|
-
tmpl->Set(isolate, "ARRAY_BUFFER", v8::Uint32::New(isolate, 0x8892));
|
|
5418
|
-
|
|
5419
|
-
tmpl->Set(isolate, "ELEMENT_ARRAY_BUFFER", v8::Uint32::New(isolate, 0x8893));
|
|
5420
|
-
tmpl->Set(isolate, "BUFFER_SIZE", v8::Uint32::New(isolate, 0x8764));
|
|
5421
|
-
tmpl->Set(isolate, "BUFFER_USAGE", v8::Uint32::New(isolate, 0x8765));
|
|
5422
|
-
tmpl->Set(isolate, "CURRENT_VERTEX_ATTRIB", v8::Uint32::New(isolate, 0x8626));
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_ENABLED", v8::Uint32::New(isolate, 0x8622));
|
|
5426
|
-
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_SIZE", v8::Uint32::New(isolate, 0x8623));
|
|
5427
|
-
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_STRIDE", v8::Uint32::New(isolate, 0x8624));
|
|
5428
|
-
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_TYPE", v8::Uint32::New(isolate, 0x8625));
|
|
5429
|
-
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_NORMALIZED", v8::Uint32::New(isolate, 0x886A));
|
|
5430
|
-
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_POINTER", v8::Uint32::New(isolate, 0x8645));
|
|
5431
|
-
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", v8::Uint32::New(isolate, 0x889F));
|
|
5432
|
-
|
|
5433
|
-
tmpl->Set(isolate, "CULL_FACE", v8::Uint32::New(isolate, 0x0B44));
|
|
5434
|
-
tmpl->Set(isolate, "FRONT", v8::Uint32::New(isolate, 0x0404));
|
|
5435
|
-
tmpl->Set(isolate, "BACK", v8::Uint32::New(isolate, 0x0405));
|
|
5436
|
-
tmpl->Set(isolate, "FRONT_AND_BACK", v8::Uint32::New(isolate, 0x0408));
|
|
5318
|
+
tmpl->Set(isolate, "FUNC_ADD", v8::Integer::NewFromUnsigned(isolate, 0x8006));
|
|
5319
|
+
tmpl->Set(isolate, "FUNC_SUBTRACT", v8::Integer::NewFromUnsigned(isolate, 0x800A));
|
|
5320
|
+
tmpl->Set(isolate, "FUNC_REVERSE_SUBTRACT", v8::Integer::NewFromUnsigned(isolate, 0x800B));
|
|
5321
|
+
tmpl->Set(isolate, "BLEND_EQUATION", v8::Integer::NewFromUnsigned(isolate, 0x8009));
|
|
5322
|
+
tmpl->Set(isolate, "BLEND_EQUATION_RGB", v8::Integer::NewFromUnsigned(isolate, 0x8009));
|
|
5323
|
+
tmpl->Set(isolate, "BLEND_EQUATION_ALPHA", v8::Integer::NewFromUnsigned(isolate, 0x883D));
|
|
5437
5324
|
|
|
5438
|
-
tmpl->Set(isolate, "BLEND", v8::Uint32::New(isolate, 0x0BE2));
|
|
5439
|
-
tmpl->Set(isolate, "DEPTH_TEST", v8::Uint32::New(isolate, 0x0B71));
|
|
5440
|
-
tmpl->Set(isolate, "DITHER", v8::Uint32::New(isolate, 0x0BD0));
|
|
5441
|
-
tmpl->Set(isolate, "POLYGON_OFFSET_FILL", v8::Uint32::New(isolate, 0x8037));
|
|
5442
5325
|
|
|
5443
|
-
tmpl->Set(isolate, "
|
|
5444
|
-
tmpl->Set(isolate, "
|
|
5445
|
-
tmpl->Set(isolate, "
|
|
5446
|
-
|
|
5326
|
+
tmpl->Set(isolate, "BLEND_DST_RGB", v8::Integer::NewFromUnsigned(isolate, 0x80C8));
|
|
5327
|
+
tmpl->Set(isolate, "BLEND_SRC_RGB", v8::Integer::NewFromUnsigned(isolate, 0x80C9));
|
|
5328
|
+
tmpl->Set(isolate, "BLEND_DST_ALPHA", v8::Integer::NewFromUnsigned(isolate, 0x80CA));
|
|
5329
|
+
|
|
5330
|
+
|
|
5331
|
+
tmpl->Set(isolate, "BLEND_SRC_ALPHA", v8::Integer::NewFromUnsigned(isolate, 0x80CB));
|
|
5332
|
+
tmpl->Set(isolate, "BLEND_COLOR", v8::Integer::NewFromUnsigned(isolate, 0x8005));
|
|
5333
|
+
tmpl->Set(isolate, "ARRAY_BUFFER_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8894));
|
|
5334
|
+
|
|
5335
|
+
|
|
5336
|
+
tmpl->Set(isolate, "ELEMENT_ARRAY_BUFFER_BINDING",
|
|
5337
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8895));
|
|
5338
|
+
tmpl->Set(isolate, "LINE_WIDTH", v8::Integer::NewFromUnsigned(isolate, 0x0B21));
|
|
5339
|
+
tmpl->Set(isolate, "ALIASED_POINT_SIZE_RANGE", v8::Integer::NewFromUnsigned(isolate, 0x846D));
|
|
5340
|
+
|
|
5341
|
+
tmpl->Set(isolate, "ALIASED_LINE_WIDTH_RANGE", v8::Integer::NewFromUnsigned(isolate, 0x846E));
|
|
5342
|
+
tmpl->Set(isolate, "CULL_FACE_MODE", v8::Integer::NewFromUnsigned(isolate, 0x0B45));
|
|
5343
|
+
tmpl->Set(isolate, "FRONT_FACE", v8::Integer::NewFromUnsigned(isolate, 0x0B46));
|
|
5344
|
+
|
|
5345
|
+
tmpl->Set(isolate, "DEPTH_RANGE", v8::Integer::NewFromUnsigned(isolate, 0x0B70));
|
|
5346
|
+
tmpl->Set(isolate, "DEPTH_WRITEMASK", v8::Integer::NewFromUnsigned(isolate, 0x0B72));
|
|
5347
|
+
tmpl->Set(isolate, "DEPTH_CLEAR_VALUE", v8::Integer::NewFromUnsigned(isolate, 0x0B73));
|
|
5348
|
+
|
|
5349
|
+
tmpl->Set(isolate, "DEPTH_FUNC", v8::Integer::NewFromUnsigned(isolate, 0x0B74));
|
|
5350
|
+
tmpl->Set(isolate, "STENCIL_CLEAR_VALUE", v8::Integer::NewFromUnsigned(isolate, 0x0B91));
|
|
5351
|
+
tmpl->Set(isolate, "STENCIL_FUNC", v8::Integer::NewFromUnsigned(isolate, 0x0B92));
|
|
5352
|
+
|
|
5353
|
+
tmpl->Set(isolate, "STENCIL_FAIL", v8::Integer::NewFromUnsigned(isolate, 0x0B94));
|
|
5354
|
+
tmpl->Set(isolate, "STENCIL_PASS_DEPTH_FAIL", v8::Integer::NewFromUnsigned(isolate, 0x0B95));
|
|
5355
|
+
tmpl->Set(isolate, "STENCIL_PASS_DEPTH_PASS", v8::Integer::NewFromUnsigned(isolate, 0x0B96));
|
|
5356
|
+
|
|
5357
|
+
tmpl->Set(isolate, "STENCIL_REF", v8::Integer::NewFromUnsigned(isolate, 0x0B97));
|
|
5358
|
+
tmpl->Set(isolate, "STENCIL_VALUE_MASK", v8::Integer::NewFromUnsigned(isolate, 0x0B93));
|
|
5359
|
+
tmpl->Set(isolate, "STENCIL_WRITEMASK", v8::Integer::NewFromUnsigned(isolate, 0x0B98));
|
|
5360
|
+
|
|
5361
|
+
tmpl->Set(isolate, "STENCIL_BACK_FUNC", v8::Integer::NewFromUnsigned(isolate, 0x8800));
|
|
5362
|
+
tmpl->Set(isolate, "STENCIL_BACK_FAIL", v8::Integer::NewFromUnsigned(isolate, 0x8801));
|
|
5363
|
+
tmpl->Set(isolate, "STENCIL_BACK_PASS_DEPTH_FAIL",
|
|
5364
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8802));
|
|
5365
|
+
|
|
5366
|
+
tmpl->Set(isolate, "STENCIL_BACK_PASS_DEPTH_PASS",
|
|
5367
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8803));
|
|
5368
|
+
tmpl->Set(isolate, "STENCIL_BACK_REF", v8::Integer::NewFromUnsigned(isolate, 0x8CA3));
|
|
5369
|
+
tmpl->Set(isolate, "STENCIL_BACK_VALUE_MASK", v8::Integer::NewFromUnsigned(isolate, 0x8CA4));
|
|
5370
|
+
tmpl->Set(isolate, "STENCIL_BACK_WRITEMASK", v8::Integer::NewFromUnsigned(isolate, 0x8CA5));
|
|
5371
|
+
|
|
5372
|
+
tmpl->Set(isolate, "VIEWPORT", v8::Integer::NewFromUnsigned(isolate, 0x0BA2));
|
|
5373
|
+
tmpl->Set(isolate, "SCISSOR_BOX", v8::Integer::NewFromUnsigned(isolate, 0x0C10));
|
|
5374
|
+
tmpl->Set(isolate, "COLOR_CLEAR_VALUE", v8::Integer::NewFromUnsigned(isolate, 0x0C22));
|
|
5375
|
+
tmpl->Set(isolate, "COLOR_WRITEMASK", v8::Integer::NewFromUnsigned(isolate, 0x0C23));
|
|
5376
|
+
|
|
5377
|
+
tmpl->Set(isolate, "UNPACK_ALIGNMENT", v8::Integer::NewFromUnsigned(isolate, 0x0CF5));
|
|
5378
|
+
tmpl->Set(isolate, "PACK_ALIGNMENT", v8::Integer::NewFromUnsigned(isolate, 0x0D05));
|
|
5379
|
+
tmpl->Set(isolate, "MAX_TEXTURE_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x0D33));
|
|
5380
|
+
|
|
5381
|
+
|
|
5382
|
+
tmpl->Set(isolate, "MAX_VIEWPORT_DIMS", v8::Integer::NewFromUnsigned(isolate, 0x0D3A));
|
|
5383
|
+
tmpl->Set(isolate, "SUBPIXEL_BITS", v8::Integer::NewFromUnsigned(isolate, 0x0D50));
|
|
5384
|
+
|
|
5385
|
+
tmpl->Set(isolate, "RED_BITS", v8::Integer::NewFromUnsigned(isolate, 0x0D52));
|
|
5386
|
+
tmpl->Set(isolate, "GREEN_BITS", v8::Integer::NewFromUnsigned(isolate, 0x0D53));
|
|
5387
|
+
tmpl->Set(isolate, "BLUE_BITS", v8::Integer::NewFromUnsigned(isolate, 0x0D54));
|
|
5388
|
+
tmpl->Set(isolate, "ALPHA_BITS", v8::Integer::NewFromUnsigned(isolate, 0x0D55));
|
|
5389
|
+
|
|
5390
|
+
tmpl->Set(isolate, "STENCIL_BITS", v8::Integer::NewFromUnsigned(isolate, 0x0D57));
|
|
5391
|
+
tmpl->Set(isolate, "POLYGON_OFFSET_UNITS", v8::Integer::NewFromUnsigned(isolate, 0x2A00));
|
|
5392
|
+
tmpl->Set(isolate, "POLYGON_OFFSET_FACTOR", v8::Integer::NewFromUnsigned(isolate, 0x8038));
|
|
5393
|
+
|
|
5394
|
+
tmpl->Set(isolate, "TEXTURE_BINDING_2D", v8::Integer::NewFromUnsigned(isolate, 0x8069));
|
|
5395
|
+
tmpl->Set(isolate, "SAMPLE_BUFFERS", v8::Integer::NewFromUnsigned(isolate, 0x80A8));
|
|
5396
|
+
tmpl->Set(isolate, "SAMPLES", v8::Integer::NewFromUnsigned(isolate, 0x80A9));
|
|
5397
|
+
tmpl->Set(isolate, "SAMPLE_COVERAGE_VALUE", v8::Integer::NewFromUnsigned(isolate, 0x80AA));
|
|
5398
|
+
|
|
5399
|
+
tmpl->Set(isolate, "SAMPLE_COVERAGE_INVERT", v8::Integer::NewFromUnsigned(isolate, 0x80AB));
|
|
5400
|
+
tmpl->Set(isolate, "COMPRESSED_TEXTURE_FORMATS", v8::Integer::NewFromUnsigned(isolate, 0x86A3));
|
|
5401
|
+
tmpl->Set(isolate, "VENDOR", v8::Integer::NewFromUnsigned(isolate, 0x1F00));
|
|
5402
|
+
tmpl->Set(isolate, "RENDERER", v8::Integer::NewFromUnsigned(isolate, 0x1F01));
|
|
5403
|
+
|
|
5404
|
+
tmpl->Set(isolate, "VERSION", v8::Integer::NewFromUnsigned(isolate, 0x1F02));
|
|
5405
|
+
tmpl->Set(isolate, "IMPLEMENTATION_COLOR_READ_TYPE",
|
|
5406
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8B9A));
|
|
5407
|
+
tmpl->Set(isolate, "IMPLEMENTATION_COLOR_READ_FORMAT",
|
|
5408
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8B9B));
|
|
5409
|
+
tmpl->Set(isolate, "BROWSER_DEFAULT_WEBGL", v8::Integer::NewFromUnsigned(isolate, 0x9244));
|
|
5410
|
+
|
|
5411
|
+
tmpl->Set(isolate, "STATIC_DRAW", v8::Integer::NewFromUnsigned(isolate, 0x88E4));
|
|
5412
|
+
tmpl->Set(isolate, "STREAM_DRAW", v8::Integer::NewFromUnsigned(isolate, 0x88E0));
|
|
5413
|
+
tmpl->Set(isolate, "DYNAMIC_DRAW", v8::Integer::NewFromUnsigned(isolate, 0x88E8));
|
|
5414
|
+
tmpl->Set(isolate, "ARRAY_BUFFER", v8::Integer::NewFromUnsigned(isolate, 0x8892));
|
|
5415
|
+
|
|
5416
|
+
tmpl->Set(isolate, "ELEMENT_ARRAY_BUFFER", v8::Integer::NewFromUnsigned(isolate, 0x8893));
|
|
5417
|
+
tmpl->Set(isolate, "BUFFER_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x8764));
|
|
5418
|
+
tmpl->Set(isolate, "BUFFER_USAGE", v8::Integer::NewFromUnsigned(isolate, 0x8765));
|
|
5419
|
+
tmpl->Set(isolate, "CURRENT_VERTEX_ATTRIB", v8::Integer::NewFromUnsigned(isolate, 0x8626));
|
|
5420
|
+
|
|
5421
|
+
|
|
5422
|
+
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_ENABLED",
|
|
5423
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8622));
|
|
5424
|
+
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x8623));
|
|
5425
|
+
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_STRIDE", v8::Integer::NewFromUnsigned(isolate, 0x8624));
|
|
5426
|
+
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_TYPE", v8::Integer::NewFromUnsigned(isolate, 0x8625));
|
|
5427
|
+
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_NORMALIZED",
|
|
5428
|
+
v8::Integer::NewFromUnsigned(isolate, 0x886A));
|
|
5429
|
+
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_POINTER",
|
|
5430
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8645));
|
|
5431
|
+
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",
|
|
5432
|
+
v8::Integer::NewFromUnsigned(isolate, 0x889F));
|
|
5433
|
+
|
|
5434
|
+
tmpl->Set(isolate, "CULL_FACE", v8::Integer::NewFromUnsigned(isolate, 0x0B44));
|
|
5435
|
+
tmpl->Set(isolate, "FRONT", v8::Integer::NewFromUnsigned(isolate, 0x0404));
|
|
5436
|
+
tmpl->Set(isolate, "BACK", v8::Integer::NewFromUnsigned(isolate, 0x0405));
|
|
5437
|
+
tmpl->Set(isolate, "FRONT_AND_BACK", v8::Integer::NewFromUnsigned(isolate, 0x0408));
|
|
5438
|
+
|
|
5439
|
+
tmpl->Set(isolate, "BLEND", v8::Integer::NewFromUnsigned(isolate, 0x0BE2));
|
|
5440
|
+
tmpl->Set(isolate, "DEPTH_TEST", v8::Integer::NewFromUnsigned(isolate, 0x0B71));
|
|
5441
|
+
tmpl->Set(isolate, "DITHER", v8::Integer::NewFromUnsigned(isolate, 0x0BD0));
|
|
5442
|
+
tmpl->Set(isolate, "POLYGON_OFFSET_FILL", v8::Integer::NewFromUnsigned(isolate, 0x8037));
|
|
5443
|
+
|
|
5444
|
+
tmpl->Set(isolate, "SAMPLE_ALPHA_TO_COVERAGE", v8::Integer::NewFromUnsigned(isolate, 0x809E));
|
|
5445
|
+
tmpl->Set(isolate, "SAMPLE_COVERAGE", v8::Integer::NewFromUnsigned(isolate, 0x80A0));
|
|
5446
|
+
tmpl->Set(isolate, "SCISSOR_TEST", v8::Integer::NewFromUnsigned(isolate, 0x0C11));
|
|
5447
|
+
tmpl->Set(isolate, "STENCIL_TEST", v8::Integer::NewFromUnsigned(isolate, 0x0B90));
|
|
5447
5448
|
|
|
5448
5449
|
|
|
5449
5450
|
/* Errors */
|
|
5450
5451
|
|
|
5451
|
-
tmpl->Set(isolate, "NO_ERROR", v8::
|
|
5452
|
-
tmpl->Set(isolate, "INVALID_ENUM", v8::
|
|
5453
|
-
tmpl->Set(isolate, "INVALID_VALUE", v8::
|
|
5454
|
-
tmpl->Set(isolate, "INVALID_OPERATION", v8::
|
|
5452
|
+
tmpl->Set(isolate, "NO_ERROR", v8::Integer::NewFromUnsigned(isolate, 0));
|
|
5453
|
+
tmpl->Set(isolate, "INVALID_ENUM", v8::Integer::NewFromUnsigned(isolate, 0x0500));
|
|
5454
|
+
tmpl->Set(isolate, "INVALID_VALUE", v8::Integer::NewFromUnsigned(isolate, 0x0501));
|
|
5455
|
+
tmpl->Set(isolate, "INVALID_OPERATION", v8::Integer::NewFromUnsigned(isolate, 0x0502));
|
|
5455
5456
|
|
|
5456
|
-
tmpl->Set(isolate, "OUT_OF_MEMORY", v8::
|
|
5457
|
-
tmpl->Set(isolate, "CONTEXT_LOST_WEBGL", v8::
|
|
5458
|
-
tmpl->Set(isolate, "CW", v8::
|
|
5459
|
-
tmpl->Set(isolate, "CCW", v8::
|
|
5457
|
+
tmpl->Set(isolate, "OUT_OF_MEMORY", v8::Integer::NewFromUnsigned(isolate, 0x0505));
|
|
5458
|
+
tmpl->Set(isolate, "CONTEXT_LOST_WEBGL", v8::Integer::NewFromUnsigned(isolate, 0x9242));
|
|
5459
|
+
tmpl->Set(isolate, "CW", v8::Integer::NewFromUnsigned(isolate, 0x0900));
|
|
5460
|
+
tmpl->Set(isolate, "CCW", v8::Integer::NewFromUnsigned(isolate, 0x0901));
|
|
5460
5461
|
|
|
5461
|
-
tmpl->Set(isolate, "DONT_CARE", v8::
|
|
5462
|
-
tmpl->Set(isolate, "FASTEST", v8::
|
|
5463
|
-
tmpl->Set(isolate, "NICEST", v8::
|
|
5464
|
-
tmpl->Set(isolate, "GENERATE_MIPMAP_HINT", v8::
|
|
5462
|
+
tmpl->Set(isolate, "DONT_CARE", v8::Integer::NewFromUnsigned(isolate, 0x1100));
|
|
5463
|
+
tmpl->Set(isolate, "FASTEST", v8::Integer::NewFromUnsigned(isolate, 0x1101));
|
|
5464
|
+
tmpl->Set(isolate, "NICEST", v8::Integer::NewFromUnsigned(isolate, 0x1102));
|
|
5465
|
+
tmpl->Set(isolate, "GENERATE_MIPMAP_HINT", v8::Integer::NewFromUnsigned(isolate, 0x8192));
|
|
5465
5466
|
|
|
5466
|
-
tmpl->Set(isolate, "BYTE", v8::
|
|
5467
|
-
tmpl->Set(isolate, "UNSIGNED_BYTE", v8::
|
|
5468
|
-
tmpl->Set(isolate, "SHORT", v8::
|
|
5469
|
-
tmpl->Set(isolate, "UNSIGNED_SHORT", v8::
|
|
5467
|
+
tmpl->Set(isolate, "BYTE", v8::Integer::NewFromUnsigned(isolate, 0x1400));
|
|
5468
|
+
tmpl->Set(isolate, "UNSIGNED_BYTE", v8::Integer::NewFromUnsigned(isolate, 0x1401));
|
|
5469
|
+
tmpl->Set(isolate, "SHORT", v8::Integer::NewFromUnsigned(isolate, 0x1402));
|
|
5470
|
+
tmpl->Set(isolate, "UNSIGNED_SHORT", v8::Integer::NewFromUnsigned(isolate, 0x1403));
|
|
5470
5471
|
|
|
5471
|
-
tmpl->Set(isolate, "BYTE", v8::
|
|
5472
|
-
tmpl->Set(isolate, "UNSIGNED_BYTE", v8::
|
|
5473
|
-
tmpl->Set(isolate, "SHORT", v8::
|
|
5474
|
-
tmpl->Set(isolate, "UNSIGNED_SHORT", v8::
|
|
5472
|
+
tmpl->Set(isolate, "BYTE", v8::Integer::NewFromUnsigned(isolate, 0x1400));
|
|
5473
|
+
tmpl->Set(isolate, "UNSIGNED_BYTE", v8::Integer::NewFromUnsigned(isolate, 0x1401));
|
|
5474
|
+
tmpl->Set(isolate, "SHORT", v8::Integer::NewFromUnsigned(isolate, 0x1402));
|
|
5475
|
+
tmpl->Set(isolate, "UNSIGNED_SHORT", v8::Integer::NewFromUnsigned(isolate, 0x1403));
|
|
5475
5476
|
|
|
5476
|
-
tmpl->Set(isolate, "INT", v8::
|
|
5477
|
-
tmpl->Set(isolate, "UNSIGNED_INT", v8::
|
|
5478
|
-
tmpl->Set(isolate, "FLOAT", v8::
|
|
5479
|
-
tmpl->Set(isolate, "DEPTH_COMPONENT", v8::
|
|
5477
|
+
tmpl->Set(isolate, "INT", v8::Integer::NewFromUnsigned(isolate, 0x1404));
|
|
5478
|
+
tmpl->Set(isolate, "UNSIGNED_INT", v8::Integer::NewFromUnsigned(isolate, 0x1405));
|
|
5479
|
+
tmpl->Set(isolate, "FLOAT", v8::Integer::NewFromUnsigned(isolate, 0x1406));
|
|
5480
|
+
tmpl->Set(isolate, "DEPTH_COMPONENT", v8::Integer::NewFromUnsigned(isolate, 0x1902));
|
|
5480
5481
|
|
|
5481
|
-
tmpl->Set(isolate, "ALPHA", v8::
|
|
5482
|
-
tmpl->Set(isolate, "RGB", v8::
|
|
5482
|
+
tmpl->Set(isolate, "ALPHA", v8::Integer::NewFromUnsigned(isolate, 0x1906));
|
|
5483
|
+
tmpl->Set(isolate, "RGB", v8::Integer::NewFromUnsigned(isolate, 0x1907));
|
|
5483
5484
|
|
|
5484
5485
|
/* Clearing buffers */
|
|
5485
5486
|
|
|
5486
|
-
tmpl->Set(isolate, "RGBA", v8::
|
|
5487
|
-
tmpl->Set(isolate, "LUMINANCE", v8::
|
|
5488
|
-
tmpl->Set(isolate, "LUMINANCE_ALPHA", v8::
|
|
5487
|
+
tmpl->Set(isolate, "RGBA", v8::Integer::NewFromUnsigned(isolate, 0x1908));
|
|
5488
|
+
tmpl->Set(isolate, "LUMINANCE", v8::Integer::NewFromUnsigned(isolate, 0x1909));
|
|
5489
|
+
tmpl->Set(isolate, "LUMINANCE_ALPHA", v8::Integer::NewFromUnsigned(isolate, 0x190A));
|
|
5489
5490
|
|
|
5490
5491
|
/* Clearing buffers */
|
|
5491
5492
|
|
|
5492
5493
|
/* Rendering primitives */
|
|
5493
5494
|
|
|
5494
|
-
tmpl->Set(isolate, "UNSIGNED_SHORT_4_4_4_4", v8::
|
|
5495
|
-
tmpl->Set(isolate, "UNSIGNED_SHORT_5_5_5_1", v8::
|
|
5496
|
-
tmpl->Set(isolate, "UNSIGNED_SHORT_5_6_5", v8::
|
|
5497
|
-
tmpl->Set(isolate, "FRAGMENT_SHADER", v8::
|
|
5498
|
-
tmpl->Set(isolate, "VERTEX_SHADER", v8::
|
|
5499
|
-
tmpl->Set(isolate, "COMPILE_STATUS", v8::
|
|
5500
|
-
tmpl->Set(isolate, "DELETE_STATUS", v8::
|
|
5495
|
+
tmpl->Set(isolate, "UNSIGNED_SHORT_4_4_4_4", v8::Integer::NewFromUnsigned(isolate, 0x8033));
|
|
5496
|
+
tmpl->Set(isolate, "UNSIGNED_SHORT_5_5_5_1", v8::Integer::NewFromUnsigned(isolate, 0x8034));
|
|
5497
|
+
tmpl->Set(isolate, "UNSIGNED_SHORT_5_6_5", v8::Integer::NewFromUnsigned(isolate, 0x8363));
|
|
5498
|
+
tmpl->Set(isolate, "FRAGMENT_SHADER", v8::Integer::NewFromUnsigned(isolate, 0x8B30));
|
|
5499
|
+
tmpl->Set(isolate, "VERTEX_SHADER", v8::Integer::NewFromUnsigned(isolate, 0x8B31));
|
|
5500
|
+
tmpl->Set(isolate, "COMPILE_STATUS", v8::Integer::NewFromUnsigned(isolate, 0x8B81));
|
|
5501
|
+
tmpl->Set(isolate, "DELETE_STATUS", v8::Integer::NewFromUnsigned(isolate, 0x8B80));
|
|
5501
5502
|
|
|
5502
5503
|
/* Rendering primitives */
|
|
5503
5504
|
|
|
5504
5505
|
/* Blending modes */
|
|
5505
5506
|
|
|
5506
|
-
tmpl->Set(isolate, "LINK_STATUS", v8::
|
|
5507
|
-
tmpl->Set(isolate, "VALIDATE_STATUS", v8::
|
|
5508
|
-
tmpl->Set(isolate, "ATTACHED_SHADERS", v8::
|
|
5509
|
-
tmpl->Set(isolate, "ACTIVE_ATTRIBUTES", v8::
|
|
5510
|
-
tmpl->Set(isolate, "ACTIVE_UNIFORMS", v8::
|
|
5511
|
-
tmpl->Set(isolate, "MAX_VERTEX_ATTRIBS", v8::
|
|
5512
|
-
tmpl->Set(isolate, "MAX_VERTEX_UNIFORM_VECTORS", v8::
|
|
5513
|
-
tmpl->Set(isolate, "MAX_VARYING_VECTORS", v8::
|
|
5514
|
-
tmpl->Set(isolate, "MAX_COMBINED_TEXTURE_IMAGE_UNITS",
|
|
5515
|
-
|
|
5516
|
-
tmpl->Set(isolate, "
|
|
5517
|
-
|
|
5518
|
-
tmpl->Set(isolate, "
|
|
5519
|
-
tmpl->Set(isolate, "
|
|
5520
|
-
|
|
5507
|
+
tmpl->Set(isolate, "LINK_STATUS", v8::Integer::NewFromUnsigned(isolate, 0x8B82));
|
|
5508
|
+
tmpl->Set(isolate, "VALIDATE_STATUS", v8::Integer::NewFromUnsigned(isolate, 0x8B83));
|
|
5509
|
+
tmpl->Set(isolate, "ATTACHED_SHADERS", v8::Integer::NewFromUnsigned(isolate, 0x8B85));
|
|
5510
|
+
tmpl->Set(isolate, "ACTIVE_ATTRIBUTES", v8::Integer::NewFromUnsigned(isolate, 0x8B89));
|
|
5511
|
+
tmpl->Set(isolate, "ACTIVE_UNIFORMS", v8::Integer::NewFromUnsigned(isolate, 0x8B86));
|
|
5512
|
+
tmpl->Set(isolate, "MAX_VERTEX_ATTRIBS", v8::Integer::NewFromUnsigned(isolate, 0x8869));
|
|
5513
|
+
tmpl->Set(isolate, "MAX_VERTEX_UNIFORM_VECTORS", v8::Integer::NewFromUnsigned(isolate, 0x8DFB));
|
|
5514
|
+
tmpl->Set(isolate, "MAX_VARYING_VECTORS", v8::Integer::NewFromUnsigned(isolate, 0x8DFC));
|
|
5515
|
+
tmpl->Set(isolate, "MAX_COMBINED_TEXTURE_IMAGE_UNITS",
|
|
5516
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8B4D));
|
|
5517
|
+
tmpl->Set(isolate, "MAX_VERTEX_TEXTURE_IMAGE_UNITS",
|
|
5518
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8B4C));
|
|
5519
|
+
tmpl->Set(isolate, "MAX_TEXTURE_IMAGE_UNITS", v8::Integer::NewFromUnsigned(isolate, 0x8872));
|
|
5520
|
+
tmpl->Set(isolate, "MAX_FRAGMENT_UNIFORM_VECTORS",
|
|
5521
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8DFD));
|
|
5522
|
+
tmpl->Set(isolate, "SHADER_TYPE", v8::Integer::NewFromUnsigned(isolate, 0x8B4F));
|
|
5523
|
+
tmpl->Set(isolate, "SHADING_LANGUAGE_VERSION", v8::Integer::NewFromUnsigned(isolate, 0x8B8C));
|
|
5524
|
+
tmpl->Set(isolate, "CURRENT_PROGRAM", v8::Integer::NewFromUnsigned(isolate, 0x8B8D));
|
|
5521
5525
|
|
|
5522
5526
|
/* Blending modes */
|
|
5523
5527
|
|
|
5524
|
-
tmpl->Set(isolate, "NEVER", v8::
|
|
5525
|
-
tmpl->Set(isolate, "LESS", v8::
|
|
5526
|
-
tmpl->Set(isolate, "EQUAL", v8::
|
|
5528
|
+
tmpl->Set(isolate, "NEVER", v8::Integer::NewFromUnsigned(isolate, 0x0200));
|
|
5529
|
+
tmpl->Set(isolate, "LESS", v8::Integer::NewFromUnsigned(isolate, 0x0201));
|
|
5530
|
+
tmpl->Set(isolate, "EQUAL", v8::Integer::NewFromUnsigned(isolate, 0x0202));
|
|
5527
5531
|
|
|
5528
5532
|
/* Blending equations */
|
|
5529
5533
|
|
|
5530
5534
|
/* Getting GL parameter information */
|
|
5531
5535
|
|
|
5532
|
-
tmpl->Set(isolate, "LEQUAL", v8::
|
|
5533
|
-
tmpl->Set(isolate, "GREATER", v8::
|
|
5534
|
-
tmpl->Set(isolate, "NOTEQUAL", v8::
|
|
5535
|
-
tmpl->Set(isolate, "GEQUAL", v8::
|
|
5536
|
-
tmpl->Set(isolate, "ALWAYS", v8::
|
|
5537
|
-
tmpl->Set(isolate, "KEEP", v8::
|
|
5538
|
-
tmpl->Set(isolate, "REPLACE", v8::
|
|
5539
|
-
tmpl->Set(isolate, "INCR", v8::
|
|
5540
|
-
tmpl->Set(isolate, "DECR", v8::
|
|
5541
|
-
tmpl->Set(isolate, "INVERT", v8::
|
|
5542
|
-
tmpl->Set(isolate, "INCR_WRAP", v8::
|
|
5543
|
-
tmpl->Set(isolate, "DECR_WRAP", v8::
|
|
5544
|
-
tmpl->Set(isolate, "NEAREST", v8::
|
|
5545
|
-
tmpl->Set(isolate, "LINEAR", v8::
|
|
5546
|
-
tmpl->Set(isolate, "NEAREST_MIPMAP_NEAREST", v8::
|
|
5547
|
-
tmpl->Set(isolate, "LINEAR_MIPMAP_NEAREST", v8::
|
|
5548
|
-
tmpl->Set(isolate, "NEAREST_MIPMAP_LINEAR", v8::
|
|
5549
|
-
tmpl->Set(isolate, "LINEAR_MIPMAP_LINEAR", v8::
|
|
5550
|
-
tmpl->Set(isolate, "TEXTURE_MAG_FILTER", v8::
|
|
5551
|
-
tmpl->Set(isolate, "TEXTURE_MIN_FILTER", v8::
|
|
5552
|
-
tmpl->Set(isolate, "TEXTURE_WRAP_S", v8::
|
|
5553
|
-
tmpl->Set(isolate, "TEXTURE_WRAP_T", v8::
|
|
5554
|
-
tmpl->Set(isolate, "TEXTURE_2D", v8::
|
|
5555
|
-
tmpl->Set(isolate, "TEXTURE", v8::
|
|
5556
|
-
tmpl->Set(isolate, "TEXTURE_CUBE_MAP", v8::
|
|
5557
|
-
tmpl->Set(isolate, "TEXTURE_BINDING_CUBE_MAP", v8::
|
|
5558
|
-
tmpl->Set(isolate, "TEXTURE_CUBE_MAP_POSITIVE_X",
|
|
5559
|
-
|
|
5560
|
-
tmpl->Set(isolate, "
|
|
5561
|
-
|
|
5562
|
-
tmpl->Set(isolate, "
|
|
5563
|
-
|
|
5564
|
-
tmpl->Set(isolate, "
|
|
5565
|
-
|
|
5566
|
-
tmpl->Set(isolate, "
|
|
5567
|
-
|
|
5568
|
-
tmpl->Set(isolate, "
|
|
5569
|
-
|
|
5570
|
-
tmpl->Set(isolate, "
|
|
5571
|
-
tmpl->Set(isolate, "
|
|
5572
|
-
tmpl->Set(isolate, "
|
|
5573
|
-
tmpl->Set(isolate, "
|
|
5574
|
-
tmpl->Set(isolate, "
|
|
5575
|
-
tmpl->Set(isolate, "
|
|
5576
|
-
tmpl->Set(isolate, "
|
|
5577
|
-
tmpl->Set(isolate, "
|
|
5578
|
-
tmpl->Set(isolate, "
|
|
5579
|
-
tmpl->Set(isolate, "
|
|
5580
|
-
tmpl->Set(isolate, "
|
|
5581
|
-
tmpl->Set(isolate, "
|
|
5582
|
-
tmpl->Set(isolate, "
|
|
5583
|
-
tmpl->Set(isolate, "
|
|
5584
|
-
tmpl->Set(isolate, "
|
|
5585
|
-
tmpl->Set(isolate, "
|
|
5586
|
-
tmpl->Set(isolate, "
|
|
5587
|
-
tmpl->Set(isolate, "
|
|
5588
|
-
tmpl->Set(isolate, "
|
|
5589
|
-
tmpl->Set(isolate, "
|
|
5590
|
-
tmpl->Set(isolate, "
|
|
5591
|
-
tmpl->Set(isolate, "
|
|
5592
|
-
tmpl->Set(isolate, "
|
|
5593
|
-
tmpl->Set(isolate, "
|
|
5594
|
-
tmpl->Set(isolate, "
|
|
5536
|
+
tmpl->Set(isolate, "LEQUAL", v8::Integer::NewFromUnsigned(isolate, 0x0203));
|
|
5537
|
+
tmpl->Set(isolate, "GREATER", v8::Integer::NewFromUnsigned(isolate, 0x0204));
|
|
5538
|
+
tmpl->Set(isolate, "NOTEQUAL", v8::Integer::NewFromUnsigned(isolate, 0x0205));
|
|
5539
|
+
tmpl->Set(isolate, "GEQUAL", v8::Integer::NewFromUnsigned(isolate, 0x0206));
|
|
5540
|
+
tmpl->Set(isolate, "ALWAYS", v8::Integer::NewFromUnsigned(isolate, 0x0207));
|
|
5541
|
+
tmpl->Set(isolate, "KEEP", v8::Integer::NewFromUnsigned(isolate, 0x1E00));
|
|
5542
|
+
tmpl->Set(isolate, "REPLACE", v8::Integer::NewFromUnsigned(isolate, 0x1E01));
|
|
5543
|
+
tmpl->Set(isolate, "INCR", v8::Integer::NewFromUnsigned(isolate, 0x1E02));
|
|
5544
|
+
tmpl->Set(isolate, "DECR", v8::Integer::NewFromUnsigned(isolate, 0x1E03));
|
|
5545
|
+
tmpl->Set(isolate, "INVERT", v8::Integer::NewFromUnsigned(isolate, 0x150A));
|
|
5546
|
+
tmpl->Set(isolate, "INCR_WRAP", v8::Integer::NewFromUnsigned(isolate, 0x8507));
|
|
5547
|
+
tmpl->Set(isolate, "DECR_WRAP", v8::Integer::NewFromUnsigned(isolate, 0x8508));
|
|
5548
|
+
tmpl->Set(isolate, "NEAREST", v8::Integer::NewFromUnsigned(isolate, 0x2600));
|
|
5549
|
+
tmpl->Set(isolate, "LINEAR", v8::Integer::NewFromUnsigned(isolate, 0x2601));
|
|
5550
|
+
tmpl->Set(isolate, "NEAREST_MIPMAP_NEAREST", v8::Integer::NewFromUnsigned(isolate, 0x2700));
|
|
5551
|
+
tmpl->Set(isolate, "LINEAR_MIPMAP_NEAREST", v8::Integer::NewFromUnsigned(isolate, 0x2701));
|
|
5552
|
+
tmpl->Set(isolate, "NEAREST_MIPMAP_LINEAR", v8::Integer::NewFromUnsigned(isolate, 0x2702));
|
|
5553
|
+
tmpl->Set(isolate, "LINEAR_MIPMAP_LINEAR", v8::Integer::NewFromUnsigned(isolate, 0x2703));
|
|
5554
|
+
tmpl->Set(isolate, "TEXTURE_MAG_FILTER", v8::Integer::NewFromUnsigned(isolate, 0x2800));
|
|
5555
|
+
tmpl->Set(isolate, "TEXTURE_MIN_FILTER", v8::Integer::NewFromUnsigned(isolate, 0x2801));
|
|
5556
|
+
tmpl->Set(isolate, "TEXTURE_WRAP_S", v8::Integer::NewFromUnsigned(isolate, 0x2802));
|
|
5557
|
+
tmpl->Set(isolate, "TEXTURE_WRAP_T", v8::Integer::NewFromUnsigned(isolate, 0x2803));
|
|
5558
|
+
tmpl->Set(isolate, "TEXTURE_2D", v8::Integer::NewFromUnsigned(isolate, 0x0DE1));
|
|
5559
|
+
tmpl->Set(isolate, "TEXTURE", v8::Integer::NewFromUnsigned(isolate, 0x1702));
|
|
5560
|
+
tmpl->Set(isolate, "TEXTURE_CUBE_MAP", v8::Integer::NewFromUnsigned(isolate, 0x8513));
|
|
5561
|
+
tmpl->Set(isolate, "TEXTURE_BINDING_CUBE_MAP", v8::Integer::NewFromUnsigned(isolate, 0x8514));
|
|
5562
|
+
tmpl->Set(isolate, "TEXTURE_CUBE_MAP_POSITIVE_X",
|
|
5563
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8515));
|
|
5564
|
+
tmpl->Set(isolate, "TEXTURE_CUBE_MAP_NEGATIVE_X",
|
|
5565
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8516));
|
|
5566
|
+
tmpl->Set(isolate, "TEXTURE_CUBE_MAP_POSITIVE_Y",
|
|
5567
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8517));
|
|
5568
|
+
tmpl->Set(isolate, "TEXTURE_CUBE_MAP_NEGATIVE_Y",
|
|
5569
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8518));
|
|
5570
|
+
tmpl->Set(isolate, "TEXTURE_CUBE_MAP_POSITIVE_Z",
|
|
5571
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8519));
|
|
5572
|
+
tmpl->Set(isolate, "TEXTURE_CUBE_MAP_NEGATIVE_Z",
|
|
5573
|
+
v8::Integer::NewFromUnsigned(isolate, 0x851A));
|
|
5574
|
+
tmpl->Set(isolate, "MAX_CUBE_MAP_TEXTURE_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x851C));
|
|
5575
|
+
tmpl->Set(isolate, "TEXTURE0", v8::Integer::NewFromUnsigned(isolate, 0x84C0));
|
|
5576
|
+
tmpl->Set(isolate, "TEXTURE1", v8::Integer::NewFromUnsigned(isolate, 0x84C1));
|
|
5577
|
+
tmpl->Set(isolate, "TEXTURE2", v8::Integer::NewFromUnsigned(isolate, 0x84C2));
|
|
5578
|
+
tmpl->Set(isolate, "TEXTURE3", v8::Integer::NewFromUnsigned(isolate, 0x84C3));
|
|
5579
|
+
tmpl->Set(isolate, "TEXTURE4", v8::Integer::NewFromUnsigned(isolate, 0x84C4));
|
|
5580
|
+
tmpl->Set(isolate, "TEXTURE5", v8::Integer::NewFromUnsigned(isolate, 0x84C5));
|
|
5581
|
+
tmpl->Set(isolate, "TEXTURE6", v8::Integer::NewFromUnsigned(isolate, 0x84C6));
|
|
5582
|
+
tmpl->Set(isolate, "TEXTURE7", v8::Integer::NewFromUnsigned(isolate, 0x84C7));
|
|
5583
|
+
tmpl->Set(isolate, "TEXTURE8", v8::Integer::NewFromUnsigned(isolate, 0x84C8));
|
|
5584
|
+
tmpl->Set(isolate, "TEXTURE9", v8::Integer::NewFromUnsigned(isolate, 0x84C9));
|
|
5585
|
+
tmpl->Set(isolate, "TEXTURE10", v8::Integer::NewFromUnsigned(isolate, 0x84CA));
|
|
5586
|
+
tmpl->Set(isolate, "TEXTURE11", v8::Integer::NewFromUnsigned(isolate, 0x84CB));
|
|
5587
|
+
tmpl->Set(isolate, "TEXTURE12", v8::Integer::NewFromUnsigned(isolate, 0x84CC));
|
|
5588
|
+
tmpl->Set(isolate, "TEXTURE13", v8::Integer::NewFromUnsigned(isolate, 0x84CD));
|
|
5589
|
+
tmpl->Set(isolate, "TEXTURE14", v8::Integer::NewFromUnsigned(isolate, 0x84CE));
|
|
5590
|
+
tmpl->Set(isolate, "TEXTURE15", v8::Integer::NewFromUnsigned(isolate, 0x84CF));
|
|
5591
|
+
tmpl->Set(isolate, "TEXTURE16", v8::Integer::NewFromUnsigned(isolate, 0x84D0));
|
|
5592
|
+
tmpl->Set(isolate, "TEXTURE17", v8::Integer::NewFromUnsigned(isolate, 0x84D1));
|
|
5593
|
+
tmpl->Set(isolate, "TEXTURE18", v8::Integer::NewFromUnsigned(isolate, 0x84D2));
|
|
5594
|
+
tmpl->Set(isolate, "TEXTURE19", v8::Integer::NewFromUnsigned(isolate, 0x84D3));
|
|
5595
|
+
tmpl->Set(isolate, "TEXTURE20", v8::Integer::NewFromUnsigned(isolate, 0x84D4));
|
|
5596
|
+
tmpl->Set(isolate, "TEXTURE21", v8::Integer::NewFromUnsigned(isolate, 0x84D5));
|
|
5597
|
+
tmpl->Set(isolate, "TEXTURE22", v8::Integer::NewFromUnsigned(isolate, 0x84D6));
|
|
5598
|
+
tmpl->Set(isolate, "TEXTURE23", v8::Integer::NewFromUnsigned(isolate, 0x84D7));
|
|
5599
|
+
tmpl->Set(isolate, "TEXTURE24", v8::Integer::NewFromUnsigned(isolate, 0x84D8));
|
|
5600
|
+
tmpl->Set(isolate, "TEXTURE25", v8::Integer::NewFromUnsigned(isolate, 0x84D9));
|
|
5601
|
+
tmpl->Set(isolate, "TEXTURE26", v8::Integer::NewFromUnsigned(isolate, 0x84DA));
|
|
5602
|
+
tmpl->Set(isolate, "TEXTURE27", v8::Integer::NewFromUnsigned(isolate, 0x84DB));
|
|
5603
|
+
tmpl->Set(isolate, "TEXTURE28", v8::Integer::NewFromUnsigned(isolate, 0x84DC));
|
|
5604
|
+
tmpl->Set(isolate, "TEXTURE29", v8::Integer::NewFromUnsigned(isolate, 0x84DD));
|
|
5595
5605
|
|
|
5596
5606
|
/* Getting GL parameter information */
|
|
5597
5607
|
|
|
5598
5608
|
/* Buffers */
|
|
5599
5609
|
|
|
5600
|
-
tmpl->Set(isolate, "TEXTURE30", v8::
|
|
5601
|
-
tmpl->Set(isolate, "TEXTURE31", v8::
|
|
5602
|
-
tmpl->Set(isolate, "ACTIVE_TEXTURE", v8::
|
|
5603
|
-
tmpl->Set(isolate, "REPEAT", v8::
|
|
5604
|
-
tmpl->Set(isolate, "CLAMP_TO_EDGE", v8::
|
|
5605
|
-
tmpl->Set(isolate, "MIRRORED_REPEAT", v8::
|
|
5606
|
-
tmpl->Set(isolate, "FLOAT_VEC2", v8::
|
|
5610
|
+
tmpl->Set(isolate, "TEXTURE30", v8::Integer::NewFromUnsigned(isolate, 0x84DE));
|
|
5611
|
+
tmpl->Set(isolate, "TEXTURE31", v8::Integer::NewFromUnsigned(isolate, 0x84DF));
|
|
5612
|
+
tmpl->Set(isolate, "ACTIVE_TEXTURE", v8::Integer::NewFromUnsigned(isolate, 0x84E0));
|
|
5613
|
+
tmpl->Set(isolate, "REPEAT", v8::Integer::NewFromUnsigned(isolate, 0x2901));
|
|
5614
|
+
tmpl->Set(isolate, "CLAMP_TO_EDGE", v8::Integer::NewFromUnsigned(isolate, 0x812F));
|
|
5615
|
+
tmpl->Set(isolate, "MIRRORED_REPEAT", v8::Integer::NewFromUnsigned(isolate, 0x8370));
|
|
5616
|
+
tmpl->Set(isolate, "FLOAT_VEC2", v8::Integer::NewFromUnsigned(isolate, 0x8B50));
|
|
5607
5617
|
|
|
5608
5618
|
/* Buffers */
|
|
5609
5619
|
|
|
5610
5620
|
/* Vertex attributes */
|
|
5611
5621
|
|
|
5612
|
-
tmpl->Set(isolate, "FLOAT_VEC3", v8::
|
|
5613
|
-
tmpl->Set(isolate, "FLOAT_VEC4", v8::
|
|
5614
|
-
tmpl->Set(isolate, "INT_VEC2", v8::
|
|
5615
|
-
tmpl->Set(isolate, "INT_VEC3", v8::
|
|
5616
|
-
tmpl->Set(isolate, "INT_VEC4", v8::
|
|
5617
|
-
tmpl->Set(isolate, "BOOL", v8::
|
|
5618
|
-
tmpl->Set(isolate, "BOOL_VEC2", v8::
|
|
5619
|
-
tmpl->Set(isolate, "BOOL_VEC3", v8::
|
|
5622
|
+
tmpl->Set(isolate, "FLOAT_VEC3", v8::Integer::NewFromUnsigned(isolate, 0x8B51));
|
|
5623
|
+
tmpl->Set(isolate, "FLOAT_VEC4", v8::Integer::NewFromUnsigned(isolate, 0x8B52));
|
|
5624
|
+
tmpl->Set(isolate, "INT_VEC2", v8::Integer::NewFromUnsigned(isolate, 0x8B53));
|
|
5625
|
+
tmpl->Set(isolate, "INT_VEC3", v8::Integer::NewFromUnsigned(isolate, 0x8B54));
|
|
5626
|
+
tmpl->Set(isolate, "INT_VEC4", v8::Integer::NewFromUnsigned(isolate, 0x8B55));
|
|
5627
|
+
tmpl->Set(isolate, "BOOL", v8::Integer::NewFromUnsigned(isolate, 0x8B56));
|
|
5628
|
+
tmpl->Set(isolate, "BOOL_VEC2", v8::Integer::NewFromUnsigned(isolate, 0x8B57));
|
|
5629
|
+
tmpl->Set(isolate, "BOOL_VEC3", v8::Integer::NewFromUnsigned(isolate, 0x8B58));
|
|
5620
5630
|
|
|
5621
5631
|
/* Vertex attributes */
|
|
5622
5632
|
|
|
5623
5633
|
/* Culling */
|
|
5624
5634
|
|
|
5625
|
-
tmpl->Set(isolate, "BOOL_VEC4", v8::
|
|
5626
|
-
tmpl->Set(isolate, "FLOAT_MAT2", v8::
|
|
5627
|
-
tmpl->Set(isolate, "FLOAT_MAT3", v8::
|
|
5628
|
-
tmpl->Set(isolate, "FLOAT_MAT4", v8::
|
|
5635
|
+
tmpl->Set(isolate, "BOOL_VEC4", v8::Integer::NewFromUnsigned(isolate, 0x8B59));
|
|
5636
|
+
tmpl->Set(isolate, "FLOAT_MAT2", v8::Integer::NewFromUnsigned(isolate, 0x8B5A));
|
|
5637
|
+
tmpl->Set(isolate, "FLOAT_MAT3", v8::Integer::NewFromUnsigned(isolate, 0x8B5B));
|
|
5638
|
+
tmpl->Set(isolate, "FLOAT_MAT4", v8::Integer::NewFromUnsigned(isolate, 0x8B5C));
|
|
5629
5639
|
|
|
5630
5640
|
/* Culling */
|
|
5631
5641
|
|
|
5632
5642
|
/* Enabling and disabling */
|
|
5633
5643
|
|
|
5634
|
-
tmpl->Set(isolate, "SAMPLER_2D", v8::
|
|
5635
|
-
tmpl->Set(isolate, "SAMPLER_CUBE", v8::
|
|
5636
|
-
tmpl->Set(isolate, "LOW_FLOAT", v8::
|
|
5637
|
-
tmpl->Set(isolate, "MEDIUM_FLOAT", v8::
|
|
5638
|
-
tmpl->Set(isolate, "HIGH_FLOAT", v8::
|
|
5639
|
-
tmpl->Set(isolate, "LOW_INT", v8::
|
|
5640
|
-
tmpl->Set(isolate, "MEDIUM_INT", v8::
|
|
5641
|
-
tmpl->Set(isolate, "HIGH_INT", v8::
|
|
5644
|
+
tmpl->Set(isolate, "SAMPLER_2D", v8::Integer::NewFromUnsigned(isolate, 0x8B5E));
|
|
5645
|
+
tmpl->Set(isolate, "SAMPLER_CUBE", v8::Integer::NewFromUnsigned(isolate, 0x8B60));
|
|
5646
|
+
tmpl->Set(isolate, "LOW_FLOAT", v8::Integer::NewFromUnsigned(isolate, 0x8DF0));
|
|
5647
|
+
tmpl->Set(isolate, "MEDIUM_FLOAT", v8::Integer::NewFromUnsigned(isolate, 0x8DF1));
|
|
5648
|
+
tmpl->Set(isolate, "HIGH_FLOAT", v8::Integer::NewFromUnsigned(isolate, 0x8DF2));
|
|
5649
|
+
tmpl->Set(isolate, "LOW_INT", v8::Integer::NewFromUnsigned(isolate, 0x8DF3));
|
|
5650
|
+
tmpl->Set(isolate, "MEDIUM_INT", v8::Integer::NewFromUnsigned(isolate, 0x8DF4));
|
|
5651
|
+
tmpl->Set(isolate, "HIGH_INT", v8::Integer::NewFromUnsigned(isolate, 0x8DF5));
|
|
5642
5652
|
|
|
5643
5653
|
/* Enabling and disabling */
|
|
5644
5654
|
|
|
5645
|
-
tmpl->Set(isolate, "FRAMEBUFFER", v8::
|
|
5646
|
-
tmpl->Set(isolate, "RENDERBUFFER", v8::
|
|
5647
|
-
tmpl->Set(isolate, "RGBA4", v8::
|
|
5648
|
-
tmpl->Set(isolate, "RGB5_A1", v8::
|
|
5649
|
-
tmpl->Set(isolate, "RGB565", v8::
|
|
5650
|
-
tmpl->Set(isolate, "DEPTH_COMPONENT16", v8::
|
|
5651
|
-
tmpl->Set(isolate, "STENCIL_INDEX8", v8::
|
|
5655
|
+
tmpl->Set(isolate, "FRAMEBUFFER", v8::Integer::NewFromUnsigned(isolate, 0x8D40));
|
|
5656
|
+
tmpl->Set(isolate, "RENDERBUFFER", v8::Integer::NewFromUnsigned(isolate, 0x8D41));
|
|
5657
|
+
tmpl->Set(isolate, "RGBA4", v8::Integer::NewFromUnsigned(isolate, 0x8056));
|
|
5658
|
+
tmpl->Set(isolate, "RGB5_A1", v8::Integer::NewFromUnsigned(isolate, 0x8057));
|
|
5659
|
+
tmpl->Set(isolate, "RGB565", v8::Integer::NewFromUnsigned(isolate, 0x8D62));
|
|
5660
|
+
tmpl->Set(isolate, "DEPTH_COMPONENT16", v8::Integer::NewFromUnsigned(isolate, 0x81A5));
|
|
5661
|
+
tmpl->Set(isolate, "STENCIL_INDEX8", v8::Integer::NewFromUnsigned(isolate, 0x8D48));
|
|
5652
5662
|
|
|
5653
5663
|
/* Errors */
|
|
5654
5664
|
|
|
5655
5665
|
/* Front face directions */
|
|
5656
5666
|
|
|
5657
|
-
tmpl->Set(isolate, "DEPTH_STENCIL", v8::
|
|
5658
|
-
tmpl->Set(isolate, "RENDERBUFFER_WIDTH", v8::
|
|
5667
|
+
tmpl->Set(isolate, "DEPTH_STENCIL", v8::Integer::NewFromUnsigned(isolate, 0x84F9));
|
|
5668
|
+
tmpl->Set(isolate, "RENDERBUFFER_WIDTH", v8::Integer::NewFromUnsigned(isolate, 0x8D42));
|
|
5659
5669
|
|
|
5660
5670
|
/* Front face directions */
|
|
5661
5671
|
|
|
5662
5672
|
/* Hints */
|
|
5663
5673
|
|
|
5664
|
-
tmpl->Set(isolate, "RENDERBUFFER_HEIGHT", v8::
|
|
5665
|
-
tmpl->Set(isolate, "RENDERBUFFER_INTERNAL_FORMAT",
|
|
5666
|
-
|
|
5667
|
-
tmpl->Set(isolate, "
|
|
5674
|
+
tmpl->Set(isolate, "RENDERBUFFER_HEIGHT", v8::Integer::NewFromUnsigned(isolate, 0x8D43));
|
|
5675
|
+
tmpl->Set(isolate, "RENDERBUFFER_INTERNAL_FORMAT",
|
|
5676
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8D44));
|
|
5677
|
+
tmpl->Set(isolate, "RENDERBUFFER_RED_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x8D50));
|
|
5678
|
+
tmpl->Set(isolate, "RENDERBUFFER_GREEN_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x8D51));
|
|
5668
5679
|
|
|
5669
5680
|
/* Hints */
|
|
5670
5681
|
|
|
5671
5682
|
/* Data types */
|
|
5672
5683
|
|
|
5673
|
-
tmpl->Set(isolate, "RENDERBUFFER_BLUE_SIZE", v8::
|
|
5674
|
-
tmpl->Set(isolate, "RENDERBUFFER_ALPHA_SIZE", v8::
|
|
5675
|
-
tmpl->Set(isolate, "RENDERBUFFER_DEPTH_SIZE", v8::
|
|
5676
|
-
tmpl->Set(isolate, "RENDERBUFFER_STENCIL_SIZE", v8::
|
|
5677
|
-
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",
|
|
5678
|
-
|
|
5679
|
-
tmpl->Set(isolate, "
|
|
5684
|
+
tmpl->Set(isolate, "RENDERBUFFER_BLUE_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x8D52));
|
|
5685
|
+
tmpl->Set(isolate, "RENDERBUFFER_ALPHA_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x8D53));
|
|
5686
|
+
tmpl->Set(isolate, "RENDERBUFFER_DEPTH_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x8D54));
|
|
5687
|
+
tmpl->Set(isolate, "RENDERBUFFER_STENCIL_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x8D55));
|
|
5688
|
+
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",
|
|
5689
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8CD0));
|
|
5690
|
+
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",
|
|
5691
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8CD1));
|
|
5692
|
+
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",
|
|
5693
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8CD2));
|
|
5680
5694
|
|
|
5681
5695
|
/* Data types */
|
|
5682
5696
|
|
|
5683
5697
|
/* Pixel formats */
|
|
5684
5698
|
|
|
5685
5699
|
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",
|
|
5686
|
-
v8::
|
|
5687
|
-
tmpl->Set(isolate, "COLOR_ATTACHMENT0", v8::
|
|
5688
|
-
tmpl->Set(isolate, "DEPTH_ATTACHMENT", v8::
|
|
5689
|
-
tmpl->Set(isolate, "STENCIL_ATTACHMENT", v8::
|
|
5690
|
-
tmpl->Set(isolate, "DEPTH_STENCIL_ATTACHMENT", v8::
|
|
5691
|
-
tmpl->Set(isolate, "NONE", v8::
|
|
5700
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8CD3));
|
|
5701
|
+
tmpl->Set(isolate, "COLOR_ATTACHMENT0", v8::Integer::NewFromUnsigned(isolate, 0x8CE0));
|
|
5702
|
+
tmpl->Set(isolate, "DEPTH_ATTACHMENT", v8::Integer::NewFromUnsigned(isolate, 0x8D00));
|
|
5703
|
+
tmpl->Set(isolate, "STENCIL_ATTACHMENT", v8::Integer::NewFromUnsigned(isolate, 0x8D20));
|
|
5704
|
+
tmpl->Set(isolate, "DEPTH_STENCIL_ATTACHMENT", v8::Integer::NewFromUnsigned(isolate, 0x821A));
|
|
5705
|
+
tmpl->Set(isolate, "NONE", v8::Integer::NewFromUnsigned(isolate, 0));
|
|
5692
5706
|
|
|
5693
5707
|
/* Pixel formats */
|
|
5694
5708
|
|
|
5695
5709
|
/* Pixel types */
|
|
5696
5710
|
|
|
5697
|
-
tmpl->Set(isolate, "FRAMEBUFFER_COMPLETE", v8::
|
|
5698
|
-
tmpl->Set(isolate, "FRAMEBUFFER_INCOMPLETE_ATTACHMENT",
|
|
5711
|
+
tmpl->Set(isolate, "FRAMEBUFFER_COMPLETE", v8::Integer::NewFromUnsigned(isolate, 0x8CD5));
|
|
5712
|
+
tmpl->Set(isolate, "FRAMEBUFFER_INCOMPLETE_ATTACHMENT",
|
|
5713
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8CD6));
|
|
5699
5714
|
tmpl->Set(isolate, "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",
|
|
5700
|
-
v8::
|
|
5715
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8CD7));
|
|
5701
5716
|
|
|
5702
5717
|
/* Pixel types */
|
|
5703
5718
|
|
|
5704
5719
|
/* Shaders */
|
|
5705
5720
|
|
|
5706
|
-
tmpl->Set(isolate, "FRAMEBUFFER_INCOMPLETE_DIMENSIONS",
|
|
5707
|
-
|
|
5708
|
-
tmpl->Set(isolate, "
|
|
5709
|
-
tmpl->Set(isolate, "
|
|
5710
|
-
tmpl->Set(isolate, "
|
|
5711
|
-
tmpl->Set(isolate, "
|
|
5712
|
-
tmpl->Set(isolate, "
|
|
5713
|
-
|
|
5714
|
-
tmpl->Set(isolate, "
|
|
5721
|
+
tmpl->Set(isolate, "FRAMEBUFFER_INCOMPLETE_DIMENSIONS",
|
|
5722
|
+
v8::Integer::NewFromUnsigned(isolate, 0x8CD9));
|
|
5723
|
+
tmpl->Set(isolate, "FRAMEBUFFER_UNSUPPORTED", v8::Integer::NewFromUnsigned(isolate, 0x8CDD));
|
|
5724
|
+
tmpl->Set(isolate, "FRAMEBUFFER_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8CA6));
|
|
5725
|
+
tmpl->Set(isolate, "RENDERBUFFER_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8CA7));
|
|
5726
|
+
tmpl->Set(isolate, "MAX_RENDERBUFFER_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x84E8));
|
|
5727
|
+
tmpl->Set(isolate, "INVALID_FRAMEBUFFER_OPERATION",
|
|
5728
|
+
v8::Integer::NewFromUnsigned(isolate, 0x0506));
|
|
5729
|
+
tmpl->Set(isolate, "UNPACK_FLIP_Y_WEBGL", v8::Integer::NewFromUnsigned(isolate, 0x9240));
|
|
5730
|
+
tmpl->Set(isolate, "UNPACK_PREMULTIPLY_ALPHA_WEBGL",
|
|
5731
|
+
v8::Integer::NewFromUnsigned(isolate, 0x9241));
|
|
5732
|
+
tmpl->Set(isolate, "UNPACK_COLORSPACE_CONVERSION_WEBGL",
|
|
5733
|
+
v8::Integer::NewFromUnsigned(isolate, 0x9243));
|
|
5715
5734
|
}
|
|
5716
5735
|
|
|
5717
5736
|
void WebGLRenderingContext::SetProps(v8::Isolate *isolate,
|