@nativescript/canvas 2.0.0-webgpu.1 → 2.0.0-webgpu.3
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/Canvas/common.d.ts +2 -16
- package/Canvas/common.js +1 -62
- package/Canvas/common.js.map +1 -1
- package/Canvas/index.android.d.ts +6 -7
- package/Canvas/index.android.js +87 -42
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.d.ts +7 -8
- package/Canvas/index.ios.d.ts +3 -2
- package/Canvas/index.ios.js +87 -46
- package/Canvas/index.ios.js.map +1 -1
- package/Canvas2D/CanvasRenderingContext2D/index.js +71 -72
- package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
- package/Canvas2D/DOMMatrix/index.js +1 -1
- package/Canvas2D/DOMMatrix/index.js.map +1 -1
- package/Canvas2D/ImageData/index.js.map +1 -1
- package/Canvas2D/Path2D/index.js.map +1 -1
- package/Dom/Dom.js +8 -1
- package/Dom/Dom.js.map +1 -1
- package/Dom/Group.js.map +1 -1
- package/Dom/Image.d.ts +4 -1
- package/Dom/Image.js +16 -2
- package/Dom/Image.js.map +1 -1
- package/Dom/Paint.js.map +1 -1
- package/Dom/Text.js.map +1 -1
- package/Dom/shaders/LinearGradient.js.map +1 -1
- package/Dom/shaders/TwoPointConicalGradient.js.map +1 -1
- package/Dom/shapes/Atlas.js.map +1 -1
- package/Dom/shapes/Circle.js.map +1 -1
- package/Dom/shapes/Line.js.map +1 -1
- package/Dom/shapes/Oval.js.map +1 -1
- package/Dom/shapes/Path.js.map +1 -1
- package/Dom/shapes/Rect.js.map +1 -1
- package/Dom/shapes/RoundedRect.js.map +1 -1
- package/Dom/shapes/index.js.map +1 -1
- package/ImageAsset/index.d.ts +3 -1
- package/ImageAsset/index.js +38 -6
- package/ImageAsset/index.js.map +1 -1
- package/ImageBitmap/index.js +3 -3
- package/ImageBitmap/index.js.map +1 -1
- package/README.md +64 -3
- package/TextDecoder/index.js +3 -3
- package/TextDecoder/index.js.map +1 -1
- package/TextEncoder/index.js +3 -3
- package/TextEncoder/index.js.map +1 -1
- package/WebGL/WebGLExtensions/index.js +5 -5
- package/WebGL/WebGLExtensions/index.js.map +1 -1
- package/WebGL/WebGLRenderingContext/common.js.map +1 -1
- package/WebGL/WebGLRenderingContext/index.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
- package/WebGPU/Constants.js.map +1 -1
- package/WebGPU/GPU.js.map +1 -1
- package/WebGPU/GPUAdapter.js.map +1 -1
- package/WebGPU/GPUAdapterInfo.js.map +1 -1
- package/WebGPU/GPUBindGroup.js.map +1 -1
- package/WebGPU/GPUBindGroupLayout.js.map +1 -1
- package/WebGPU/GPUBuffer.js +5 -1
- package/WebGPU/GPUBuffer.js.map +1 -1
- package/WebGPU/GPUCanvasContext.js.map +1 -1
- package/WebGPU/GPUCommandBuffer.js.map +1 -1
- package/WebGPU/GPUCommandEncoder.js.map +1 -1
- package/WebGPU/GPUComputePassEncoder.js.map +1 -1
- package/WebGPU/GPUComputePipeline.js.map +1 -1
- package/WebGPU/GPUDevice.d.ts +2 -2
- package/WebGPU/GPUDevice.js +4 -3
- package/WebGPU/GPUDevice.js.map +1 -1
- package/WebGPU/GPUExternalTexture.js.map +1 -1
- package/WebGPU/GPUPipelineLayout.js.map +1 -1
- package/WebGPU/GPUQuerySet.js.map +1 -1
- package/WebGPU/GPUQueue.js.map +1 -1
- package/WebGPU/GPURenderBundle.js.map +1 -1
- package/WebGPU/GPURenderBundleEncoder.js.map +1 -1
- package/WebGPU/GPURenderPassEncoder.js +2 -2
- package/WebGPU/GPURenderPassEncoder.js.map +1 -1
- package/WebGPU/GPURenderPipeline.js.map +1 -1
- package/WebGPU/GPUSampler.js.map +1 -1
- package/WebGPU/GPUShaderModule.js.map +1 -1
- package/WebGPU/GPUTexture.js.map +1 -1
- package/WebGPU/GPUTextureView.js.map +1 -1
- package/WebGPU/Types.d.ts +27 -27
- package/WebGPU/Utils.d.ts +1 -1
- package/WebGPU/Utils.js.map +1 -1
- package/angular/{esm2020 → esm2022}/index.mjs +5 -5
- package/angular/{fesm2015 → fesm2022}/nativescript-canvas-angular.mjs +4 -4
- package/angular/{fesm2020 → fesm2022}/nativescript-canvas-angular.mjs.map +1 -1
- package/angular/package.json +4 -10
- package/helpers.js.map +1 -1
- package/package.json +2 -2
- package/platforms/android/canvas-release.aar +0 -0
- package/platforms/ios/CanvasNative.xcframework/Info.plist +5 -5
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +21 -9
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +2049 -2061
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +752 -108
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +35 -9
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +35 -9
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/NSCCanvas.nib +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +644 -602
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +42 -18
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +2049 -2061
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +752 -108
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +35 -9
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +35 -9
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +752 -108
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +35 -9
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +35 -9
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/NSCCanvas.nib +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +24 -24
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +646 -604
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +684 -638
- package/platforms/ios/src/NSOperationQueueWrapper.h +2 -0
- package/platforms/ios/src/cpp/AsyncCallback.h +206 -0
- package/platforms/ios/src/cpp/CanvasJSIModule.cpp +13 -13
- package/platforms/ios/src/cpp/Helpers.h +2 -164
- package/platforms/ios/src/cpp/ImageAssetImpl.cpp +13 -13
- package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +1 -1
- package/platforms/ios/src/cpp/ImageBitmapImpl.h +2 -1
- package/platforms/ios/src/cpp/JSIReadFileCallback.h +4 -4
- package/platforms/ios/src/cpp/NativeType.h +87 -0
- package/platforms/ios/src/cpp/ObjectWrapperImpl.h +50 -0
- package/platforms/ios/src/cpp/OneByteStringResource.cpp +2 -2
- package/platforms/ios/src/cpp/PromiseCallback.h +198 -0
- package/platforms/ios/src/cpp/RafImpl.h +2 -2
- package/platforms/ios/src/cpp/TextDecoderImpl.cpp +0 -6
- package/platforms/ios/src/cpp/TextDecoderImpl.h +3 -3
- package/platforms/ios/src/cpp/TextEncoderImpl.cpp +1 -1
- package/platforms/ios/src/cpp/TextEncoderImpl.h +3 -3
- package/platforms/ios/src/cpp/canvas2d/CanvasGradient.h +8 -7
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.cpp +1 -1
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.h +3 -3
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +145 -75
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +74 -20
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.cpp +5 -6
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.h +4 -4
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.cpp +10 -10
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.h +2 -2
- package/platforms/ios/src/cpp/canvas2d/Path2D.cpp +6 -3
- package/platforms/ios/src/cpp/canvas2d/Path2D.h +2 -2
- package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.h +3 -3
- package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/WebGLBuffer.h +1 -1
- package/platforms/ios/src/cpp/webgl/WebGLFramebuffer.h +1 -1
- package/platforms/ios/src/cpp/webgl/WebGLProgram.h +3 -3
- package/platforms/ios/src/cpp/webgl/WebGLRenderbuffer.h +3 -3
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +8 -8
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.h +1 -1
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.cpp +1 -1
- package/platforms/ios/src/cpp/webgl/WebGLShader.h +1 -1
- package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.h +5 -5
- package/platforms/ios/src/cpp/webgl/WebGLTexture.h +3 -2
- package/platforms/ios/src/cpp/webgl/WebGLUniformLocation.h +2 -2
- package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/EXT_shader_texture_lodImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.h +2 -2
- package/platforms/ios/src/cpp/webgl/extensions/OES_fbo_render_mipmap.h +5 -5
- package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_floatImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_float_linearImpl.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_texture_half_float_linearImpl.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 +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.h +1 -1
- 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 +2 -2
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp +722 -722
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.h +1 -1
- package/platforms/ios/src/cpp/webgl2/WebGLQuery.h +1 -1
- package/platforms/ios/src/cpp/webgl2/WebGLSampler.h +1 -1
- package/platforms/ios/src/cpp/webgl2/WebGLSyncImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl2/WebGLTransformFeedback.h +1 -1
- package/platforms/ios/src/cpp/webgl2/WebGLVertexArrayObject.h +2 -2
- package/platforms/ios/src/cpp/webgpu/GPUAdapterImpl.cpp +124 -58
- package/platforms/ios/src/cpp/webgpu/GPUAdapterImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUAdapterInfoImpl.cpp +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUAdapterInfoImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupImpl.cpp +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupLayoutImpl.cpp +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupLayoutImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUBufferImpl.cpp +44 -30
- package/platforms/ios/src/cpp/webgpu/GPUBufferImpl.h +4 -4
- package/platforms/ios/src/cpp/webgpu/GPUCanvasContextImpl.cpp +11 -11
- package/platforms/ios/src/cpp/webgpu/GPUCanvasContextImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUCommandBufferImpl.cpp +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUCommandBufferImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUCommandEncoderImpl.cpp +30 -31
- package/platforms/ios/src/cpp/webgpu/GPUCommandEncoderImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUComputePassEncoderImpl.cpp +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUComputePassEncoderImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUComputePipelineImpl.cpp +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUComputePipelineImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.cpp +99 -73
- package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.h +2 -2
- package/platforms/ios/src/cpp/webgpu/GPUImpl.cpp +54 -41
- package/platforms/ios/src/cpp/webgpu/GPUImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUPipelineLayoutImpl.cpp +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUPipelineLayoutImpl.h +5 -4
- package/platforms/ios/src/cpp/webgpu/GPUQuerySetImpl.cpp +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUQuerySetImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUQueueImpl.cpp +38 -23
- package/platforms/ios/src/cpp/webgpu/GPUQueueImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleEncoderImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleImpl.cpp +1 -1
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPURenderPassEncoderImpl.cpp +4 -3
- package/platforms/ios/src/cpp/webgpu/GPURenderPassEncoderImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPURenderPipelineImpl.cpp +1 -1
- package/platforms/ios/src/cpp/webgpu/GPURenderPipelineImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUSamplerImpl.cpp +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUSamplerImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUShaderModuleImpl.cpp +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUShaderModuleImpl.h +2 -2
- package/platforms/ios/src/cpp/webgpu/GPUSupportedLimitsImpl.cpp +2 -2
- package/platforms/ios/src/cpp/webgpu/GPUSupportedLimitsImpl.h +2 -2
- package/platforms/ios/src/cpp/webgpu/GPUTextureImpl.h +4 -4
- package/platforms/ios/src/cpp/webgpu/GPUTextureViewImpl.cpp +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUTextureViewImpl.h +2 -2
- package/react/index.d.ts +1 -1
- package/utils.js.map +1 -1
- package/angular/fesm2015/nativescript-canvas-angular.mjs.map +0 -1
- package/angular/fesm2020/nativescript-canvas-angular.mjs +0 -24
- package/typings/objc!CanvasNative.d.ts +0 -2038
- package/typings/objc!CanvasNative.js +0 -1
- package/typings/objc!CanvasNative.js.map +0 -1
- /package/angular/{esm2020 → esm2022}/nativescript-canvas-angular.mjs +0 -0
|
@@ -306,19 +306,19 @@ v8::Local<v8::FunctionTemplate> WebGL2RenderingContext::GetCtor(v8::Isolate *iso
|
|
|
306
306
|
if (ctor != nullptr) {
|
|
307
307
|
return ctor->Get(isolate);
|
|
308
308
|
}
|
|
309
|
-
|
|
309
|
+
|
|
310
310
|
v8::Local<v8::FunctionTemplate> ctorTmpl = v8::FunctionTemplate::New(isolate);
|
|
311
311
|
ctorTmpl->InstanceTemplate()->SetInternalFieldCount(2);
|
|
312
312
|
ctorTmpl->SetClassName(ConvertToV8String(isolate, "WebGL2RenderingContext"));
|
|
313
|
-
|
|
313
|
+
|
|
314
314
|
auto tmpl = ctorTmpl->InstanceTemplate();
|
|
315
315
|
tmpl->SetInternalFieldCount(2);
|
|
316
316
|
WebGLRenderingContext::SetConstants(isolate, tmpl);
|
|
317
317
|
SetConstants(isolate, tmpl);
|
|
318
|
-
|
|
318
|
+
|
|
319
319
|
WebGLRenderingContext::SetMethods(isolate, tmpl);
|
|
320
320
|
SetMethods(isolate, tmpl);
|
|
321
|
-
|
|
321
|
+
|
|
322
322
|
WebGLRenderingContext::SetProps(isolate, tmpl);
|
|
323
323
|
SetProps(isolate, tmpl);
|
|
324
324
|
cache->WebGL2RenderingContextTmpl =
|
|
@@ -339,16 +339,16 @@ void WebGL2RenderingContext::BeginQuery(const v8::FunctionCallbackInfo<v8::Value
|
|
|
339
339
|
if (ptr == nullptr) {
|
|
340
340
|
return;
|
|
341
341
|
}
|
|
342
|
-
|
|
342
|
+
|
|
343
343
|
auto isolate = args.GetIsolate();
|
|
344
344
|
auto context = isolate->GetCurrentContext();
|
|
345
|
-
|
|
345
|
+
|
|
346
346
|
auto value = args[1];
|
|
347
347
|
auto type = GetNativeType(value);
|
|
348
348
|
if (type == NativeType::WebGLQuery) {
|
|
349
349
|
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
350
350
|
auto query = WebGLQuery::GetPointer(value.As<v8::Object>());
|
|
351
|
-
|
|
351
|
+
|
|
352
352
|
if (query != nullptr) {
|
|
353
353
|
canvas_native_webgl2_begin_query(
|
|
354
354
|
target,
|
|
@@ -365,10 +365,10 @@ WebGL2RenderingContext::BeginTransformFeedback(const v8::FunctionCallbackInfo<v8
|
|
|
365
365
|
if (ptr == nullptr) {
|
|
366
366
|
return;
|
|
367
367
|
}
|
|
368
|
-
|
|
368
|
+
|
|
369
369
|
auto isolate = args.GetIsolate();
|
|
370
370
|
auto context = isolate->GetCurrentContext();
|
|
371
|
-
|
|
371
|
+
|
|
372
372
|
auto value = args[0]->Uint32Value(context).ToChecked();
|
|
373
373
|
canvas_native_webgl2_begin_transform_feedback(
|
|
374
374
|
value,
|
|
@@ -381,19 +381,19 @@ void WebGL2RenderingContext::BindBufferBase(const v8::FunctionCallbackInfo<v8::V
|
|
|
381
381
|
if (ptr == nullptr) {
|
|
382
382
|
return;
|
|
383
383
|
}
|
|
384
|
-
|
|
384
|
+
|
|
385
385
|
auto isolate = args.GetIsolate();
|
|
386
386
|
auto context = isolate->GetCurrentContext();
|
|
387
|
-
|
|
387
|
+
|
|
388
388
|
auto bufferValue = args[2];
|
|
389
389
|
auto type = GetNativeType(bufferValue);
|
|
390
|
-
|
|
390
|
+
|
|
391
391
|
if (type == NativeType::WebGLBuffer) {
|
|
392
392
|
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
393
393
|
auto index = args[1]->Uint32Value(context).ToChecked();
|
|
394
|
-
|
|
394
|
+
|
|
395
395
|
auto buffer = WebGLBuffer::GetPointer(bufferValue.As<v8::Object>());
|
|
396
|
-
|
|
396
|
+
|
|
397
397
|
canvas_native_webgl2_bind_buffer_base(
|
|
398
398
|
target,
|
|
399
399
|
index,
|
|
@@ -408,10 +408,10 @@ void WebGL2RenderingContext::BindBufferRange(const v8::FunctionCallbackInfo<v8::
|
|
|
408
408
|
if (ptr == nullptr) {
|
|
409
409
|
return;
|
|
410
410
|
}
|
|
411
|
-
|
|
411
|
+
|
|
412
412
|
auto isolate = args.GetIsolate();
|
|
413
413
|
auto context = isolate->GetCurrentContext();
|
|
414
|
-
|
|
414
|
+
|
|
415
415
|
auto bufferValue = args[2];
|
|
416
416
|
auto type = GetNativeType(bufferValue);
|
|
417
417
|
if (type == NativeType::WebGLBuffer) {
|
|
@@ -436,16 +436,16 @@ void WebGL2RenderingContext::BindSampler(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
436
436
|
if (ptr == nullptr) {
|
|
437
437
|
return;
|
|
438
438
|
}
|
|
439
|
-
|
|
439
|
+
|
|
440
440
|
auto isolate = args.GetIsolate();
|
|
441
441
|
auto context = isolate->GetCurrentContext();
|
|
442
|
-
|
|
442
|
+
|
|
443
443
|
auto samplerValue = args[1];
|
|
444
444
|
auto type = GetNativeType(samplerValue);
|
|
445
445
|
if (type == NativeType::WebGLSampler) {
|
|
446
446
|
auto unit = args[0]->Uint32Value(context).ToChecked();
|
|
447
447
|
auto sampler = WebGLSampler::GetPointer(samplerValue.As<v8::Object>());
|
|
448
|
-
|
|
448
|
+
|
|
449
449
|
canvas_native_webgl2_bind_sampler(
|
|
450
450
|
unit,
|
|
451
451
|
sampler->GetSampler(),
|
|
@@ -460,18 +460,18 @@ WebGL2RenderingContext::BindTransformFeedback(const v8::FunctionCallbackInfo<v8:
|
|
|
460
460
|
if (ptr == nullptr) {
|
|
461
461
|
return;
|
|
462
462
|
}
|
|
463
|
-
|
|
463
|
+
|
|
464
464
|
auto isolate = args.GetIsolate();
|
|
465
465
|
auto context = isolate->GetCurrentContext();
|
|
466
|
-
|
|
466
|
+
|
|
467
467
|
auto transformFeedbackValue = args[1];
|
|
468
468
|
auto type = GetNativeType(transformFeedbackValue);
|
|
469
|
-
|
|
469
|
+
|
|
470
470
|
if (type == NativeType::WebGLTransformFeedback) {
|
|
471
471
|
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
472
472
|
auto transformFeedback = WebGLTransformFeedback::GetPointer(
|
|
473
473
|
transformFeedbackValue.As<v8::Object>());
|
|
474
|
-
|
|
474
|
+
|
|
475
475
|
canvas_native_webgl2_bind_transform_feedback(
|
|
476
476
|
target,
|
|
477
477
|
transformFeedback->GetFeedback(),
|
|
@@ -485,9 +485,9 @@ void WebGL2RenderingContext::BindVertexArray(const v8::FunctionCallbackInfo<v8::
|
|
|
485
485
|
if (ptr == nullptr) {
|
|
486
486
|
return;
|
|
487
487
|
}
|
|
488
|
-
|
|
488
|
+
|
|
489
489
|
auto isolate = args.GetIsolate();
|
|
490
|
-
|
|
490
|
+
|
|
491
491
|
auto value = args[0];
|
|
492
492
|
if (value->IsNull()) {
|
|
493
493
|
canvas_native_webgl2_bind_vertex_array(
|
|
@@ -496,11 +496,11 @@ void WebGL2RenderingContext::BindVertexArray(const v8::FunctionCallbackInfo<v8::
|
|
|
496
496
|
);
|
|
497
497
|
return;
|
|
498
498
|
}
|
|
499
|
-
|
|
499
|
+
|
|
500
500
|
auto type = GetNativeType(value);
|
|
501
501
|
if (type == NativeType::WebGLVertexArrayObject) {
|
|
502
502
|
auto vertexArray = WebGLVertexArrayObject::GetPointer(value.As<v8::Object>());
|
|
503
|
-
|
|
503
|
+
|
|
504
504
|
if (vertexArray != nullptr) {
|
|
505
505
|
canvas_native_webgl2_bind_vertex_array(
|
|
506
506
|
vertexArray->GetVertexArrayObject(),
|
|
@@ -515,22 +515,22 @@ void WebGL2RenderingContext::BlitFramebuffer(const v8::FunctionCallbackInfo<v8::
|
|
|
515
515
|
if (ptr == nullptr) {
|
|
516
516
|
return;
|
|
517
517
|
}
|
|
518
|
-
|
|
518
|
+
|
|
519
519
|
auto isolate = args.GetIsolate();
|
|
520
520
|
auto context = isolate->GetCurrentContext();
|
|
521
|
-
|
|
521
|
+
|
|
522
522
|
auto srcX0 = args[0]->Int32Value(context).ToChecked();
|
|
523
523
|
auto srcY0 = args[1]->Int32Value(context).ToChecked();
|
|
524
|
-
|
|
524
|
+
|
|
525
525
|
auto srcX1 = args[2]->Int32Value(context).ToChecked();
|
|
526
526
|
auto srcY1 = args[3]->Int32Value(context).ToChecked();
|
|
527
|
-
|
|
527
|
+
|
|
528
528
|
auto dstX0 = args[4]->Int32Value(context).ToChecked();
|
|
529
529
|
auto dstY0 = args[5]->Int32Value(context).ToChecked();
|
|
530
|
-
|
|
530
|
+
|
|
531
531
|
auto dstX1 = args[6]->Int32Value(context).ToChecked();
|
|
532
532
|
auto dstY1 = args[7]->Int32Value(context).ToChecked();
|
|
533
|
-
|
|
533
|
+
|
|
534
534
|
auto mask = args[8]->Uint32Value(context).ToChecked();
|
|
535
535
|
auto filter = args[9]->Uint32Value(context).ToChecked();
|
|
536
536
|
canvas_native_webgl2_blit_framebuffer(
|
|
@@ -553,10 +553,10 @@ void WebGL2RenderingContext::ClearBufferfv(const v8::FunctionCallbackInfo<v8::Va
|
|
|
553
553
|
if (ptr == nullptr) {
|
|
554
554
|
return;
|
|
555
555
|
}
|
|
556
|
-
|
|
556
|
+
|
|
557
557
|
auto isolate = args.GetIsolate();
|
|
558
558
|
auto context = isolate->GetCurrentContext();
|
|
559
|
-
|
|
559
|
+
|
|
560
560
|
auto values = args[2];
|
|
561
561
|
auto buffer = args[0]->Uint32Value(context).ToChecked();
|
|
562
562
|
auto drawbuffer = args[1]->Int32Value(context).ToChecked();
|
|
@@ -572,7 +572,7 @@ void WebGL2RenderingContext::ClearBufferfv(const v8::FunctionCallbackInfo<v8::Va
|
|
|
572
572
|
static_cast<float>(item->NumberValue(context).ToChecked())
|
|
573
573
|
);
|
|
574
574
|
}
|
|
575
|
-
|
|
575
|
+
|
|
576
576
|
canvas_native_webgl2_clear_bufferfv(
|
|
577
577
|
buffer,
|
|
578
578
|
drawbuffer,
|
|
@@ -580,7 +580,7 @@ void WebGL2RenderingContext::ClearBufferfv(const v8::FunctionCallbackInfo<v8::Va
|
|
|
580
580
|
buf.size(),
|
|
581
581
|
ptr->GetState()
|
|
582
582
|
);
|
|
583
|
-
|
|
583
|
+
|
|
584
584
|
} else if (values->IsFloat32Array()) {
|
|
585
585
|
auto buf = values.As<v8::Float32Array>();
|
|
586
586
|
auto array = buf->Buffer();
|
|
@@ -588,8 +588,8 @@ void WebGL2RenderingContext::ClearBufferfv(const v8::FunctionCallbackInfo<v8::Va
|
|
|
588
588
|
auto size = buf->Length();
|
|
589
589
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
590
590
|
auto data = static_cast<float *>((void *) data_ptr);
|
|
591
|
-
|
|
592
|
-
|
|
591
|
+
|
|
592
|
+
|
|
593
593
|
canvas_native_webgl2_clear_bufferfv(
|
|
594
594
|
buffer,
|
|
595
595
|
drawbuffer,
|
|
@@ -605,12 +605,12 @@ void WebGL2RenderingContext::ClearBufferiv(const v8::FunctionCallbackInfo<v8::Va
|
|
|
605
605
|
if (ptr == nullptr) {
|
|
606
606
|
return;
|
|
607
607
|
}
|
|
608
|
-
|
|
608
|
+
|
|
609
609
|
auto isolate = args.GetIsolate();
|
|
610
610
|
auto context = isolate->GetCurrentContext();
|
|
611
|
-
|
|
611
|
+
|
|
612
612
|
auto values = args[2];
|
|
613
|
-
|
|
613
|
+
|
|
614
614
|
auto buffer = args[0]->Uint32Value(context).ToChecked();
|
|
615
615
|
auto drawbuffer = args[1]->Int32Value(context).ToChecked();
|
|
616
616
|
if (values->IsArray()) {
|
|
@@ -625,8 +625,8 @@ void WebGL2RenderingContext::ClearBufferiv(const v8::FunctionCallbackInfo<v8::Va
|
|
|
625
625
|
item->Int32Value(context).ToChecked()
|
|
626
626
|
);
|
|
627
627
|
}
|
|
628
|
-
|
|
629
|
-
|
|
628
|
+
|
|
629
|
+
|
|
630
630
|
canvas_native_webgl2_clear_bufferiv(
|
|
631
631
|
buffer,
|
|
632
632
|
drawbuffer,
|
|
@@ -634,17 +634,17 @@ void WebGL2RenderingContext::ClearBufferiv(const v8::FunctionCallbackInfo<v8::Va
|
|
|
634
634
|
buf.size(),
|
|
635
635
|
ptr->GetState()
|
|
636
636
|
);
|
|
637
|
-
|
|
637
|
+
|
|
638
638
|
} else if (values->IsInt32Array()) {
|
|
639
639
|
auto buf = values.As<v8::Int32Array>();
|
|
640
|
-
|
|
640
|
+
|
|
641
641
|
auto array = buf->Buffer();
|
|
642
642
|
auto offset = buf->ByteOffset();
|
|
643
643
|
auto size = buf->Length();
|
|
644
644
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
645
645
|
auto data = static_cast<int32_t *>((void *) data_ptr);
|
|
646
|
-
|
|
647
|
-
|
|
646
|
+
|
|
647
|
+
|
|
648
648
|
canvas_native_webgl2_clear_bufferiv(
|
|
649
649
|
buffer,
|
|
650
650
|
drawbuffer,
|
|
@@ -660,10 +660,10 @@ void WebGL2RenderingContext::ClearBufferfi(const v8::FunctionCallbackInfo<v8::Va
|
|
|
660
660
|
if (ptr == nullptr) {
|
|
661
661
|
return;
|
|
662
662
|
}
|
|
663
|
-
|
|
663
|
+
|
|
664
664
|
auto isolate = args.GetIsolate();
|
|
665
665
|
auto context = isolate->GetCurrentContext();
|
|
666
|
-
|
|
666
|
+
|
|
667
667
|
auto buffer = args[0]->Uint32Value(context).ToChecked();
|
|
668
668
|
auto drawbuffer = args[1]->Int32Value(context).ToChecked();
|
|
669
669
|
auto depth = args[2]->NumberValue(context).ToChecked();
|
|
@@ -682,13 +682,13 @@ void WebGL2RenderingContext::ClearBufferuiv(const v8::FunctionCallbackInfo<v8::V
|
|
|
682
682
|
if (ptr == nullptr) {
|
|
683
683
|
return;
|
|
684
684
|
}
|
|
685
|
-
|
|
685
|
+
|
|
686
686
|
auto isolate = args.GetIsolate();
|
|
687
687
|
auto context = isolate->GetCurrentContext();
|
|
688
|
-
|
|
689
|
-
|
|
688
|
+
|
|
689
|
+
|
|
690
690
|
auto values = args[2];
|
|
691
|
-
|
|
691
|
+
|
|
692
692
|
auto buffer = args[0]->Uint32Value(context).ToChecked();
|
|
693
693
|
auto drawbuffer = args[1]->Int32Value(context).ToChecked();
|
|
694
694
|
if (values->IsArray()) {
|
|
@@ -703,8 +703,8 @@ void WebGL2RenderingContext::ClearBufferuiv(const v8::FunctionCallbackInfo<v8::V
|
|
|
703
703
|
item->Uint32Value(context).ToChecked()
|
|
704
704
|
);
|
|
705
705
|
}
|
|
706
|
-
|
|
707
|
-
|
|
706
|
+
|
|
707
|
+
|
|
708
708
|
canvas_native_webgl2_clear_bufferuiv(
|
|
709
709
|
buffer,
|
|
710
710
|
drawbuffer,
|
|
@@ -712,7 +712,7 @@ void WebGL2RenderingContext::ClearBufferuiv(const v8::FunctionCallbackInfo<v8::V
|
|
|
712
712
|
buf.size(),
|
|
713
713
|
ptr->GetState()
|
|
714
714
|
);
|
|
715
|
-
|
|
715
|
+
|
|
716
716
|
} else if (values->IsUint32Array()) {
|
|
717
717
|
auto buf = values.As<v8::Uint32Array>();
|
|
718
718
|
auto array = buf->Buffer();
|
|
@@ -720,8 +720,8 @@ void WebGL2RenderingContext::ClearBufferuiv(const v8::FunctionCallbackInfo<v8::V
|
|
|
720
720
|
auto size = buf->Length();
|
|
721
721
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
722
722
|
auto data = static_cast<uint32_t *>((void *) data_ptr);
|
|
723
|
-
|
|
724
|
-
|
|
723
|
+
|
|
724
|
+
|
|
725
725
|
canvas_native_webgl2_clear_bufferuiv(
|
|
726
726
|
buffer,
|
|
727
727
|
drawbuffer,
|
|
@@ -736,10 +736,10 @@ void WebGL2RenderingContext::ClientWaitSync(const v8::FunctionCallbackInfo<v8::V
|
|
|
736
736
|
if (ptr == nullptr) {
|
|
737
737
|
return;
|
|
738
738
|
}
|
|
739
|
-
|
|
739
|
+
|
|
740
740
|
auto isolate = args.GetIsolate();
|
|
741
741
|
auto context = isolate->GetCurrentContext();
|
|
742
|
-
|
|
742
|
+
|
|
743
743
|
auto syncValue = args[0];
|
|
744
744
|
auto type = GetNativeType(syncValue);
|
|
745
745
|
if (args.Length() > 2 && type == NativeType::WebGLSync) {
|
|
@@ -753,7 +753,7 @@ void WebGL2RenderingContext::ClientWaitSync(const v8::FunctionCallbackInfo<v8::V
|
|
|
753
753
|
static_cast<ssize_t>(timeout),
|
|
754
754
|
ptr->GetState()
|
|
755
755
|
);
|
|
756
|
-
|
|
756
|
+
|
|
757
757
|
args.GetReturnValue().Set(ret);
|
|
758
758
|
return;
|
|
759
759
|
}
|
|
@@ -768,10 +768,10 @@ WebGL2RenderingContext::CompressedTexSubImage3D(const v8::FunctionCallbackInfo<v
|
|
|
768
768
|
if (ptr == nullptr) {
|
|
769
769
|
return;
|
|
770
770
|
}
|
|
771
|
-
|
|
771
|
+
|
|
772
772
|
auto isolate = args.GetIsolate();
|
|
773
773
|
auto context = isolate->GetCurrentContext();
|
|
774
|
-
|
|
774
|
+
|
|
775
775
|
if (args.Length() > 8) {
|
|
776
776
|
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
777
777
|
auto level = args[1]->Int32Value(context).ToChecked();
|
|
@@ -782,7 +782,7 @@ WebGL2RenderingContext::CompressedTexSubImage3D(const v8::FunctionCallbackInfo<v
|
|
|
782
782
|
auto height = args[6]->Int32Value(context).ToChecked();
|
|
783
783
|
auto depth = args[7]->Int32Value(context).ToChecked();
|
|
784
784
|
auto format = args[8]->Uint32Value(context).ToChecked();
|
|
785
|
-
|
|
785
|
+
|
|
786
786
|
auto imageSizeOrBufValue = args[0];
|
|
787
787
|
if (args[9]->IsObject()) {
|
|
788
788
|
if (imageSizeOrBufValue->IsArrayBufferView()) {
|
|
@@ -792,7 +792,7 @@ WebGL2RenderingContext::CompressedTexSubImage3D(const v8::FunctionCallbackInfo<v
|
|
|
792
792
|
auto size = buf->ByteLength();
|
|
793
793
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
794
794
|
auto data = static_cast<uint8_t *>((void *) data_ptr);
|
|
795
|
-
|
|
795
|
+
|
|
796
796
|
size_t srcOffset = 0;
|
|
797
797
|
if (args[10]->IsNumber()) {
|
|
798
798
|
srcOffset = static_cast<size_t>(args[10]->NumberValue(context).ToChecked());
|
|
@@ -802,8 +802,8 @@ WebGL2RenderingContext::CompressedTexSubImage3D(const v8::FunctionCallbackInfo<v
|
|
|
802
802
|
srcLengthOverride = static_cast<size_t>(args[11]->NumberValue(
|
|
803
803
|
context).ToChecked());
|
|
804
804
|
}
|
|
805
|
-
|
|
806
|
-
|
|
805
|
+
|
|
806
|
+
|
|
807
807
|
canvas_native_webgl2_compressed_tex_sub_image3d(
|
|
808
808
|
target,
|
|
809
809
|
level,
|
|
@@ -850,10 +850,10 @@ void WebGL2RenderingContext::CopyBufferSubData(const v8::FunctionCallbackInfo<v8
|
|
|
850
850
|
if (ptr == nullptr) {
|
|
851
851
|
return;
|
|
852
852
|
}
|
|
853
|
-
|
|
853
|
+
|
|
854
854
|
auto isolate = args.GetIsolate();
|
|
855
855
|
auto context = isolate->GetCurrentContext();
|
|
856
|
-
|
|
856
|
+
|
|
857
857
|
auto readTarget = args[0]->Uint32Value(context).ToChecked();
|
|
858
858
|
auto writeTarget = args[1]->Uint32Value(context).ToChecked();
|
|
859
859
|
auto readOffset = args[2]->NumberValue(context).ToChecked();
|
|
@@ -874,10 +874,10 @@ void WebGL2RenderingContext::CopyTexSubImage3D(const v8::FunctionCallbackInfo<v8
|
|
|
874
874
|
if (ptr == nullptr) {
|
|
875
875
|
return;
|
|
876
876
|
}
|
|
877
|
-
|
|
877
|
+
|
|
878
878
|
auto isolate = args.GetIsolate();
|
|
879
879
|
auto context = isolate->GetCurrentContext();
|
|
880
|
-
|
|
880
|
+
|
|
881
881
|
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
882
882
|
auto level = args[1]->Int32Value(context).ToChecked();
|
|
883
883
|
auto xoffset = args[2]->Int32Value(context).ToChecked();
|
|
@@ -907,13 +907,13 @@ void WebGL2RenderingContext::CreateQuery(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
907
907
|
args.GetReturnValue().SetUndefined();
|
|
908
908
|
return;
|
|
909
909
|
}
|
|
910
|
-
|
|
910
|
+
|
|
911
911
|
auto isolate = args.GetIsolate();
|
|
912
|
-
|
|
912
|
+
|
|
913
913
|
auto ret = canvas_native_webgl2_create_query(
|
|
914
914
|
ptr->GetState());
|
|
915
915
|
auto query = WebGLQuery::NewInstance(isolate, new WebGLQuery(ret));
|
|
916
|
-
|
|
916
|
+
|
|
917
917
|
args.GetReturnValue().Set(query);
|
|
918
918
|
}
|
|
919
919
|
|
|
@@ -923,13 +923,13 @@ void WebGL2RenderingContext::CreateSampler(const v8::FunctionCallbackInfo<v8::Va
|
|
|
923
923
|
args.GetReturnValue().SetUndefined();
|
|
924
924
|
return;
|
|
925
925
|
}
|
|
926
|
-
|
|
926
|
+
|
|
927
927
|
auto isolate = args.GetIsolate();
|
|
928
|
-
|
|
928
|
+
|
|
929
929
|
auto ret = canvas_native_webgl2_create_sampler(
|
|
930
930
|
ptr->GetState());
|
|
931
931
|
auto sampler = WebGLSampler::NewInstance(isolate, new WebGLSampler(ret));
|
|
932
|
-
|
|
932
|
+
|
|
933
933
|
args.GetReturnValue().Set(sampler);
|
|
934
934
|
}
|
|
935
935
|
|
|
@@ -940,15 +940,15 @@ WebGL2RenderingContext::CreateTransformFeedback(const v8::FunctionCallbackInfo<v
|
|
|
940
940
|
args.GetReturnValue().SetUndefined();
|
|
941
941
|
return;
|
|
942
942
|
}
|
|
943
|
-
|
|
943
|
+
|
|
944
944
|
auto isolate = args.GetIsolate();
|
|
945
|
-
|
|
945
|
+
|
|
946
946
|
auto ret = canvas_native_webgl2_create_transform_feedback(
|
|
947
947
|
ptr->GetState());
|
|
948
|
-
|
|
948
|
+
|
|
949
949
|
auto feedback = WebGLTransformFeedback::NewInstance(isolate, new WebGLTransformFeedback(
|
|
950
950
|
ret));
|
|
951
|
-
|
|
951
|
+
|
|
952
952
|
args.GetReturnValue().Set(feedback);
|
|
953
953
|
}
|
|
954
954
|
|
|
@@ -958,15 +958,15 @@ void WebGL2RenderingContext::CreateVertexArray(const v8::FunctionCallbackInfo<v8
|
|
|
958
958
|
args.GetReturnValue().SetUndefined();
|
|
959
959
|
return;
|
|
960
960
|
}
|
|
961
|
-
|
|
961
|
+
|
|
962
962
|
auto isolate = args.GetIsolate();
|
|
963
|
-
|
|
963
|
+
|
|
964
964
|
auto ret = canvas_native_webgl2_create_vertex_array(
|
|
965
965
|
ptr->GetState());
|
|
966
|
-
|
|
966
|
+
|
|
967
967
|
auto vertexArrayObject = WebGLVertexArrayObject::NewInstance(isolate,
|
|
968
968
|
new WebGLVertexArrayObject(ret));
|
|
969
|
-
|
|
969
|
+
|
|
970
970
|
args.GetReturnValue().Set(vertexArrayObject);
|
|
971
971
|
}
|
|
972
972
|
|
|
@@ -975,14 +975,14 @@ void WebGL2RenderingContext::DeleteQuery(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
975
975
|
if (ptr == nullptr) {
|
|
976
976
|
return;
|
|
977
977
|
}
|
|
978
|
-
|
|
978
|
+
|
|
979
979
|
auto isolate = args.GetIsolate();
|
|
980
|
-
|
|
980
|
+
|
|
981
981
|
auto queryValue = args[0];
|
|
982
982
|
auto type = GetNativeType(queryValue);
|
|
983
983
|
if (type == NativeType::WebGLQuery) {
|
|
984
984
|
auto query = WebGLQuery::GetPointer(queryValue.As<v8::Object>());
|
|
985
|
-
|
|
985
|
+
|
|
986
986
|
if (query != nullptr) {
|
|
987
987
|
canvas_native_webgl2_delete_query_with_query(
|
|
988
988
|
query->GetQuery(),
|
|
@@ -997,16 +997,16 @@ void WebGL2RenderingContext::DeleteSampler(const v8::FunctionCallbackInfo<v8::Va
|
|
|
997
997
|
if (ptr == nullptr) {
|
|
998
998
|
return;
|
|
999
999
|
}
|
|
1000
|
-
|
|
1000
|
+
|
|
1001
1001
|
auto isolate = args.GetIsolate();
|
|
1002
|
-
|
|
1003
|
-
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
1004
|
auto samplerValue = args[0];
|
|
1005
1005
|
auto type = GetNativeType(samplerValue);
|
|
1006
|
-
|
|
1006
|
+
|
|
1007
1007
|
if (type == NativeType::WebGLSampler) {
|
|
1008
1008
|
auto sampler = WebGLSampler::GetPointer(samplerValue.As<v8::Object>());
|
|
1009
|
-
|
|
1009
|
+
|
|
1010
1010
|
if (sampler != nullptr) {
|
|
1011
1011
|
canvas_native_webgl2_delete_sampler_with_sampler(
|
|
1012
1012
|
sampler->GetSampler(),
|
|
@@ -1021,15 +1021,15 @@ void WebGL2RenderingContext::DeleteSync(const v8::FunctionCallbackInfo<v8::Value
|
|
|
1021
1021
|
if (ptr == nullptr) {
|
|
1022
1022
|
return;
|
|
1023
1023
|
}
|
|
1024
|
-
|
|
1024
|
+
|
|
1025
1025
|
auto isolate = args.GetIsolate();
|
|
1026
|
-
|
|
1027
|
-
|
|
1026
|
+
|
|
1027
|
+
|
|
1028
1028
|
auto syncValue = args[0];
|
|
1029
1029
|
auto type = GetNativeType(syncValue);
|
|
1030
1030
|
if (type == NativeType::WebGLSync) {
|
|
1031
1031
|
auto sync = WebGLSyncImpl::GetPointer(syncValue.As<v8::Object>());
|
|
1032
|
-
|
|
1032
|
+
|
|
1033
1033
|
if (sync != nullptr) {
|
|
1034
1034
|
canvas_native_webgl2_delete_sync_with_sync(
|
|
1035
1035
|
sync->GetSync(),
|
|
@@ -1045,16 +1045,16 @@ WebGL2RenderingContext::DeleteTransformFeedback(const v8::FunctionCallbackInfo<v
|
|
|
1045
1045
|
if (ptr == nullptr) {
|
|
1046
1046
|
return;
|
|
1047
1047
|
}
|
|
1048
|
-
|
|
1048
|
+
|
|
1049
1049
|
auto isolate = args.GetIsolate();
|
|
1050
|
-
|
|
1051
|
-
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
1052
|
auto transformFeedbackValue = args[0];
|
|
1053
1053
|
auto type = GetNativeType(transformFeedbackValue);
|
|
1054
1054
|
if (type == NativeType::WebGLTransformFeedback) {
|
|
1055
1055
|
auto transformFeedback = WebGLTransformFeedback::GetPointer(
|
|
1056
1056
|
transformFeedbackValue.As<v8::Object>());
|
|
1057
|
-
|
|
1057
|
+
|
|
1058
1058
|
if (transformFeedback != nullptr) {
|
|
1059
1059
|
canvas_native_webgl2_delete_transform_feedback(
|
|
1060
1060
|
transformFeedback->GetFeedback(),
|
|
@@ -1069,14 +1069,14 @@ void WebGL2RenderingContext::DeleteVertexArray(const v8::FunctionCallbackInfo<v8
|
|
|
1069
1069
|
if (ptr == nullptr) {
|
|
1070
1070
|
return;
|
|
1071
1071
|
}
|
|
1072
|
-
|
|
1072
|
+
|
|
1073
1073
|
auto isolate = args.GetIsolate();
|
|
1074
|
-
|
|
1075
|
-
|
|
1074
|
+
|
|
1075
|
+
|
|
1076
1076
|
auto vertexArrayValue = args[0];
|
|
1077
1077
|
auto type = GetNativeType(vertexArrayValue);
|
|
1078
1078
|
if (type == NativeType::WebGLVertexArrayObject) {
|
|
1079
|
-
|
|
1079
|
+
|
|
1080
1080
|
auto vertexArray = WebGLVertexArrayObject::GetPointer(vertexArrayValue.As<v8::Object>());
|
|
1081
1081
|
if (vertexArray != nullptr) {
|
|
1082
1082
|
canvas_native_webgl2_delete_vertex_array_with_vertex_array(
|
|
@@ -1092,10 +1092,10 @@ void WebGL2RenderingContext::DrawArraysInstanced(const v8::FunctionCallbackInfo<
|
|
|
1092
1092
|
if (ptr == nullptr) {
|
|
1093
1093
|
return;
|
|
1094
1094
|
}
|
|
1095
|
-
|
|
1095
|
+
|
|
1096
1096
|
auto isolate = args.GetIsolate();
|
|
1097
1097
|
auto context = isolate->GetCurrentContext();
|
|
1098
|
-
|
|
1098
|
+
|
|
1099
1099
|
auto mode = args[0]->Uint32Value(context).ToChecked();
|
|
1100
1100
|
auto first = args[1]->Int32Value(context).ToChecked();
|
|
1101
1101
|
auto count_ = args[2]->Int32Value(context).ToChecked();
|
|
@@ -1107,7 +1107,7 @@ void WebGL2RenderingContext::DrawArraysInstanced(const v8::FunctionCallbackInfo<
|
|
|
1107
1107
|
instanceCount,
|
|
1108
1108
|
ptr->GetState()
|
|
1109
1109
|
);
|
|
1110
|
-
|
|
1110
|
+
|
|
1111
1111
|
ptr->UpdateInvalidateState();
|
|
1112
1112
|
}
|
|
1113
1113
|
|
|
@@ -1116,10 +1116,10 @@ void WebGL2RenderingContext::DrawBuffers(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1116
1116
|
if (ptr == nullptr) {
|
|
1117
1117
|
return;
|
|
1118
1118
|
}
|
|
1119
|
-
|
|
1119
|
+
|
|
1120
1120
|
auto isolate = args.GetIsolate();
|
|
1121
1121
|
auto context = isolate->GetCurrentContext();
|
|
1122
|
-
|
|
1122
|
+
|
|
1123
1123
|
auto buffersObject = args[0];
|
|
1124
1124
|
if (buffersObject->IsArray()) {
|
|
1125
1125
|
auto array = buffersObject.As<v8::Array>();
|
|
@@ -1131,7 +1131,7 @@ void WebGL2RenderingContext::DrawBuffers(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1131
1131
|
context, j).ToLocalChecked();
|
|
1132
1132
|
buf.emplace_back(item->Uint32Value(context).ToChecked());
|
|
1133
1133
|
}
|
|
1134
|
-
|
|
1134
|
+
|
|
1135
1135
|
canvas_native_webgl2_draw_buffers(
|
|
1136
1136
|
buf.data(), buf.size(),
|
|
1137
1137
|
ptr->GetState());
|
|
@@ -1144,10 +1144,10 @@ WebGL2RenderingContext::DrawElementsInstanced(const v8::FunctionCallbackInfo<v8:
|
|
|
1144
1144
|
if (ptr == nullptr) {
|
|
1145
1145
|
return;
|
|
1146
1146
|
}
|
|
1147
|
-
|
|
1147
|
+
|
|
1148
1148
|
auto isolate = args.GetIsolate();
|
|
1149
1149
|
auto context = isolate->GetCurrentContext();
|
|
1150
|
-
|
|
1150
|
+
|
|
1151
1151
|
auto mode = args[0]->Uint32Value(context).ToChecked();
|
|
1152
1152
|
auto count_ = args[1]->Int32Value(context).ToChecked();
|
|
1153
1153
|
auto type = args[2]->Uint32Value(context).ToChecked();
|
|
@@ -1161,7 +1161,7 @@ WebGL2RenderingContext::DrawElementsInstanced(const v8::FunctionCallbackInfo<v8:
|
|
|
1161
1161
|
instanceCount,
|
|
1162
1162
|
ptr->GetState()
|
|
1163
1163
|
);
|
|
1164
|
-
|
|
1164
|
+
|
|
1165
1165
|
ptr->UpdateInvalidateState();
|
|
1166
1166
|
}
|
|
1167
1167
|
|
|
@@ -1170,10 +1170,10 @@ void WebGL2RenderingContext::DrawRangeElements(const v8::FunctionCallbackInfo<v8
|
|
|
1170
1170
|
if (ptr == nullptr) {
|
|
1171
1171
|
return;
|
|
1172
1172
|
}
|
|
1173
|
-
|
|
1173
|
+
|
|
1174
1174
|
auto isolate = args.GetIsolate();
|
|
1175
1175
|
auto context = isolate->GetCurrentContext();
|
|
1176
|
-
|
|
1176
|
+
|
|
1177
1177
|
auto mode = args[0]->Uint32Value(context).ToChecked();
|
|
1178
1178
|
auto start = args[1]->Uint32Value(context).ToChecked();
|
|
1179
1179
|
auto end = args[2]->Uint32Value(context).ToChecked();
|
|
@@ -1189,7 +1189,7 @@ void WebGL2RenderingContext::DrawRangeElements(const v8::FunctionCallbackInfo<v8
|
|
|
1189
1189
|
static_cast<ssize_t>(offset),
|
|
1190
1190
|
ptr->GetState()
|
|
1191
1191
|
);
|
|
1192
|
-
|
|
1192
|
+
|
|
1193
1193
|
ptr->UpdateInvalidateState();
|
|
1194
1194
|
}
|
|
1195
1195
|
|
|
@@ -1198,10 +1198,10 @@ void WebGL2RenderingContext::EndQuery(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
1198
1198
|
if (ptr == nullptr) {
|
|
1199
1199
|
return;
|
|
1200
1200
|
}
|
|
1201
|
-
|
|
1201
|
+
|
|
1202
1202
|
auto isolate = args.GetIsolate();
|
|
1203
1203
|
auto context = isolate->GetCurrentContext();
|
|
1204
|
-
|
|
1204
|
+
|
|
1205
1205
|
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
1206
1206
|
canvas_native_webgl2_end_query(target,
|
|
1207
1207
|
ptr->GetState());
|
|
@@ -1212,10 +1212,10 @@ void WebGL2RenderingContext::EndTransformFeedback(const v8::FunctionCallbackInfo
|
|
|
1212
1212
|
if (ptr == nullptr) {
|
|
1213
1213
|
return;
|
|
1214
1214
|
}
|
|
1215
|
-
|
|
1215
|
+
|
|
1216
1216
|
auto isolate = args.GetIsolate();
|
|
1217
|
-
|
|
1218
|
-
|
|
1217
|
+
|
|
1218
|
+
|
|
1219
1219
|
canvas_native_webgl2_end_transform_feedback(
|
|
1220
1220
|
ptr->GetState());
|
|
1221
1221
|
}
|
|
@@ -1226,10 +1226,10 @@ void WebGL2RenderingContext::FenceSync(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
1226
1226
|
args.GetReturnValue().SetUndefined();
|
|
1227
1227
|
return;
|
|
1228
1228
|
}
|
|
1229
|
-
|
|
1229
|
+
|
|
1230
1230
|
auto isolate = args.GetIsolate();
|
|
1231
1231
|
auto context = isolate->GetCurrentContext();
|
|
1232
|
-
|
|
1232
|
+
|
|
1233
1233
|
auto condition = args[0]->Uint32Value(context).ToChecked();
|
|
1234
1234
|
auto flags = args[1]->Uint32Value(context).ToChecked();
|
|
1235
1235
|
auto sync = canvas_native_webgl2_fence_sync(
|
|
@@ -1238,7 +1238,7 @@ void WebGL2RenderingContext::FenceSync(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
1238
1238
|
ptr->GetState()
|
|
1239
1239
|
);
|
|
1240
1240
|
auto ret = WebGLSyncImpl::NewInstance(isolate, new WebGLSyncImpl(sync));
|
|
1241
|
-
|
|
1241
|
+
|
|
1242
1242
|
args.GetReturnValue().Set(ret);
|
|
1243
1243
|
}
|
|
1244
1244
|
|
|
@@ -1249,11 +1249,11 @@ WebGL2RenderingContext::FramebufferTextureLayer(const v8::FunctionCallbackInfo<v
|
|
|
1249
1249
|
args.GetReturnValue().SetUndefined();
|
|
1250
1250
|
return;
|
|
1251
1251
|
}
|
|
1252
|
-
|
|
1252
|
+
|
|
1253
1253
|
auto isolate = args.GetIsolate();
|
|
1254
1254
|
auto context = isolate->GetCurrentContext();
|
|
1255
|
-
|
|
1256
|
-
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
1257
|
auto textureValue = args[2];
|
|
1258
1258
|
auto type = GetNativeType(textureValue);
|
|
1259
1259
|
if (type == NativeType::WebGLTexture) {
|
|
@@ -1272,7 +1272,7 @@ WebGL2RenderingContext::FramebufferTextureLayer(const v8::FunctionCallbackInfo<v
|
|
|
1272
1272
|
ptr->GetState()
|
|
1273
1273
|
);
|
|
1274
1274
|
}
|
|
1275
|
-
|
|
1275
|
+
|
|
1276
1276
|
}
|
|
1277
1277
|
}
|
|
1278
1278
|
|
|
@@ -1283,10 +1283,10 @@ WebGL2RenderingContext::GetActiveUniformBlockName(const v8::FunctionCallbackInfo
|
|
|
1283
1283
|
args.GetReturnValue().SetEmptyString();
|
|
1284
1284
|
return;
|
|
1285
1285
|
}
|
|
1286
|
-
|
|
1286
|
+
|
|
1287
1287
|
auto isolate = args.GetIsolate();
|
|
1288
1288
|
auto context = isolate->GetCurrentContext();
|
|
1289
|
-
|
|
1289
|
+
|
|
1290
1290
|
auto programValue = args[0];
|
|
1291
1291
|
auto type = GetNativeType(programValue);
|
|
1292
1292
|
if (type == NativeType::WebGLProgram) {
|
|
@@ -1301,9 +1301,9 @@ WebGL2RenderingContext::GetActiveUniformBlockName(const v8::FunctionCallbackInfo
|
|
|
1301
1301
|
args.GetReturnValue().Set(ConvertToV8OneByteString(isolate, (char *) name));
|
|
1302
1302
|
return;
|
|
1303
1303
|
}
|
|
1304
|
-
|
|
1304
|
+
|
|
1305
1305
|
}
|
|
1306
|
-
|
|
1306
|
+
|
|
1307
1307
|
args.GetReturnValue().SetEmptyString();
|
|
1308
1308
|
}
|
|
1309
1309
|
|
|
@@ -1314,16 +1314,16 @@ void WebGL2RenderingContext::GetActiveUniformBlockParameter(
|
|
|
1314
1314
|
args.GetReturnValue().SetNull();
|
|
1315
1315
|
return;
|
|
1316
1316
|
}
|
|
1317
|
-
|
|
1317
|
+
|
|
1318
1318
|
auto isolate = args.GetIsolate();
|
|
1319
1319
|
auto context = isolate->GetCurrentContext();
|
|
1320
|
-
|
|
1320
|
+
|
|
1321
1321
|
auto programValue = args[0];
|
|
1322
1322
|
auto type = GetNativeType(programValue);
|
|
1323
|
-
|
|
1323
|
+
|
|
1324
1324
|
if (type == NativeType::WebGLProgram) {
|
|
1325
1325
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
1326
|
-
|
|
1326
|
+
|
|
1327
1327
|
if (program != nullptr) {
|
|
1328
1328
|
auto uniformBlockIndex = args[1]->Uint32Value(context).ToChecked();
|
|
1329
1329
|
auto pname = args[2]->Uint32Value(context).ToChecked();
|
|
@@ -1333,7 +1333,7 @@ void WebGL2RenderingContext::GetActiveUniformBlockParameter(
|
|
|
1333
1333
|
pname,
|
|
1334
1334
|
ptr->GetState()
|
|
1335
1335
|
);
|
|
1336
|
-
|
|
1336
|
+
|
|
1337
1337
|
switch (pname) {
|
|
1338
1338
|
case GL_UNIFORM_BLOCK_BINDING:
|
|
1339
1339
|
case GL_UNIFORM_BLOCK_DATA_SIZE:
|
|
@@ -1345,33 +1345,33 @@ void WebGL2RenderingContext::GetActiveUniformBlockParameter(
|
|
|
1345
1345
|
case GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: {
|
|
1346
1346
|
auto value = canvas_native_webgl_result_get_u32_array(
|
|
1347
1347
|
ret);
|
|
1348
|
-
|
|
1348
|
+
|
|
1349
1349
|
auto buf = (uint8_t *) canvas_native_u32_buffer_get_bytes(value);
|
|
1350
1350
|
auto size = canvas_native_u32_buffer_get_length(value);
|
|
1351
1351
|
auto bytes_size = size * sizeof(uint32_t);
|
|
1352
|
-
|
|
1352
|
+
|
|
1353
1353
|
auto store = v8::ArrayBuffer::NewBackingStore(buf, bytes_size,
|
|
1354
1354
|
[](void *data, size_t length,
|
|
1355
1355
|
void *deleter_data) {
|
|
1356
1356
|
if (deleter_data != nullptr) {
|
|
1357
|
-
|
|
1357
|
+
canvas_native_u32_buffer_release(
|
|
1358
1358
|
(U32Buffer *) deleter_data);
|
|
1359
1359
|
}
|
|
1360
1360
|
},
|
|
1361
1361
|
value);
|
|
1362
|
-
|
|
1362
|
+
|
|
1363
1363
|
auto arraybuffer = v8::ArrayBuffer::New(isolate, std::move(store));
|
|
1364
1364
|
args.GetReturnValue().Set(v8::Uint32Array::New(arraybuffer, 0, size));
|
|
1365
|
-
|
|
1365
|
+
|
|
1366
1366
|
canvas_native_webgl_WebGLResult_destroy(ret);
|
|
1367
|
-
|
|
1367
|
+
|
|
1368
1368
|
return;
|
|
1369
1369
|
}
|
|
1370
1370
|
case GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:
|
|
1371
1371
|
case GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:
|
|
1372
1372
|
args.GetReturnValue().Set(canvas_native_webgl_result_get_bool(
|
|
1373
1373
|
ret));
|
|
1374
|
-
|
|
1374
|
+
|
|
1375
1375
|
canvas_native_webgl_WebGLResult_destroy(ret);
|
|
1376
1376
|
return;
|
|
1377
1377
|
default:
|
|
@@ -1389,18 +1389,18 @@ void WebGL2RenderingContext::GetActiveUniforms(const v8::FunctionCallbackInfo<v8
|
|
|
1389
1389
|
args.GetReturnValue().SetNull();
|
|
1390
1390
|
return;
|
|
1391
1391
|
}
|
|
1392
|
-
|
|
1392
|
+
|
|
1393
1393
|
auto isolate = args.GetIsolate();
|
|
1394
1394
|
auto context = isolate->GetCurrentContext();
|
|
1395
|
-
|
|
1395
|
+
|
|
1396
1396
|
auto programValue = args[0];
|
|
1397
1397
|
auto type = GetNativeType(programValue);
|
|
1398
1398
|
if (type == NativeType::WebGLProgram) {
|
|
1399
|
-
|
|
1399
|
+
|
|
1400
1400
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
1401
1401
|
auto uniformIndicesObject = args[1];
|
|
1402
1402
|
auto pname = args[2]->Uint32Value(context).ToChecked();
|
|
1403
|
-
|
|
1403
|
+
|
|
1404
1404
|
if (uniformIndicesObject->IsArray()) {
|
|
1405
1405
|
auto uniformIndices = uniformIndicesObject.As<v8::Array>();
|
|
1406
1406
|
auto size = uniformIndices->Length();
|
|
@@ -1411,14 +1411,14 @@ void WebGL2RenderingContext::GetActiveUniforms(const v8::FunctionCallbackInfo<v8
|
|
|
1411
1411
|
context, j).ToLocalChecked()->Uint32Value(context).ToChecked();
|
|
1412
1412
|
buf.emplace_back(item);
|
|
1413
1413
|
}
|
|
1414
|
-
|
|
1414
|
+
|
|
1415
1415
|
auto ret = canvas_native_webgl2_get_active_uniforms(
|
|
1416
1416
|
program->GetProgram(),
|
|
1417
1417
|
buf.data(), buf.size(),
|
|
1418
1418
|
pname,
|
|
1419
1419
|
ptr->GetState()
|
|
1420
1420
|
);
|
|
1421
|
-
|
|
1421
|
+
|
|
1422
1422
|
switch (pname) {
|
|
1423
1423
|
case GL_UNIFORM_TYPE:
|
|
1424
1424
|
case GL_UNIFORM_SIZE: {
|
|
@@ -1426,10 +1426,10 @@ void WebGL2RenderingContext::GetActiveUniforms(const v8::FunctionCallbackInfo<v8
|
|
|
1426
1426
|
ret);
|
|
1427
1427
|
auto len = canvas_native_u32_buffer_get_length(value);
|
|
1428
1428
|
auto buffer = canvas_native_u32_buffer_get_bytes(value);
|
|
1429
|
-
|
|
1429
|
+
|
|
1430
1430
|
auto array = v8::Array::New(
|
|
1431
1431
|
isolate, (int) len);
|
|
1432
|
-
|
|
1432
|
+
|
|
1433
1433
|
for (int j = 0;
|
|
1434
1434
|
j < len; ++j) {
|
|
1435
1435
|
auto item = buffer[j];
|
|
@@ -1438,7 +1438,7 @@ void WebGL2RenderingContext::GetActiveUniforms(const v8::FunctionCallbackInfo<v8
|
|
|
1438
1438
|
v8::Integer::NewFromUnsigned(isolate, item));
|
|
1439
1439
|
}
|
|
1440
1440
|
args.GetReturnValue().Set(array);
|
|
1441
|
-
|
|
1441
|
+
canvas_native_u32_buffer_release(value);
|
|
1442
1442
|
canvas_native_webgl_WebGLResult_destroy(ret);
|
|
1443
1443
|
return;
|
|
1444
1444
|
}
|
|
@@ -1460,7 +1460,7 @@ void WebGL2RenderingContext::GetActiveUniforms(const v8::FunctionCallbackInfo<v8
|
|
|
1460
1460
|
v8::Integer::New(isolate, item));
|
|
1461
1461
|
}
|
|
1462
1462
|
args.GetReturnValue().Set(array);
|
|
1463
|
-
|
|
1463
|
+
canvas_native_i32_buffer_release(value);
|
|
1464
1464
|
canvas_native_webgl_WebGLResult_destroy(ret);
|
|
1465
1465
|
return;
|
|
1466
1466
|
}
|
|
@@ -1481,7 +1481,7 @@ void WebGL2RenderingContext::GetActiveUniforms(const v8::FunctionCallbackInfo<v8
|
|
|
1481
1481
|
v8::Boolean::New(isolate, item));
|
|
1482
1482
|
}
|
|
1483
1483
|
args.GetReturnValue().Set(array);
|
|
1484
|
-
|
|
1484
|
+
canvas_native_u8_buffer_release(value);
|
|
1485
1485
|
canvas_native_webgl_WebGLResult_destroy(ret);
|
|
1486
1486
|
return;
|
|
1487
1487
|
}
|
|
@@ -1491,8 +1491,8 @@ void WebGL2RenderingContext::GetActiveUniforms(const v8::FunctionCallbackInfo<v8
|
|
|
1491
1491
|
return;
|
|
1492
1492
|
}
|
|
1493
1493
|
}
|
|
1494
|
-
|
|
1495
|
-
|
|
1494
|
+
|
|
1495
|
+
|
|
1496
1496
|
}
|
|
1497
1497
|
}
|
|
1498
1498
|
|
|
@@ -1502,42 +1502,42 @@ void WebGL2RenderingContext::GetBufferSubData(const v8::FunctionCallbackInfo<v8:
|
|
|
1502
1502
|
args.GetReturnValue().SetNull();
|
|
1503
1503
|
return;
|
|
1504
1504
|
}
|
|
1505
|
-
|
|
1505
|
+
|
|
1506
1506
|
auto isolate = args.GetIsolate();
|
|
1507
1507
|
auto context = isolate->GetCurrentContext();
|
|
1508
|
-
|
|
1508
|
+
|
|
1509
1509
|
auto dstDataObject = args[2];
|
|
1510
1510
|
if (dstDataObject->IsArrayBufferView()) {
|
|
1511
1511
|
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
1512
1512
|
auto srcByteOffset = args[1]->NumberValue(context).ToChecked();
|
|
1513
|
-
|
|
1513
|
+
|
|
1514
1514
|
auto array = dstDataObject.As<v8::ArrayBufferView>();
|
|
1515
|
-
|
|
1515
|
+
|
|
1516
1516
|
auto buf = array->Buffer();
|
|
1517
1517
|
auto offset = array->ByteOffset();
|
|
1518
1518
|
auto size = buf->ByteLength();
|
|
1519
1519
|
auto data = reinterpret_cast<uint8_t *>(buf->GetBackingStore()->Data()) + offset;
|
|
1520
|
-
|
|
1521
|
-
|
|
1520
|
+
|
|
1521
|
+
|
|
1522
1522
|
auto BYTES_PER_ELEMENT = (ssize_t) array->Get(
|
|
1523
1523
|
context,
|
|
1524
1524
|
ConvertToV8String(isolate, "BYTES_PER_ELEMENT")).ToLocalChecked()->NumberValue(
|
|
1525
1525
|
context).ToChecked();
|
|
1526
|
-
|
|
1526
|
+
|
|
1527
1527
|
ssize_t dstOffsetValue = 0;
|
|
1528
1528
|
if (args[3]->IsNumber()) {
|
|
1529
1529
|
dstOffsetValue =
|
|
1530
1530
|
static_cast<ssize_t>(args[3]->NumberValue(context).ToChecked()) *
|
|
1531
1531
|
BYTES_PER_ELEMENT;
|
|
1532
1532
|
}
|
|
1533
|
-
|
|
1533
|
+
|
|
1534
1534
|
ssize_t lengthValue = 0;
|
|
1535
1535
|
if (args[4]->IsNumber()) {
|
|
1536
1536
|
lengthValue =
|
|
1537
1537
|
static_cast<ssize_t>(args[4]->NumberValue(context).ToChecked()) *
|
|
1538
1538
|
BYTES_PER_ELEMENT;
|
|
1539
1539
|
}
|
|
1540
|
-
|
|
1540
|
+
|
|
1541
1541
|
canvas_native_webgl2_get_buffer_sub_data(
|
|
1542
1542
|
target,
|
|
1543
1543
|
static_cast<ssize_t>(srcByteOffset),
|
|
@@ -1555,27 +1555,27 @@ void WebGL2RenderingContext::GetFragDataLocation(const v8::FunctionCallbackInfo<
|
|
|
1555
1555
|
args.GetReturnValue().SetNull();
|
|
1556
1556
|
return;
|
|
1557
1557
|
}
|
|
1558
|
-
|
|
1558
|
+
|
|
1559
1559
|
auto isolate = args.GetIsolate();
|
|
1560
1560
|
auto context = isolate->GetCurrentContext();
|
|
1561
|
-
|
|
1561
|
+
|
|
1562
1562
|
auto programValue = args[0];
|
|
1563
1563
|
auto nameValue = args[1];
|
|
1564
1564
|
auto type = GetNativeType(programValue);
|
|
1565
1565
|
if (type == NativeType::WebGLProgram && nameValue->IsString()) {
|
|
1566
1566
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
1567
|
-
|
|
1567
|
+
|
|
1568
1568
|
if (program != nullptr) {
|
|
1569
1569
|
auto name = ConvertFromV8String(isolate, nameValue);
|
|
1570
|
-
|
|
1570
|
+
|
|
1571
1571
|
auto ret = canvas_native_webgl2_get_frag_data_location(
|
|
1572
1572
|
program->GetProgram(),
|
|
1573
1573
|
name.c_str(),
|
|
1574
1574
|
ptr->GetState()
|
|
1575
1575
|
);
|
|
1576
|
-
|
|
1576
|
+
|
|
1577
1577
|
args.GetReturnValue().Set(ret);
|
|
1578
|
-
|
|
1578
|
+
|
|
1579
1579
|
return;
|
|
1580
1580
|
}
|
|
1581
1581
|
}
|
|
@@ -1588,10 +1588,10 @@ void WebGL2RenderingContext::GetIndexedParameter(const v8::FunctionCallbackInfo<
|
|
|
1588
1588
|
args.GetReturnValue().SetNull();
|
|
1589
1589
|
return;
|
|
1590
1590
|
}
|
|
1591
|
-
|
|
1591
|
+
|
|
1592
1592
|
auto isolate = args.GetIsolate();
|
|
1593
1593
|
auto context = isolate->GetCurrentContext();
|
|
1594
|
-
|
|
1594
|
+
|
|
1595
1595
|
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
1596
1596
|
auto index = args[1]->Uint32Value(context).ToChecked();
|
|
1597
1597
|
auto ret = canvas_native_webgl2_get_indexed_parameter(
|
|
@@ -1599,13 +1599,13 @@ void WebGL2RenderingContext::GetIndexedParameter(const v8::FunctionCallbackInfo<
|
|
|
1599
1599
|
index,
|
|
1600
1600
|
ptr->GetState()
|
|
1601
1601
|
);
|
|
1602
|
-
|
|
1602
|
+
|
|
1603
1603
|
switch (target) {
|
|
1604
1604
|
case GL_UNIFORM_BUFFER_BINDING:
|
|
1605
1605
|
case GL_TRANSFORM_FEEDBACK_BUFFER_BINDING: {
|
|
1606
1606
|
auto buffer = canvas_native_webgl2_indexed_parameter_get_buffer_value(
|
|
1607
1607
|
ret);
|
|
1608
|
-
|
|
1608
|
+
|
|
1609
1609
|
args.GetReturnValue().Set(
|
|
1610
1610
|
WebGLBuffer::NewInstance(isolate, new WebGLBuffer(buffer)));
|
|
1611
1611
|
}
|
|
@@ -1633,10 +1633,10 @@ void WebGL2RenderingContext::GetInternalformatParameter(
|
|
|
1633
1633
|
args.GetReturnValue().SetNull();
|
|
1634
1634
|
return;
|
|
1635
1635
|
}
|
|
1636
|
-
|
|
1636
|
+
|
|
1637
1637
|
auto isolate = args.GetIsolate();
|
|
1638
1638
|
auto context = isolate->GetCurrentContext();
|
|
1639
|
-
|
|
1639
|
+
|
|
1640
1640
|
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
1641
1641
|
auto internalformat = args[1]->Uint32Value(context).ToChecked();
|
|
1642
1642
|
auto pname = args[2]->Uint32Value(context).ToChecked();
|
|
@@ -1664,7 +1664,7 @@ void WebGL2RenderingContext::GetInternalformatParameter(
|
|
|
1664
1664
|
case GL_RGBA32I: {
|
|
1665
1665
|
// empty
|
|
1666
1666
|
auto arraybuffer = v8::ArrayBuffer::New(isolate, 0);
|
|
1667
|
-
|
|
1667
|
+
|
|
1668
1668
|
args.GetReturnValue().Set(v8::Int32Array::New(arraybuffer, 0, 0));
|
|
1669
1669
|
return;
|
|
1670
1670
|
}
|
|
@@ -1696,32 +1696,32 @@ void WebGL2RenderingContext::GetInternalformatParameter(
|
|
|
1696
1696
|
args.GetReturnValue().SetNull();
|
|
1697
1697
|
return;
|
|
1698
1698
|
}
|
|
1699
|
-
|
|
1700
|
-
|
|
1699
|
+
|
|
1700
|
+
|
|
1701
1701
|
auto ret = canvas_native_webgl2_get_internalformat_parameter(
|
|
1702
1702
|
target,
|
|
1703
1703
|
internalformat,
|
|
1704
1704
|
pname,
|
|
1705
1705
|
ptr->GetState()
|
|
1706
1706
|
);
|
|
1707
|
-
|
|
1707
|
+
|
|
1708
1708
|
if (pname == GL_SAMPLES) {
|
|
1709
1709
|
auto value = canvas_native_webgl_result_get_i32_array(ret);
|
|
1710
|
-
|
|
1710
|
+
|
|
1711
1711
|
auto buf = (uint8_t *) canvas_native_i32_buffer_get_bytes(value);
|
|
1712
1712
|
auto size = canvas_native_i32_buffer_get_length(value);
|
|
1713
1713
|
auto bytes_size = size * sizeof(int32_t);
|
|
1714
|
-
|
|
1714
|
+
|
|
1715
1715
|
auto store = v8::ArrayBuffer::NewBackingStore(buf, bytes_size,
|
|
1716
1716
|
[](void *data, size_t length,
|
|
1717
1717
|
void *deleter_data) {
|
|
1718
1718
|
if (deleter_data != nullptr) {
|
|
1719
|
-
|
|
1719
|
+
canvas_native_i32_buffer_release(
|
|
1720
1720
|
(I32Buffer *) deleter_data);
|
|
1721
1721
|
}
|
|
1722
1722
|
},
|
|
1723
1723
|
value);
|
|
1724
|
-
|
|
1724
|
+
|
|
1725
1725
|
auto arraybuffer = v8::ArrayBuffer::New(isolate, std::move(store));
|
|
1726
1726
|
args.GetReturnValue().Set(v8::Int32Array::New(arraybuffer, 0, size));
|
|
1727
1727
|
canvas_native_webgl_WebGLResult_destroy(ret);
|
|
@@ -1739,10 +1739,10 @@ void WebGL2RenderingContext::GetParameter(const v8::FunctionCallbackInfo<v8::Val
|
|
|
1739
1739
|
args.GetReturnValue().SetNull();
|
|
1740
1740
|
return;
|
|
1741
1741
|
}
|
|
1742
|
-
|
|
1742
|
+
|
|
1743
1743
|
auto isolate = args.GetIsolate();
|
|
1744
1744
|
auto context = isolate->GetCurrentContext();
|
|
1745
|
-
|
|
1745
|
+
|
|
1746
1746
|
auto pname = args[0]->Uint32Value(context).ToChecked();
|
|
1747
1747
|
auto result = canvas_native_webgl2_get_parameter(
|
|
1748
1748
|
pname,
|
|
@@ -1753,15 +1753,15 @@ void WebGL2RenderingContext::GetParameter(const v8::FunctionCallbackInfo<v8::Val
|
|
|
1753
1753
|
case GL_DRAW_FRAMEBUFFER_BINDING:
|
|
1754
1754
|
args.GetReturnValue().Set(canvas_native_webgl_result_get_i32(
|
|
1755
1755
|
result));
|
|
1756
|
-
|
|
1756
|
+
|
|
1757
1757
|
canvas_native_webgl_WebGLResult_destroy(result);
|
|
1758
1758
|
return;
|
|
1759
1759
|
default: {
|
|
1760
1760
|
auto ret = ptr->GetParameterInternal(
|
|
1761
1761
|
isolate, pname, result);
|
|
1762
|
-
|
|
1762
|
+
|
|
1763
1763
|
canvas_native_webgl_WebGLResult_destroy(result);
|
|
1764
|
-
|
|
1764
|
+
|
|
1765
1765
|
args.GetReturnValue().Set(ret);
|
|
1766
1766
|
return;
|
|
1767
1767
|
}
|
|
@@ -1774,18 +1774,18 @@ void WebGL2RenderingContext::GetQueryParameter(const v8::FunctionCallbackInfo<v8
|
|
|
1774
1774
|
args.GetReturnValue().SetNull();
|
|
1775
1775
|
return;
|
|
1776
1776
|
}
|
|
1777
|
-
|
|
1777
|
+
|
|
1778
1778
|
auto isolate = args.GetIsolate();
|
|
1779
1779
|
auto context = isolate->GetCurrentContext();
|
|
1780
|
-
|
|
1780
|
+
|
|
1781
1781
|
auto queryValue = args[0];
|
|
1782
1782
|
auto type = GetNativeType(queryValue);
|
|
1783
1783
|
if (type == NativeType::WebGLQuery) {
|
|
1784
1784
|
auto query = WebGLQuery::GetPointer(queryValue.As<v8::Object>());
|
|
1785
1785
|
if (query != nullptr) {
|
|
1786
1786
|
auto pname = args[1]->Uint32Value(context).ToChecked();
|
|
1787
|
-
|
|
1788
|
-
|
|
1787
|
+
|
|
1788
|
+
|
|
1789
1789
|
auto ret = canvas_native_webgl2_get_query_parameter(
|
|
1790
1790
|
query->GetQuery(),
|
|
1791
1791
|
pname,
|
|
@@ -1804,10 +1804,10 @@ void WebGL2RenderingContext::GetQueryParameter(const v8::FunctionCallbackInfo<v8
|
|
|
1804
1804
|
}
|
|
1805
1805
|
//clean up
|
|
1806
1806
|
canvas_native_webgl_WebGLResult_destroy(ret);
|
|
1807
|
-
|
|
1807
|
+
|
|
1808
1808
|
}
|
|
1809
1809
|
}
|
|
1810
|
-
|
|
1810
|
+
|
|
1811
1811
|
args.GetReturnValue().SetNull();
|
|
1812
1812
|
}
|
|
1813
1813
|
|
|
@@ -1817,10 +1817,10 @@ void WebGL2RenderingContext::GetQuery(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
1817
1817
|
args.GetReturnValue().SetNull();
|
|
1818
1818
|
return;
|
|
1819
1819
|
}
|
|
1820
|
-
|
|
1820
|
+
|
|
1821
1821
|
auto isolate = args.GetIsolate();
|
|
1822
1822
|
auto context = isolate->GetCurrentContext();
|
|
1823
|
-
|
|
1823
|
+
|
|
1824
1824
|
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
1825
1825
|
auto pname = args[1]->Uint32Value(context).ToChecked();
|
|
1826
1826
|
auto ret = canvas_native_webgl2_get_query(
|
|
@@ -1843,10 +1843,10 @@ void WebGL2RenderingContext::GetSamplerParameter(const v8::FunctionCallbackInfo<
|
|
|
1843
1843
|
args.GetReturnValue().SetNull();
|
|
1844
1844
|
return;
|
|
1845
1845
|
}
|
|
1846
|
-
|
|
1846
|
+
|
|
1847
1847
|
auto isolate = args.GetIsolate();
|
|
1848
1848
|
auto context = isolate->GetCurrentContext();
|
|
1849
|
-
|
|
1849
|
+
|
|
1850
1850
|
auto samplerValue = args[0];
|
|
1851
1851
|
auto type = GetNativeType(samplerValue);
|
|
1852
1852
|
if (type == NativeType::WebGLSampler) {
|
|
@@ -1857,7 +1857,7 @@ void WebGL2RenderingContext::GetSamplerParameter(const v8::FunctionCallbackInfo<
|
|
|
1857
1857
|
sampler->GetSampler(),
|
|
1858
1858
|
pname,
|
|
1859
1859
|
ptr->GetState());
|
|
1860
|
-
|
|
1860
|
+
|
|
1861
1861
|
switch (pname) {
|
|
1862
1862
|
case GL_TEXTURE_MAX_LOD:
|
|
1863
1863
|
case GL_TEXTURE_MIN_LOD:
|
|
@@ -1884,7 +1884,7 @@ void WebGL2RenderingContext::GetSamplerParameter(const v8::FunctionCallbackInfo<
|
|
|
1884
1884
|
}
|
|
1885
1885
|
}
|
|
1886
1886
|
}
|
|
1887
|
-
|
|
1887
|
+
|
|
1888
1888
|
args.GetReturnValue().SetNull();
|
|
1889
1889
|
}
|
|
1890
1890
|
|
|
@@ -1894,10 +1894,10 @@ void WebGL2RenderingContext::GetSyncParameter(const v8::FunctionCallbackInfo<v8:
|
|
|
1894
1894
|
args.GetReturnValue().SetNull();
|
|
1895
1895
|
return;
|
|
1896
1896
|
}
|
|
1897
|
-
|
|
1897
|
+
|
|
1898
1898
|
auto isolate = args.GetIsolate();
|
|
1899
1899
|
auto context = isolate->GetCurrentContext();
|
|
1900
|
-
|
|
1900
|
+
|
|
1901
1901
|
auto syncValue = args[0];
|
|
1902
1902
|
auto sync = WebGLSyncImpl::GetPointer(syncValue.As<v8::Object>());
|
|
1903
1903
|
if (sync != nullptr) {
|
|
@@ -1906,7 +1906,7 @@ void WebGL2RenderingContext::GetSyncParameter(const v8::FunctionCallbackInfo<v8:
|
|
|
1906
1906
|
sync->GetSync(),
|
|
1907
1907
|
pname,
|
|
1908
1908
|
ptr->GetState());
|
|
1909
|
-
|
|
1909
|
+
|
|
1910
1910
|
switch (pname) {
|
|
1911
1911
|
case GL_OBJECT_TYPE:
|
|
1912
1912
|
case GL_SYNC_STATUS:
|
|
@@ -1914,7 +1914,7 @@ void WebGL2RenderingContext::GetSyncParameter(const v8::FunctionCallbackInfo<v8:
|
|
|
1914
1914
|
case GL_SYNC_FLAGS:
|
|
1915
1915
|
args.GetReturnValue().Set(canvas_native_webgl_result_get_i32(
|
|
1916
1916
|
ret));
|
|
1917
|
-
|
|
1917
|
+
|
|
1918
1918
|
canvas_native_webgl_WebGLResult_destroy(ret);
|
|
1919
1919
|
return;
|
|
1920
1920
|
default:
|
|
@@ -1933,10 +1933,10 @@ void WebGL2RenderingContext::GetTransformFeedbackVarying(
|
|
|
1933
1933
|
args.GetReturnValue().SetNull();
|
|
1934
1934
|
return;
|
|
1935
1935
|
}
|
|
1936
|
-
|
|
1936
|
+
|
|
1937
1937
|
auto isolate = args.GetIsolate();
|
|
1938
1938
|
auto context = isolate->GetCurrentContext();
|
|
1939
|
-
|
|
1939
|
+
|
|
1940
1940
|
auto programValue = args[0];
|
|
1941
1941
|
auto type = GetNativeType(programValue);
|
|
1942
1942
|
if (type == NativeType::WebGLProgram) {
|
|
@@ -1948,20 +1948,20 @@ void WebGL2RenderingContext::GetTransformFeedbackVarying(
|
|
|
1948
1948
|
index,
|
|
1949
1949
|
ptr->GetState()
|
|
1950
1950
|
);
|
|
1951
|
-
|
|
1951
|
+
|
|
1952
1952
|
if (canvas_native_webgl_active_info_get_is_empty(
|
|
1953
1953
|
ret)) {
|
|
1954
1954
|
canvas_native_webgl_active_info_destroy(ret);
|
|
1955
1955
|
args.GetReturnValue().SetNull();
|
|
1956
1956
|
return;
|
|
1957
1957
|
}
|
|
1958
|
-
|
|
1958
|
+
|
|
1959
1959
|
auto info = WebGLActiveInfoImpl::NewInstance(isolate, new WebGLActiveInfoImpl(ret));
|
|
1960
1960
|
args.GetReturnValue().Set(info);
|
|
1961
1961
|
return;
|
|
1962
1962
|
}
|
|
1963
1963
|
}
|
|
1964
|
-
|
|
1964
|
+
|
|
1965
1965
|
args.GetReturnValue().SetNull();
|
|
1966
1966
|
}
|
|
1967
1967
|
|
|
@@ -1971,10 +1971,10 @@ void WebGL2RenderingContext::GetUniformBlockIndex(const v8::FunctionCallbackInfo
|
|
|
1971
1971
|
args.GetReturnValue().SetNull();
|
|
1972
1972
|
return;
|
|
1973
1973
|
}
|
|
1974
|
-
|
|
1974
|
+
|
|
1975
1975
|
auto isolate = args.GetIsolate();
|
|
1976
1976
|
auto context = isolate->GetCurrentContext();
|
|
1977
|
-
|
|
1977
|
+
|
|
1978
1978
|
auto programValue = args[0];
|
|
1979
1979
|
auto type = GetNativeType(programValue);
|
|
1980
1980
|
if (type == NativeType::WebGLProgram) {
|
|
@@ -1989,7 +1989,7 @@ void WebGL2RenderingContext::GetUniformBlockIndex(const v8::FunctionCallbackInfo
|
|
|
1989
1989
|
return;
|
|
1990
1990
|
}
|
|
1991
1991
|
}
|
|
1992
|
-
|
|
1992
|
+
|
|
1993
1993
|
args.GetReturnValue().SetNull();
|
|
1994
1994
|
}
|
|
1995
1995
|
|
|
@@ -1999,10 +1999,10 @@ void WebGL2RenderingContext::GetUniformIndices(const v8::FunctionCallbackInfo<v8
|
|
|
1999
1999
|
args.GetReturnValue().SetNull();
|
|
2000
2000
|
return;
|
|
2001
2001
|
}
|
|
2002
|
-
|
|
2002
|
+
|
|
2003
2003
|
auto isolate = args.GetIsolate();
|
|
2004
2004
|
auto context = isolate->GetCurrentContext();
|
|
2005
|
-
|
|
2005
|
+
|
|
2006
2006
|
auto programValue = args[0];
|
|
2007
2007
|
auto type = GetNativeType(programValue);
|
|
2008
2008
|
if (type == NativeType::WebGLProgram) {
|
|
@@ -2012,31 +2012,31 @@ void WebGL2RenderingContext::GetUniformIndices(const v8::FunctionCallbackInfo<v8
|
|
|
2012
2012
|
uniformNamesObject->IsArray()) {
|
|
2013
2013
|
auto uniformNames = uniformNamesObject.As<v8::Array>();
|
|
2014
2014
|
auto len = uniformNames->Length();
|
|
2015
|
-
|
|
2015
|
+
|
|
2016
2016
|
std::vector<std::string> store;
|
|
2017
2017
|
store.reserve(len);
|
|
2018
|
-
|
|
2018
|
+
|
|
2019
2019
|
for (int j = 0; j < len; ++j) {
|
|
2020
2020
|
auto name = ConvertFromV8String(isolate, uniformNames->Get(
|
|
2021
2021
|
context, j).ToLocalChecked());
|
|
2022
|
-
|
|
2022
|
+
|
|
2023
2023
|
store.push_back(name);
|
|
2024
2024
|
}
|
|
2025
|
-
|
|
2026
|
-
|
|
2025
|
+
|
|
2026
|
+
|
|
2027
2027
|
const char *cStrings[store.size()];
|
|
2028
2028
|
for (size_t i = 0; i < store.size(); ++i) {
|
|
2029
2029
|
cStrings[i] = store[i].c_str();
|
|
2030
2030
|
}
|
|
2031
|
-
|
|
2032
|
-
|
|
2031
|
+
|
|
2032
|
+
|
|
2033
2033
|
auto ret = canvas_native_webgl2_get_uniform_indices(
|
|
2034
2034
|
program->GetProgram(),
|
|
2035
2035
|
cStrings,
|
|
2036
2036
|
store.size(),
|
|
2037
2037
|
ptr->GetState());
|
|
2038
|
-
|
|
2039
|
-
|
|
2038
|
+
|
|
2039
|
+
|
|
2040
2040
|
auto retSize = canvas_native_u32_buffer_get_length(ret);
|
|
2041
2041
|
auto buf = canvas_native_u32_buffer_get_bytes(ret);
|
|
2042
2042
|
auto result = v8::Array::New(isolate, (int) retSize);
|
|
@@ -2046,13 +2046,13 @@ void WebGL2RenderingContext::GetUniformIndices(const v8::FunctionCallbackInfo<v8
|
|
|
2046
2046
|
j,
|
|
2047
2047
|
v8::Integer::NewFromUnsigned(isolate, item));
|
|
2048
2048
|
}
|
|
2049
|
-
|
|
2049
|
+
|
|
2050
2050
|
args.GetReturnValue().Set(result);
|
|
2051
|
-
|
|
2051
|
+
canvas_native_u32_buffer_release(ret);
|
|
2052
2052
|
return;
|
|
2053
2053
|
}
|
|
2054
2054
|
}
|
|
2055
|
-
|
|
2055
|
+
|
|
2056
2056
|
args.GetReturnValue().SetNull();
|
|
2057
2057
|
}
|
|
2058
2058
|
|
|
@@ -2062,13 +2062,13 @@ WebGL2RenderingContext::InvalidateFramebuffer(const v8::FunctionCallbackInfo<v8:
|
|
|
2062
2062
|
if (ptr == nullptr) {
|
|
2063
2063
|
return;
|
|
2064
2064
|
}
|
|
2065
|
-
|
|
2065
|
+
|
|
2066
2066
|
auto isolate = args.GetIsolate();
|
|
2067
2067
|
auto context = isolate->GetCurrentContext();
|
|
2068
|
-
|
|
2068
|
+
|
|
2069
2069
|
auto attachments = args[1];
|
|
2070
2070
|
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
2071
|
-
|
|
2071
|
+
|
|
2072
2072
|
if (attachments->IsArray()) {
|
|
2073
2073
|
auto array = attachments.As<v8::Array>();
|
|
2074
2074
|
auto len = array->Length();
|
|
@@ -2079,7 +2079,7 @@ WebGL2RenderingContext::InvalidateFramebuffer(const v8::FunctionCallbackInfo<v8:
|
|
|
2079
2079
|
context, j).ToLocalChecked()->Uint32Value(context).ToChecked();
|
|
2080
2080
|
buf.push_back(item);
|
|
2081
2081
|
}
|
|
2082
|
-
|
|
2082
|
+
|
|
2083
2083
|
canvas_native_webgl2_invalidate_framebuffer(
|
|
2084
2084
|
target, buf.data(), buf.size(),
|
|
2085
2085
|
ptr->GetState());
|
|
@@ -2092,10 +2092,10 @@ WebGL2RenderingContext::InvalidateSubFramebuffer(const v8::FunctionCallbackInfo<
|
|
|
2092
2092
|
if (ptr == nullptr) {
|
|
2093
2093
|
return;
|
|
2094
2094
|
}
|
|
2095
|
-
|
|
2095
|
+
|
|
2096
2096
|
auto isolate = args.GetIsolate();
|
|
2097
2097
|
auto context = isolate->GetCurrentContext();
|
|
2098
|
-
|
|
2098
|
+
|
|
2099
2099
|
auto attachments = args[1];
|
|
2100
2100
|
if (attachments->IsArray()) {
|
|
2101
2101
|
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
@@ -2103,7 +2103,7 @@ WebGL2RenderingContext::InvalidateSubFramebuffer(const v8::FunctionCallbackInfo<
|
|
|
2103
2103
|
auto y = args[3]->Int32Value(context).ToChecked();
|
|
2104
2104
|
auto width = args[4]->Int32Value(context).ToChecked();
|
|
2105
2105
|
auto height = args[5]->Int32Value(context).ToChecked();
|
|
2106
|
-
|
|
2106
|
+
|
|
2107
2107
|
auto array = attachments.As<v8::Array>();
|
|
2108
2108
|
auto len = array->Length();
|
|
2109
2109
|
std::vector<uint32_t> buf;
|
|
@@ -2113,7 +2113,7 @@ WebGL2RenderingContext::InvalidateSubFramebuffer(const v8::FunctionCallbackInfo<
|
|
|
2113
2113
|
context, j).ToLocalChecked()->Uint32Value(context).ToChecked();
|
|
2114
2114
|
buf.push_back(item);
|
|
2115
2115
|
}
|
|
2116
|
-
|
|
2116
|
+
|
|
2117
2117
|
canvas_native_webgl2_invalidate_sub_framebuffer(
|
|
2118
2118
|
target,
|
|
2119
2119
|
buf.data(), buf.size(),
|
|
@@ -2130,10 +2130,10 @@ void WebGL2RenderingContext::IsQuery(const v8::FunctionCallbackInfo<v8::Value> &
|
|
|
2130
2130
|
if (ptr == nullptr) {
|
|
2131
2131
|
return;
|
|
2132
2132
|
}
|
|
2133
|
-
|
|
2133
|
+
|
|
2134
2134
|
auto isolate = args.GetIsolate();
|
|
2135
2135
|
auto context = isolate->GetCurrentContext();
|
|
2136
|
-
|
|
2136
|
+
|
|
2137
2137
|
auto value = args[0];
|
|
2138
2138
|
auto type = GetNativeType(value);
|
|
2139
2139
|
if (type == NativeType::WebGLQuery) {
|
|
@@ -2155,10 +2155,10 @@ void WebGL2RenderingContext::IsSampler(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
2155
2155
|
if (ptr == nullptr) {
|
|
2156
2156
|
return;
|
|
2157
2157
|
}
|
|
2158
|
-
|
|
2158
|
+
|
|
2159
2159
|
auto isolate = args.GetIsolate();
|
|
2160
2160
|
auto context = isolate->GetCurrentContext();
|
|
2161
|
-
|
|
2161
|
+
|
|
2162
2162
|
auto value = args[0];
|
|
2163
2163
|
auto type = GetNativeType(value);
|
|
2164
2164
|
if (type == NativeType::WebGLSampler) {
|
|
@@ -2180,10 +2180,10 @@ void WebGL2RenderingContext::IsSync(const v8::FunctionCallbackInfo<v8::Value> &a
|
|
|
2180
2180
|
if (ptr == nullptr) {
|
|
2181
2181
|
return;
|
|
2182
2182
|
}
|
|
2183
|
-
|
|
2183
|
+
|
|
2184
2184
|
auto isolate = args.GetIsolate();
|
|
2185
2185
|
auto context = isolate->GetCurrentContext();
|
|
2186
|
-
|
|
2186
|
+
|
|
2187
2187
|
auto value = args[0];
|
|
2188
2188
|
auto type = GetNativeType(value);
|
|
2189
2189
|
if (type == NativeType::WebGLSync) {
|
|
@@ -2205,10 +2205,10 @@ void WebGL2RenderingContext::IsTransformFeedback(const v8::FunctionCallbackInfo<
|
|
|
2205
2205
|
if (ptr == nullptr) {
|
|
2206
2206
|
return;
|
|
2207
2207
|
}
|
|
2208
|
-
|
|
2208
|
+
|
|
2209
2209
|
auto isolate = args.GetIsolate();
|
|
2210
2210
|
auto context = isolate->GetCurrentContext();
|
|
2211
|
-
|
|
2211
|
+
|
|
2212
2212
|
auto value = args[0];
|
|
2213
2213
|
auto type = GetNativeType(value);
|
|
2214
2214
|
if (type == NativeType::WebGLTransformFeedback) {
|
|
@@ -2230,10 +2230,10 @@ void WebGL2RenderingContext::IsVertexArray(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2230
2230
|
if (ptr == nullptr) {
|
|
2231
2231
|
return;
|
|
2232
2232
|
}
|
|
2233
|
-
|
|
2233
|
+
|
|
2234
2234
|
auto isolate = args.GetIsolate();
|
|
2235
2235
|
auto context = isolate->GetCurrentContext();
|
|
2236
|
-
|
|
2236
|
+
|
|
2237
2237
|
auto value = args[0];
|
|
2238
2238
|
auto type = GetNativeType(value);
|
|
2239
2239
|
if (type == NativeType::WebGLVertexArrayObject) {
|
|
@@ -2265,10 +2265,10 @@ void WebGL2RenderingContext::ReadBuffer(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2265
2265
|
if (ptr == nullptr) {
|
|
2266
2266
|
return;
|
|
2267
2267
|
}
|
|
2268
|
-
|
|
2268
|
+
|
|
2269
2269
|
auto isolate = args.GetIsolate();
|
|
2270
2270
|
auto context = isolate->GetCurrentContext();
|
|
2271
|
-
|
|
2271
|
+
|
|
2272
2272
|
auto src = args[0]->Uint32Value(context).ToChecked();
|
|
2273
2273
|
canvas_native_webgl2_read_buffer(
|
|
2274
2274
|
src,
|
|
@@ -2282,10 +2282,10 @@ void WebGL2RenderingContext::RenderbufferStorageMultisample(
|
|
|
2282
2282
|
if (ptr == nullptr) {
|
|
2283
2283
|
return;
|
|
2284
2284
|
}
|
|
2285
|
-
|
|
2285
|
+
|
|
2286
2286
|
auto isolate = args.GetIsolate();
|
|
2287
2287
|
auto context = isolate->GetCurrentContext();
|
|
2288
|
-
|
|
2288
|
+
|
|
2289
2289
|
auto target = args[0]->Uint32Value(context).ToChecked();
|
|
2290
2290
|
auto samples = args[1]->Int32Value(context).ToChecked();
|
|
2291
2291
|
auto internalFormat = args[2]->Uint32Value(context).ToChecked();
|
|
@@ -2307,7 +2307,7 @@ WebGL2RenderingContext::ResumeTransformFeedback(const v8::FunctionCallbackInfo<v
|
|
|
2307
2307
|
if (ptr == nullptr) {
|
|
2308
2308
|
return;
|
|
2309
2309
|
}
|
|
2310
|
-
|
|
2310
|
+
|
|
2311
2311
|
canvas_native_webgl2_resume_transform_feedback(
|
|
2312
2312
|
ptr->GetState());
|
|
2313
2313
|
}
|
|
@@ -2317,10 +2317,10 @@ void WebGL2RenderingContext::SamplerParameterf(const v8::FunctionCallbackInfo<v8
|
|
|
2317
2317
|
if (ptr == nullptr) {
|
|
2318
2318
|
return;
|
|
2319
2319
|
}
|
|
2320
|
-
|
|
2320
|
+
|
|
2321
2321
|
auto isolate = args.GetIsolate();
|
|
2322
2322
|
auto context = isolate->GetCurrentContext();
|
|
2323
|
-
|
|
2323
|
+
|
|
2324
2324
|
auto samplerValue = args[0];
|
|
2325
2325
|
auto type = GetNativeType(samplerValue);
|
|
2326
2326
|
if (type == NativeType::WebGLSampler) {
|
|
@@ -2335,7 +2335,7 @@ void WebGL2RenderingContext::SamplerParameterf(const v8::FunctionCallbackInfo<v8
|
|
|
2335
2335
|
ptr->GetState());
|
|
2336
2336
|
}
|
|
2337
2337
|
}
|
|
2338
|
-
|
|
2338
|
+
|
|
2339
2339
|
}
|
|
2340
2340
|
|
|
2341
2341
|
void WebGL2RenderingContext::SamplerParameteri(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -2343,10 +2343,10 @@ void WebGL2RenderingContext::SamplerParameteri(const v8::FunctionCallbackInfo<v8
|
|
|
2343
2343
|
if (ptr == nullptr) {
|
|
2344
2344
|
return;
|
|
2345
2345
|
}
|
|
2346
|
-
|
|
2346
|
+
|
|
2347
2347
|
auto isolate = args.GetIsolate();
|
|
2348
2348
|
auto context = isolate->GetCurrentContext();
|
|
2349
|
-
|
|
2349
|
+
|
|
2350
2350
|
auto samplerValue = args[0];
|
|
2351
2351
|
auto type = GetNativeType(samplerValue);
|
|
2352
2352
|
if (type == NativeType::WebGLSampler) {
|
|
@@ -2361,7 +2361,7 @@ void WebGL2RenderingContext::SamplerParameteri(const v8::FunctionCallbackInfo<v8
|
|
|
2361
2361
|
ptr->GetState());
|
|
2362
2362
|
}
|
|
2363
2363
|
}
|
|
2364
|
-
|
|
2364
|
+
|
|
2365
2365
|
}
|
|
2366
2366
|
|
|
2367
2367
|
void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -2369,13 +2369,13 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2369
2369
|
if (ptr == nullptr) {
|
|
2370
2370
|
return;
|
|
2371
2371
|
}
|
|
2372
|
-
|
|
2372
|
+
|
|
2373
2373
|
auto isolate = args.GetIsolate();
|
|
2374
2374
|
auto context = isolate->GetCurrentContext();
|
|
2375
|
-
|
|
2375
|
+
|
|
2376
2376
|
auto count = args.Length();
|
|
2377
|
-
|
|
2378
|
-
|
|
2377
|
+
|
|
2378
|
+
|
|
2379
2379
|
if (count == 10) {
|
|
2380
2380
|
auto target = args[0]->Int32Value(
|
|
2381
2381
|
context).ToChecked();
|
|
@@ -2395,9 +2395,9 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2395
2395
|
context).ToChecked();
|
|
2396
2396
|
auto type = args[8]->Uint32Value(
|
|
2397
2397
|
context).ToChecked();
|
|
2398
|
-
|
|
2398
|
+
|
|
2399
2399
|
auto imageOrPixelsOrOffset = args[9];
|
|
2400
|
-
|
|
2400
|
+
|
|
2401
2401
|
if (imageOrPixelsOrOffset->IsNumber()) {
|
|
2402
2402
|
auto offset = imageOrPixelsOrOffset->NumberValue(
|
|
2403
2403
|
context).ToChecked();
|
|
@@ -2416,17 +2416,17 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2416
2416
|
);
|
|
2417
2417
|
return;
|
|
2418
2418
|
}
|
|
2419
|
-
|
|
2420
|
-
|
|
2419
|
+
|
|
2420
|
+
|
|
2421
2421
|
if (imageOrPixelsOrOffset->IsArrayBufferView()) {
|
|
2422
2422
|
auto buf = imageOrPixelsOrOffset.As<v8::ArrayBufferView>();
|
|
2423
|
-
|
|
2423
|
+
|
|
2424
2424
|
auto array = buf->Buffer();
|
|
2425
2425
|
auto offset = buf->ByteOffset();
|
|
2426
2426
|
auto size = buf->ByteLength();
|
|
2427
2427
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
2428
2428
|
auto data = static_cast<uint8_t *>((void *) data_ptr);
|
|
2429
|
-
|
|
2429
|
+
|
|
2430
2430
|
canvas_native_webgl2_tex_image3d(
|
|
2431
2431
|
target,
|
|
2432
2432
|
level,
|
|
@@ -2443,13 +2443,13 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2443
2443
|
);
|
|
2444
2444
|
return;
|
|
2445
2445
|
}
|
|
2446
|
-
|
|
2446
|
+
|
|
2447
2447
|
auto imageType = GetNativeType(imageOrPixelsOrOffset);
|
|
2448
|
-
|
|
2448
|
+
|
|
2449
2449
|
switch (imageType) {
|
|
2450
2450
|
case NativeType::CanvasRenderingContext2D: {
|
|
2451
2451
|
auto canvas2d = CanvasRenderingContext2DImpl::GetPointer(imageOrPixelsOrOffset.As<v8::Object>());
|
|
2452
|
-
|
|
2452
|
+
|
|
2453
2453
|
if (canvas2d != nullptr) {
|
|
2454
2454
|
canvas_native_webgl2_tex_image3d_canvas2d(
|
|
2455
2455
|
target,
|
|
@@ -2464,7 +2464,7 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2464
2464
|
canvas2d->GetContext(),
|
|
2465
2465
|
ptr->GetState()
|
|
2466
2466
|
);
|
|
2467
|
-
|
|
2467
|
+
|
|
2468
2468
|
return;
|
|
2469
2469
|
}
|
|
2470
2470
|
return;
|
|
@@ -2486,7 +2486,7 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2486
2486
|
image_asset->GetImageAsset(),
|
|
2487
2487
|
ptr->GetState()
|
|
2488
2488
|
);
|
|
2489
|
-
|
|
2489
|
+
|
|
2490
2490
|
return;
|
|
2491
2491
|
}
|
|
2492
2492
|
return;
|
|
@@ -2508,7 +2508,7 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2508
2508
|
image_bitmap->GetImageAsset(),
|
|
2509
2509
|
ptr->GetState()
|
|
2510
2510
|
);
|
|
2511
|
-
|
|
2511
|
+
|
|
2512
2512
|
return;
|
|
2513
2513
|
}
|
|
2514
2514
|
return;
|
|
@@ -2536,13 +2536,13 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2536
2536
|
ptr->GetState()
|
|
2537
2537
|
);
|
|
2538
2538
|
}
|
|
2539
|
-
|
|
2539
|
+
|
|
2540
2540
|
}
|
|
2541
2541
|
default:
|
|
2542
2542
|
return;
|
|
2543
2543
|
}
|
|
2544
2544
|
} else if (args.Length() > 10) {
|
|
2545
|
-
|
|
2545
|
+
|
|
2546
2546
|
auto target = args[0]->Int32Value(
|
|
2547
2547
|
context).ToChecked();
|
|
2548
2548
|
auto level = args[1]->Int32Value(
|
|
@@ -2561,31 +2561,31 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2561
2561
|
context).ToChecked();
|
|
2562
2562
|
auto type = args[8]->Uint32Value(
|
|
2563
2563
|
context).ToChecked();
|
|
2564
|
-
|
|
2564
|
+
|
|
2565
2565
|
auto imageOrPixelsOrOffset = args[9];
|
|
2566
|
-
|
|
2566
|
+
|
|
2567
2567
|
size_t srcOffsetValue = 0;
|
|
2568
2568
|
if (args[9]->IsNumber()) {
|
|
2569
2569
|
srcOffsetValue = static_cast<size_t>(args[9]->NumberValue(
|
|
2570
2570
|
context).ToChecked());
|
|
2571
2571
|
}
|
|
2572
|
-
|
|
2572
|
+
|
|
2573
2573
|
if (imageOrPixelsOrOffset->IsArrayBufferView()) {
|
|
2574
2574
|
auto buf = imageOrPixelsOrOffset.As<v8::ArrayBufferView>();
|
|
2575
|
-
|
|
2575
|
+
|
|
2576
2576
|
auto array = buf->Buffer();
|
|
2577
2577
|
auto offset = buf->ByteOffset();
|
|
2578
2578
|
auto size = buf->ByteLength();
|
|
2579
2579
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
2580
2580
|
auto data = static_cast<uint8_t *>((void *) data_ptr);
|
|
2581
|
-
|
|
2581
|
+
|
|
2582
2582
|
srcOffsetValue =
|
|
2583
2583
|
srcOffsetValue * size;
|
|
2584
2584
|
if (srcOffsetValue >
|
|
2585
2585
|
size) {
|
|
2586
2586
|
return;
|
|
2587
2587
|
}
|
|
2588
|
-
|
|
2588
|
+
|
|
2589
2589
|
canvas_native_webgl2_tex_image3d_offset(
|
|
2590
2590
|
target,
|
|
2591
2591
|
level,
|
|
@@ -2602,7 +2602,7 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2602
2602
|
);
|
|
2603
2603
|
return;
|
|
2604
2604
|
}
|
|
2605
|
-
|
|
2605
|
+
|
|
2606
2606
|
}
|
|
2607
2607
|
}
|
|
2608
2608
|
|
|
@@ -2611,10 +2611,10 @@ void WebGL2RenderingContext::TexStorage2D(const v8::FunctionCallbackInfo<v8::Val
|
|
|
2611
2611
|
if (ptr == nullptr) {
|
|
2612
2612
|
return;
|
|
2613
2613
|
}
|
|
2614
|
-
|
|
2614
|
+
|
|
2615
2615
|
auto isolate = args.GetIsolate();
|
|
2616
2616
|
auto context = isolate->GetCurrentContext();
|
|
2617
|
-
|
|
2617
|
+
|
|
2618
2618
|
auto target = args[0]->Uint32Value(
|
|
2619
2619
|
context).ToChecked();
|
|
2620
2620
|
auto levels = args[1]->Int32Value(
|
|
@@ -2640,10 +2640,10 @@ void WebGL2RenderingContext::TexStorage3D(const v8::FunctionCallbackInfo<v8::Val
|
|
|
2640
2640
|
if (ptr == nullptr) {
|
|
2641
2641
|
return;
|
|
2642
2642
|
}
|
|
2643
|
-
|
|
2643
|
+
|
|
2644
2644
|
auto isolate = args.GetIsolate();
|
|
2645
2645
|
auto context = isolate->GetCurrentContext();
|
|
2646
|
-
|
|
2646
|
+
|
|
2647
2647
|
auto target = args[0]->Uint32Value(
|
|
2648
2648
|
context).ToChecked();
|
|
2649
2649
|
auto levels = args[1]->Int32Value(
|
|
@@ -2672,10 +2672,10 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2672
2672
|
if (ptr == nullptr) {
|
|
2673
2673
|
return;
|
|
2674
2674
|
}
|
|
2675
|
-
|
|
2675
|
+
|
|
2676
2676
|
auto isolate = args.GetIsolate();
|
|
2677
2677
|
auto context = isolate->GetCurrentContext();
|
|
2678
|
-
|
|
2678
|
+
|
|
2679
2679
|
auto count = args.Length();
|
|
2680
2680
|
if (count == 11) {
|
|
2681
2681
|
auto target = args[0]->Uint32Value(
|
|
@@ -2698,7 +2698,7 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2698
2698
|
context).ToChecked();
|
|
2699
2699
|
auto type = args[9]->Uint32Value(
|
|
2700
2700
|
context).ToChecked();
|
|
2701
|
-
|
|
2701
|
+
|
|
2702
2702
|
if (args[10]->IsNumber()) {
|
|
2703
2703
|
auto imageOrPixelsOrOffset = args[10]->NumberValue(
|
|
2704
2704
|
context).ToChecked();
|
|
@@ -2718,19 +2718,19 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2718
2718
|
);
|
|
2719
2719
|
return;
|
|
2720
2720
|
}
|
|
2721
|
-
|
|
2721
|
+
|
|
2722
2722
|
auto imageOrPixelsOrOffsetObject = args[10];
|
|
2723
|
-
|
|
2723
|
+
|
|
2724
2724
|
if (imageOrPixelsOrOffsetObject->IsArrayBufferView()) {
|
|
2725
2725
|
auto buf = imageOrPixelsOrOffsetObject.As<v8::ArrayBufferView>();
|
|
2726
|
-
|
|
2726
|
+
|
|
2727
2727
|
auto array = buf->Buffer();
|
|
2728
2728
|
auto offset = buf->ByteOffset();
|
|
2729
2729
|
auto size = buf->ByteLength();
|
|
2730
2730
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
2731
2731
|
auto data = static_cast<uint8_t *>((void *) data_ptr);
|
|
2732
|
-
|
|
2733
|
-
|
|
2732
|
+
|
|
2733
|
+
|
|
2734
2734
|
canvas_native_webgl2_tex_sub_image3d(
|
|
2735
2735
|
target,
|
|
2736
2736
|
level,
|
|
@@ -2745,20 +2745,20 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2745
2745
|
data, size,
|
|
2746
2746
|
ptr->GetState()
|
|
2747
2747
|
);
|
|
2748
|
-
|
|
2748
|
+
|
|
2749
2749
|
return;
|
|
2750
2750
|
}
|
|
2751
|
-
|
|
2752
|
-
|
|
2751
|
+
|
|
2752
|
+
|
|
2753
2753
|
auto imageType = GetNativeType(imageOrPixelsOrOffsetObject);
|
|
2754
|
-
|
|
2755
|
-
|
|
2754
|
+
|
|
2755
|
+
|
|
2756
2756
|
switch (imageType) {
|
|
2757
2757
|
case NativeType::ImageAsset:
|
|
2758
2758
|
{
|
|
2759
2759
|
auto asset = ImageAssetImpl::GetPointer(imageOrPixelsOrOffsetObject.As<v8::Object>());
|
|
2760
2760
|
if (asset != nullptr) {
|
|
2761
|
-
|
|
2761
|
+
|
|
2762
2762
|
canvas_native_webgl2_tex_sub_image3d_asset(
|
|
2763
2763
|
target,
|
|
2764
2764
|
level,
|
|
@@ -2776,10 +2776,10 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2776
2776
|
}
|
|
2777
2777
|
}
|
|
2778
2778
|
break;
|
|
2779
|
-
|
|
2779
|
+
|
|
2780
2780
|
case NativeType::CanvasRenderingContext2D: {
|
|
2781
2781
|
auto canvas2d = CanvasRenderingContext2DImpl::GetPointer(imageOrPixelsOrOffsetObject.As<v8::Object>());
|
|
2782
|
-
|
|
2782
|
+
|
|
2783
2783
|
if (canvas2d != nullptr) {
|
|
2784
2784
|
canvas_native_webgl2_tex_sub_image3d_canvas2d(
|
|
2785
2785
|
target,
|
|
@@ -2795,7 +2795,7 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2795
2795
|
canvas2d->GetContext(),
|
|
2796
2796
|
ptr->GetState()
|
|
2797
2797
|
);
|
|
2798
|
-
|
|
2798
|
+
|
|
2799
2799
|
return;
|
|
2800
2800
|
}
|
|
2801
2801
|
return;
|
|
@@ -2824,16 +2824,16 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2824
2824
|
ptr->GetState()
|
|
2825
2825
|
);
|
|
2826
2826
|
}
|
|
2827
|
-
|
|
2827
|
+
|
|
2828
2828
|
}
|
|
2829
|
-
|
|
2829
|
+
|
|
2830
2830
|
default:
|
|
2831
2831
|
break;
|
|
2832
2832
|
}
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2833
|
+
|
|
2834
|
+
|
|
2835
|
+
|
|
2836
|
+
|
|
2837
2837
|
} else if (count > 11) {
|
|
2838
2838
|
auto target = args[0]->Uint32Value(
|
|
2839
2839
|
context).ToChecked();
|
|
@@ -2855,34 +2855,34 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2855
2855
|
context).ToChecked();
|
|
2856
2856
|
auto type = args[9]->Uint32Value(
|
|
2857
2857
|
context).ToChecked();
|
|
2858
|
-
|
|
2858
|
+
|
|
2859
2859
|
size_t srcOffsetValue = 0;
|
|
2860
|
-
|
|
2860
|
+
|
|
2861
2861
|
if (args[11]->IsNumber()) {
|
|
2862
2862
|
srcOffsetValue = static_cast<size_t>(args[11]->NumberValue(
|
|
2863
2863
|
context).ToChecked());
|
|
2864
2864
|
}
|
|
2865
|
-
|
|
2865
|
+
|
|
2866
2866
|
auto imageOrPixelsOrOffsetObject = args[10];
|
|
2867
|
-
|
|
2868
|
-
|
|
2867
|
+
|
|
2868
|
+
|
|
2869
2869
|
if (imageOrPixelsOrOffsetObject->IsArrayBufferView()) {
|
|
2870
2870
|
auto buf = imageOrPixelsOrOffsetObject.As<v8::ArrayBufferView>();
|
|
2871
|
-
|
|
2871
|
+
|
|
2872
2872
|
auto array = buf->Buffer();
|
|
2873
2873
|
auto offset = buf->ByteOffset();
|
|
2874
2874
|
auto size = buf->ByteLength();
|
|
2875
2875
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
2876
2876
|
auto data = static_cast<uint8_t *>((void *) data_ptr);
|
|
2877
|
-
|
|
2878
|
-
|
|
2877
|
+
|
|
2878
|
+
|
|
2879
2879
|
srcOffsetValue =
|
|
2880
2880
|
srcOffsetValue * size;
|
|
2881
2881
|
if (srcOffsetValue > size) {
|
|
2882
2882
|
return;
|
|
2883
2883
|
}
|
|
2884
|
-
|
|
2885
|
-
|
|
2884
|
+
|
|
2885
|
+
|
|
2886
2886
|
canvas_native_webgl2_tex_sub_image3d_offset(
|
|
2887
2887
|
target,
|
|
2888
2888
|
level,
|
|
@@ -2908,10 +2908,10 @@ WebGL2RenderingContext::TransformFeedbackVaryings(const v8::FunctionCallbackInfo
|
|
|
2908
2908
|
if (ptr == nullptr) {
|
|
2909
2909
|
return;
|
|
2910
2910
|
}
|
|
2911
|
-
|
|
2911
|
+
|
|
2912
2912
|
auto isolate = args.GetIsolate();
|
|
2913
2913
|
auto context = isolate->GetCurrentContext();
|
|
2914
|
-
|
|
2914
|
+
|
|
2915
2915
|
auto programValue = args[0];
|
|
2916
2916
|
auto type = GetNativeType(programValue);
|
|
2917
2917
|
if (type == NativeType::WebGLProgram) {
|
|
@@ -2919,29 +2919,29 @@ WebGL2RenderingContext::TransformFeedbackVaryings(const v8::FunctionCallbackInfo
|
|
|
2919
2919
|
auto varyingsObject = args[1];
|
|
2920
2920
|
auto bufferMode = args[2]->Uint32Value(
|
|
2921
2921
|
context).ToChecked();
|
|
2922
|
-
|
|
2922
|
+
|
|
2923
2923
|
if (program != nullptr &&
|
|
2924
2924
|
varyingsObject->IsArray()) {
|
|
2925
2925
|
auto varyings = varyingsObject.As<v8::Array>();
|
|
2926
2926
|
auto len = varyings->Length();
|
|
2927
|
-
|
|
2928
|
-
|
|
2927
|
+
|
|
2928
|
+
|
|
2929
2929
|
std::vector<std::string> store;
|
|
2930
2930
|
store.reserve(len);
|
|
2931
|
-
|
|
2931
|
+
|
|
2932
2932
|
for (int j = 0; j < len; ++j) {
|
|
2933
2933
|
auto name = ConvertFromV8String(isolate, varyings->Get(
|
|
2934
2934
|
context, j).ToLocalChecked());
|
|
2935
|
-
|
|
2935
|
+
|
|
2936
2936
|
store.push_back(name);
|
|
2937
2937
|
}
|
|
2938
|
-
|
|
2939
|
-
|
|
2938
|
+
|
|
2939
|
+
|
|
2940
2940
|
const char *cStrings[store.size()];
|
|
2941
2941
|
for (size_t i = 0; i < store.size(); ++i) {
|
|
2942
2942
|
cStrings[i] = store[i].c_str();
|
|
2943
2943
|
}
|
|
2944
|
-
|
|
2944
|
+
|
|
2945
2945
|
canvas_native_webgl2_transform_feedback_varyings(
|
|
2946
2946
|
program->GetProgram(),
|
|
2947
2947
|
cStrings, store.size(),
|
|
@@ -2950,7 +2950,7 @@ WebGL2RenderingContext::TransformFeedbackVaryings(const v8::FunctionCallbackInfo
|
|
|
2950
2950
|
);
|
|
2951
2951
|
}
|
|
2952
2952
|
}
|
|
2953
|
-
|
|
2953
|
+
|
|
2954
2954
|
}
|
|
2955
2955
|
|
|
2956
2956
|
void WebGL2RenderingContext::Uniform1ui(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -2958,20 +2958,20 @@ void WebGL2RenderingContext::Uniform1ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2958
2958
|
if (ptr == nullptr) {
|
|
2959
2959
|
return;
|
|
2960
2960
|
}
|
|
2961
|
-
|
|
2961
|
+
|
|
2962
2962
|
auto isolate = args.GetIsolate();
|
|
2963
2963
|
auto context = isolate->GetCurrentContext();
|
|
2964
|
-
|
|
2964
|
+
|
|
2965
2965
|
auto locationValue = args[0];
|
|
2966
2966
|
auto type = GetNativeType(locationValue);
|
|
2967
|
-
|
|
2967
|
+
|
|
2968
2968
|
auto v0Value = args[1];
|
|
2969
2969
|
if (type == NativeType::WebGLUniformLocation) {
|
|
2970
|
-
|
|
2970
|
+
|
|
2971
2971
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
2972
2972
|
auto v0 = v0Value->Uint32Value(
|
|
2973
2973
|
context).ToChecked();
|
|
2974
|
-
|
|
2974
|
+
|
|
2975
2975
|
if (location != nullptr) {
|
|
2976
2976
|
canvas_native_webgl2_uniform1ui(
|
|
2977
2977
|
location->GetUniformLocation(),
|
|
@@ -2980,7 +2980,7 @@ void WebGL2RenderingContext::Uniform1ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2980
2980
|
);
|
|
2981
2981
|
}
|
|
2982
2982
|
}
|
|
2983
|
-
|
|
2983
|
+
|
|
2984
2984
|
}
|
|
2985
2985
|
|
|
2986
2986
|
void WebGL2RenderingContext::Uniform2ui(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -2988,21 +2988,21 @@ void WebGL2RenderingContext::Uniform2ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2988
2988
|
if (ptr == nullptr) {
|
|
2989
2989
|
return;
|
|
2990
2990
|
}
|
|
2991
|
-
|
|
2991
|
+
|
|
2992
2992
|
auto isolate = args.GetIsolate();
|
|
2993
2993
|
auto context = isolate->GetCurrentContext();
|
|
2994
|
-
|
|
2994
|
+
|
|
2995
2995
|
auto locationValue = args[0];
|
|
2996
2996
|
auto type = GetNativeType(locationValue);
|
|
2997
|
-
|
|
2997
|
+
|
|
2998
2998
|
if (type == NativeType::WebGLUniformLocation) {
|
|
2999
|
-
|
|
2999
|
+
|
|
3000
3000
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
3001
3001
|
auto v0 = args[1]->Uint32Value(
|
|
3002
3002
|
context).ToChecked();
|
|
3003
3003
|
auto v1 = args[2]->Uint32Value(
|
|
3004
3004
|
context).ToChecked();
|
|
3005
|
-
|
|
3005
|
+
|
|
3006
3006
|
if (location != nullptr) {
|
|
3007
3007
|
canvas_native_webgl2_uniform2ui(
|
|
3008
3008
|
location->GetUniformLocation(),
|
|
@@ -3012,7 +3012,7 @@ void WebGL2RenderingContext::Uniform2ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
3012
3012
|
);
|
|
3013
3013
|
}
|
|
3014
3014
|
}
|
|
3015
|
-
|
|
3015
|
+
|
|
3016
3016
|
}
|
|
3017
3017
|
|
|
3018
3018
|
void WebGL2RenderingContext::Uniform3ui(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -3020,25 +3020,25 @@ void WebGL2RenderingContext::Uniform3ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
3020
3020
|
if (ptr == nullptr) {
|
|
3021
3021
|
return;
|
|
3022
3022
|
}
|
|
3023
|
-
|
|
3023
|
+
|
|
3024
3024
|
auto isolate = args.GetIsolate();
|
|
3025
3025
|
auto context = isolate->GetCurrentContext();
|
|
3026
|
-
|
|
3026
|
+
|
|
3027
3027
|
auto locationValue = args[0];
|
|
3028
3028
|
auto type = GetNativeType(locationValue);
|
|
3029
|
-
|
|
3029
|
+
|
|
3030
3030
|
if (type == NativeType::WebGLUniformLocation) {
|
|
3031
|
-
|
|
3031
|
+
|
|
3032
3032
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
3033
3033
|
auto v0 = args[1]->Uint32Value(
|
|
3034
3034
|
context).ToChecked();
|
|
3035
|
-
|
|
3035
|
+
|
|
3036
3036
|
auto v1 = args[2]->Uint32Value(
|
|
3037
3037
|
context).ToChecked();
|
|
3038
|
-
|
|
3038
|
+
|
|
3039
3039
|
auto v2 = args[3]->Uint32Value(
|
|
3040
3040
|
context).ToChecked();
|
|
3041
|
-
|
|
3041
|
+
|
|
3042
3042
|
if (location != nullptr) {
|
|
3043
3043
|
canvas_native_webgl2_uniform3ui(
|
|
3044
3044
|
location->GetUniformLocation(),
|
|
@@ -3049,7 +3049,7 @@ void WebGL2RenderingContext::Uniform3ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
3049
3049
|
);
|
|
3050
3050
|
}
|
|
3051
3051
|
}
|
|
3052
|
-
|
|
3052
|
+
|
|
3053
3053
|
}
|
|
3054
3054
|
|
|
3055
3055
|
void WebGL2RenderingContext::Uniform4ui(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -3057,28 +3057,28 @@ void WebGL2RenderingContext::Uniform4ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
3057
3057
|
if (ptr == nullptr) {
|
|
3058
3058
|
return;
|
|
3059
3059
|
}
|
|
3060
|
-
|
|
3060
|
+
|
|
3061
3061
|
auto isolate = args.GetIsolate();
|
|
3062
3062
|
auto context = isolate->GetCurrentContext();
|
|
3063
|
-
|
|
3063
|
+
|
|
3064
3064
|
auto locationValue = args[0];
|
|
3065
3065
|
auto type = GetNativeType(locationValue);
|
|
3066
|
-
|
|
3066
|
+
|
|
3067
3067
|
if (type == NativeType::WebGLUniformLocation) {
|
|
3068
|
-
|
|
3068
|
+
|
|
3069
3069
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
3070
3070
|
auto v0 = args[1]->Uint32Value(
|
|
3071
3071
|
context).ToChecked();
|
|
3072
|
-
|
|
3072
|
+
|
|
3073
3073
|
auto v1 = args[2]->Uint32Value(
|
|
3074
3074
|
context).ToChecked();
|
|
3075
|
-
|
|
3075
|
+
|
|
3076
3076
|
auto v2 = args[3]->Uint32Value(
|
|
3077
3077
|
context).ToChecked();
|
|
3078
3078
|
auto v3 = args[4]->Uint32Value(
|
|
3079
3079
|
context).ToChecked();
|
|
3080
|
-
|
|
3081
|
-
|
|
3080
|
+
|
|
3081
|
+
|
|
3082
3082
|
if (location != nullptr) {
|
|
3083
3083
|
canvas_native_webgl2_uniform4ui(
|
|
3084
3084
|
location->GetUniformLocation(),
|
|
@@ -3090,7 +3090,7 @@ void WebGL2RenderingContext::Uniform4ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
3090
3090
|
);
|
|
3091
3091
|
}
|
|
3092
3092
|
}
|
|
3093
|
-
|
|
3093
|
+
|
|
3094
3094
|
}
|
|
3095
3095
|
|
|
3096
3096
|
void WebGL2RenderingContext::Uniform1uiv(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -3098,15 +3098,15 @@ void WebGL2RenderingContext::Uniform1uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3098
3098
|
if (ptr == nullptr) {
|
|
3099
3099
|
return;
|
|
3100
3100
|
}
|
|
3101
|
-
|
|
3101
|
+
|
|
3102
3102
|
auto isolate = args.GetIsolate();
|
|
3103
3103
|
auto context = isolate->GetCurrentContext();
|
|
3104
|
-
|
|
3105
|
-
|
|
3104
|
+
|
|
3105
|
+
|
|
3106
3106
|
auto locationValue = args[0];
|
|
3107
3107
|
auto type = GetNativeType(locationValue);
|
|
3108
|
-
|
|
3109
|
-
|
|
3108
|
+
|
|
3109
|
+
|
|
3110
3110
|
if (type == NativeType::WebGLUniformLocation) {
|
|
3111
3111
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
3112
3112
|
auto dataValue = args[1];
|
|
@@ -3118,8 +3118,8 @@ void WebGL2RenderingContext::Uniform1uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3118
3118
|
auto size = buf->Length();
|
|
3119
3119
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3120
3120
|
auto data = static_cast<uint32_t *>((void *) data_ptr);
|
|
3121
|
-
|
|
3122
|
-
|
|
3121
|
+
|
|
3122
|
+
|
|
3123
3123
|
canvas_native_webgl2_uniform1uiv(
|
|
3124
3124
|
location->GetUniformLocation(),
|
|
3125
3125
|
data, size,
|
|
@@ -3137,17 +3137,17 @@ void WebGL2RenderingContext::Uniform1uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3137
3137
|
context).ToChecked();
|
|
3138
3138
|
buf.push_back(item);
|
|
3139
3139
|
}
|
|
3140
|
-
|
|
3140
|
+
|
|
3141
3141
|
canvas_native_webgl2_uniform1uiv(
|
|
3142
3142
|
location->GetUniformLocation(),
|
|
3143
3143
|
buf.data(), buf.size(),
|
|
3144
3144
|
ptr->GetState()
|
|
3145
3145
|
);
|
|
3146
3146
|
}
|
|
3147
|
-
|
|
3148
|
-
|
|
3147
|
+
|
|
3148
|
+
|
|
3149
3149
|
}
|
|
3150
|
-
|
|
3150
|
+
|
|
3151
3151
|
}
|
|
3152
3152
|
|
|
3153
3153
|
void WebGL2RenderingContext::Uniform2uiv(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -3155,15 +3155,15 @@ void WebGL2RenderingContext::Uniform2uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3155
3155
|
if (ptr == nullptr) {
|
|
3156
3156
|
return;
|
|
3157
3157
|
}
|
|
3158
|
-
|
|
3158
|
+
|
|
3159
3159
|
auto isolate = args.GetIsolate();
|
|
3160
3160
|
auto context = isolate->GetCurrentContext();
|
|
3161
|
-
|
|
3162
|
-
|
|
3161
|
+
|
|
3162
|
+
|
|
3163
3163
|
auto locationValue = args[0];
|
|
3164
3164
|
auto type = GetNativeType(locationValue);
|
|
3165
|
-
|
|
3166
|
-
|
|
3165
|
+
|
|
3166
|
+
|
|
3167
3167
|
if (type == NativeType::WebGLUniformLocation) {
|
|
3168
3168
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
3169
3169
|
auto dataValue = args[1];
|
|
@@ -3175,8 +3175,8 @@ void WebGL2RenderingContext::Uniform2uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3175
3175
|
auto size = buf->Length();
|
|
3176
3176
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3177
3177
|
auto data = static_cast<uint32_t *>((void *) data_ptr);
|
|
3178
|
-
|
|
3179
|
-
|
|
3178
|
+
|
|
3179
|
+
|
|
3180
3180
|
canvas_native_webgl2_uniform2uiv(
|
|
3181
3181
|
location->GetUniformLocation(),
|
|
3182
3182
|
data, size,
|
|
@@ -3200,10 +3200,10 @@ void WebGL2RenderingContext::Uniform2uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3200
3200
|
ptr->GetState()
|
|
3201
3201
|
);
|
|
3202
3202
|
}
|
|
3203
|
-
|
|
3204
|
-
|
|
3203
|
+
|
|
3204
|
+
|
|
3205
3205
|
}
|
|
3206
|
-
|
|
3206
|
+
|
|
3207
3207
|
}
|
|
3208
3208
|
|
|
3209
3209
|
void WebGL2RenderingContext::Uniform3uiv(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -3211,29 +3211,29 @@ void WebGL2RenderingContext::Uniform3uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3211
3211
|
if (ptr == nullptr) {
|
|
3212
3212
|
return;
|
|
3213
3213
|
}
|
|
3214
|
-
|
|
3214
|
+
|
|
3215
3215
|
auto isolate = args.GetIsolate();
|
|
3216
3216
|
auto context = isolate->GetCurrentContext();
|
|
3217
|
-
|
|
3218
|
-
|
|
3217
|
+
|
|
3218
|
+
|
|
3219
3219
|
auto locationValue = args[0];
|
|
3220
3220
|
auto type = GetNativeType(locationValue);
|
|
3221
|
-
|
|
3222
|
-
|
|
3221
|
+
|
|
3222
|
+
|
|
3223
3223
|
if (type == NativeType::WebGLUniformLocation) {
|
|
3224
3224
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
3225
3225
|
auto dataValue = args[1];
|
|
3226
3226
|
if (location != nullptr &&
|
|
3227
3227
|
dataValue->IsUint32Array()) {
|
|
3228
3228
|
auto buf = dataValue.As<v8::Uint32Array>();
|
|
3229
|
-
|
|
3229
|
+
|
|
3230
3230
|
auto array = buf->Buffer();
|
|
3231
3231
|
auto offset = buf->ByteOffset();
|
|
3232
3232
|
auto size = buf->Length();
|
|
3233
3233
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3234
3234
|
auto data = static_cast<uint32_t *>((void *) data_ptr);
|
|
3235
|
-
|
|
3236
|
-
|
|
3235
|
+
|
|
3236
|
+
|
|
3237
3237
|
canvas_native_webgl2_uniform3uiv(
|
|
3238
3238
|
location->GetUniformLocation(),
|
|
3239
3239
|
data, size,
|
|
@@ -3257,10 +3257,10 @@ void WebGL2RenderingContext::Uniform3uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3257
3257
|
ptr->GetState()
|
|
3258
3258
|
);
|
|
3259
3259
|
}
|
|
3260
|
-
|
|
3261
|
-
|
|
3260
|
+
|
|
3261
|
+
|
|
3262
3262
|
}
|
|
3263
|
-
|
|
3263
|
+
|
|
3264
3264
|
}
|
|
3265
3265
|
|
|
3266
3266
|
void WebGL2RenderingContext::Uniform4uiv(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -3268,29 +3268,29 @@ void WebGL2RenderingContext::Uniform4uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3268
3268
|
if (ptr == nullptr) {
|
|
3269
3269
|
return;
|
|
3270
3270
|
}
|
|
3271
|
-
|
|
3271
|
+
|
|
3272
3272
|
auto isolate = args.GetIsolate();
|
|
3273
3273
|
auto context = isolate->GetCurrentContext();
|
|
3274
|
-
|
|
3275
|
-
|
|
3274
|
+
|
|
3275
|
+
|
|
3276
3276
|
auto locationValue = args[0];
|
|
3277
3277
|
auto type = GetNativeType(locationValue);
|
|
3278
|
-
|
|
3279
|
-
|
|
3278
|
+
|
|
3279
|
+
|
|
3280
3280
|
if (type == NativeType::WebGLUniformLocation) {
|
|
3281
3281
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
3282
3282
|
auto dataValue = args[1];
|
|
3283
3283
|
if (location != nullptr) {
|
|
3284
3284
|
if (dataValue->IsUint32Array()) {
|
|
3285
3285
|
auto buf = dataValue.As<v8::Uint32Array>();
|
|
3286
|
-
|
|
3286
|
+
|
|
3287
3287
|
auto array = buf->Buffer();
|
|
3288
3288
|
auto offset = buf->ByteOffset();
|
|
3289
3289
|
auto size = buf->Length();
|
|
3290
3290
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3291
3291
|
auto data = static_cast<uint32_t *>((void *) data_ptr);
|
|
3292
|
-
|
|
3293
|
-
|
|
3292
|
+
|
|
3293
|
+
|
|
3294
3294
|
canvas_native_webgl2_uniform4uiv(
|
|
3295
3295
|
location->GetUniformLocation(),
|
|
3296
3296
|
data, size,
|
|
@@ -3308,7 +3308,7 @@ void WebGL2RenderingContext::Uniform4uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3308
3308
|
context).ToChecked();
|
|
3309
3309
|
buf.push_back(item);
|
|
3310
3310
|
}
|
|
3311
|
-
|
|
3311
|
+
|
|
3312
3312
|
canvas_native_webgl2_uniform4uiv(
|
|
3313
3313
|
location->GetUniformLocation(),
|
|
3314
3314
|
buf.data(), buf.size(),
|
|
@@ -3317,7 +3317,7 @@ void WebGL2RenderingContext::Uniform4uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3317
3317
|
}
|
|
3318
3318
|
}
|
|
3319
3319
|
}
|
|
3320
|
-
|
|
3320
|
+
|
|
3321
3321
|
}
|
|
3322
3322
|
|
|
3323
3323
|
void WebGL2RenderingContext::UniformBlockBinding(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -3325,21 +3325,21 @@ void WebGL2RenderingContext::UniformBlockBinding(const v8::FunctionCallbackInfo<
|
|
|
3325
3325
|
if (ptr == nullptr) {
|
|
3326
3326
|
return;
|
|
3327
3327
|
}
|
|
3328
|
-
|
|
3328
|
+
|
|
3329
3329
|
auto isolate = args.GetIsolate();
|
|
3330
3330
|
auto context = isolate->GetCurrentContext();
|
|
3331
|
-
|
|
3332
|
-
|
|
3331
|
+
|
|
3332
|
+
|
|
3333
3333
|
auto programValue = args[0];
|
|
3334
3334
|
auto type = GetNativeType(programValue);
|
|
3335
3335
|
if (type == NativeType::WebGLProgram) {
|
|
3336
|
-
|
|
3336
|
+
|
|
3337
3337
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
3338
3338
|
auto uniformBlockIndex = args[1]->Uint32Value(
|
|
3339
3339
|
context).ToChecked();
|
|
3340
3340
|
auto uniformBlockBinding = args[2]->Uint32Value(
|
|
3341
3341
|
context).ToChecked();
|
|
3342
|
-
|
|
3342
|
+
|
|
3343
3343
|
if (program != nullptr) {
|
|
3344
3344
|
canvas_native_webgl2_uniform_block_binding(
|
|
3345
3345
|
program->GetProgram(),
|
|
@@ -3348,9 +3348,9 @@ void WebGL2RenderingContext::UniformBlockBinding(const v8::FunctionCallbackInfo<
|
|
|
3348
3348
|
ptr->GetState()
|
|
3349
3349
|
);
|
|
3350
3350
|
}
|
|
3351
|
-
|
|
3351
|
+
|
|
3352
3352
|
}
|
|
3353
|
-
|
|
3353
|
+
|
|
3354
3354
|
}
|
|
3355
3355
|
|
|
3356
3356
|
void WebGL2RenderingContext::UniformMatrix2x3fv(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -3358,18 +3358,18 @@ void WebGL2RenderingContext::UniformMatrix2x3fv(const v8::FunctionCallbackInfo<v
|
|
|
3358
3358
|
if (ptr == nullptr) {
|
|
3359
3359
|
return;
|
|
3360
3360
|
}
|
|
3361
|
-
|
|
3361
|
+
|
|
3362
3362
|
auto isolate = args.GetIsolate();
|
|
3363
3363
|
auto context = isolate->GetCurrentContext();
|
|
3364
|
-
|
|
3365
|
-
|
|
3364
|
+
|
|
3365
|
+
|
|
3366
3366
|
auto locationValue = args[0];
|
|
3367
3367
|
auto type = GetNativeType(locationValue);
|
|
3368
3368
|
if (type == NativeType::WebGLUniformLocation) {
|
|
3369
3369
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
3370
3370
|
auto transpose = args[1]->BooleanValue(isolate);
|
|
3371
3371
|
auto dataValue = args[2];
|
|
3372
|
-
|
|
3372
|
+
|
|
3373
3373
|
if (dataValue->IsFloat32Array()) {
|
|
3374
3374
|
auto buf = dataValue.As<v8::Float32Array>();
|
|
3375
3375
|
auto array = buf->Buffer();
|
|
@@ -3377,8 +3377,8 @@ void WebGL2RenderingContext::UniformMatrix2x3fv(const v8::FunctionCallbackInfo<v
|
|
|
3377
3377
|
auto size = buf->Length();
|
|
3378
3378
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3379
3379
|
auto data = static_cast<float *>((void *) data_ptr);
|
|
3380
|
-
|
|
3381
|
-
|
|
3380
|
+
|
|
3381
|
+
|
|
3382
3382
|
canvas_native_webgl2_uniform_matrix2x3fv(
|
|
3383
3383
|
location->GetUniformLocation(),
|
|
3384
3384
|
transpose,
|
|
@@ -3396,8 +3396,8 @@ void WebGL2RenderingContext::UniformMatrix2x3fv(const v8::FunctionCallbackInfo<v
|
|
|
3396
3396
|
static_cast<float>(item->NumberValue(
|
|
3397
3397
|
context).ToChecked()));
|
|
3398
3398
|
}
|
|
3399
|
-
|
|
3400
|
-
|
|
3399
|
+
|
|
3400
|
+
|
|
3401
3401
|
canvas_native_webgl2_uniform_matrix2x3fv(
|
|
3402
3402
|
location->GetUniformLocation(),
|
|
3403
3403
|
transpose,
|
|
@@ -3406,7 +3406,7 @@ void WebGL2RenderingContext::UniformMatrix2x3fv(const v8::FunctionCallbackInfo<v
|
|
|
3406
3406
|
);
|
|
3407
3407
|
}
|
|
3408
3408
|
}
|
|
3409
|
-
|
|
3409
|
+
|
|
3410
3410
|
}
|
|
3411
3411
|
|
|
3412
3412
|
void WebGL2RenderingContext::UniformMatrix2x4fv(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -3414,28 +3414,28 @@ void WebGL2RenderingContext::UniformMatrix2x4fv(const v8::FunctionCallbackInfo<v
|
|
|
3414
3414
|
if (ptr == nullptr) {
|
|
3415
3415
|
return;
|
|
3416
3416
|
}
|
|
3417
|
-
|
|
3417
|
+
|
|
3418
3418
|
auto isolate = args.GetIsolate();
|
|
3419
3419
|
auto context = isolate->GetCurrentContext();
|
|
3420
|
-
|
|
3421
|
-
|
|
3420
|
+
|
|
3421
|
+
|
|
3422
3422
|
auto locationValue = args[0];
|
|
3423
3423
|
auto type = GetNativeType(locationValue);
|
|
3424
3424
|
if (type == NativeType::WebGLUniformLocation) {
|
|
3425
3425
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
3426
3426
|
auto transpose = args[1]->BooleanValue(isolate);
|
|
3427
3427
|
auto dataValue = args[2];
|
|
3428
|
-
|
|
3428
|
+
|
|
3429
3429
|
if (dataValue->IsFloat32Array()) {
|
|
3430
3430
|
auto buf = dataValue.As<v8::Float32Array>();
|
|
3431
|
-
|
|
3431
|
+
|
|
3432
3432
|
auto array = buf->Buffer();
|
|
3433
3433
|
auto offset = buf->ByteOffset();
|
|
3434
3434
|
auto size = buf->Length();
|
|
3435
3435
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3436
3436
|
auto data = static_cast<float *>((void *) data_ptr);
|
|
3437
|
-
|
|
3438
|
-
|
|
3437
|
+
|
|
3438
|
+
|
|
3439
3439
|
canvas_native_webgl2_uniform_matrix2x4fv(
|
|
3440
3440
|
location->GetUniformLocation(),
|
|
3441
3441
|
transpose,
|
|
@@ -3453,8 +3453,8 @@ void WebGL2RenderingContext::UniformMatrix2x4fv(const v8::FunctionCallbackInfo<v
|
|
|
3453
3453
|
static_cast<float>(item->NumberValue(
|
|
3454
3454
|
context).ToChecked()));
|
|
3455
3455
|
}
|
|
3456
|
-
|
|
3457
|
-
|
|
3456
|
+
|
|
3457
|
+
|
|
3458
3458
|
canvas_native_webgl2_uniform_matrix2x4fv(
|
|
3459
3459
|
location->GetUniformLocation(),
|
|
3460
3460
|
transpose,
|
|
@@ -3463,7 +3463,7 @@ void WebGL2RenderingContext::UniformMatrix2x4fv(const v8::FunctionCallbackInfo<v
|
|
|
3463
3463
|
);
|
|
3464
3464
|
}
|
|
3465
3465
|
}
|
|
3466
|
-
|
|
3466
|
+
|
|
3467
3467
|
}
|
|
3468
3468
|
|
|
3469
3469
|
void WebGL2RenderingContext::UniformMatrix3x2fv(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -3471,29 +3471,29 @@ void WebGL2RenderingContext::UniformMatrix3x2fv(const v8::FunctionCallbackInfo<v
|
|
|
3471
3471
|
if (ptr == nullptr) {
|
|
3472
3472
|
return;
|
|
3473
3473
|
}
|
|
3474
|
-
|
|
3474
|
+
|
|
3475
3475
|
auto isolate = args.GetIsolate();
|
|
3476
3476
|
auto context = isolate->GetCurrentContext();
|
|
3477
|
-
|
|
3478
|
-
|
|
3477
|
+
|
|
3478
|
+
|
|
3479
3479
|
auto locationValue = args[0];
|
|
3480
3480
|
auto type = GetNativeType(locationValue);
|
|
3481
3481
|
if (type == NativeType::WebGLUniformLocation) {
|
|
3482
3482
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
3483
3483
|
auto transpose = args[1]->BooleanValue(isolate);
|
|
3484
3484
|
auto dataValue = args[2];
|
|
3485
|
-
|
|
3485
|
+
|
|
3486
3486
|
if (dataValue->IsFloat32Array()) {
|
|
3487
3487
|
auto buf = dataValue.As<v8::Float32Array>();
|
|
3488
|
-
|
|
3489
|
-
|
|
3488
|
+
|
|
3489
|
+
|
|
3490
3490
|
auto array = buf->Buffer();
|
|
3491
3491
|
auto offset = buf->ByteOffset();
|
|
3492
3492
|
auto size = buf->Length();
|
|
3493
3493
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3494
3494
|
auto data = static_cast<float *>((void *) data_ptr);
|
|
3495
|
-
|
|
3496
|
-
|
|
3495
|
+
|
|
3496
|
+
|
|
3497
3497
|
canvas_native_webgl2_uniform_matrix3x2fv(
|
|
3498
3498
|
location->GetUniformLocation(),
|
|
3499
3499
|
transpose,
|
|
@@ -3511,8 +3511,8 @@ void WebGL2RenderingContext::UniformMatrix3x2fv(const v8::FunctionCallbackInfo<v
|
|
|
3511
3511
|
static_cast<float>(item->NumberValue(
|
|
3512
3512
|
context).ToChecked()));
|
|
3513
3513
|
}
|
|
3514
|
-
|
|
3515
|
-
|
|
3514
|
+
|
|
3515
|
+
|
|
3516
3516
|
canvas_native_webgl2_uniform_matrix3x2fv(
|
|
3517
3517
|
location->GetUniformLocation(),
|
|
3518
3518
|
transpose,
|
|
@@ -3521,7 +3521,7 @@ void WebGL2RenderingContext::UniformMatrix3x2fv(const v8::FunctionCallbackInfo<v
|
|
|
3521
3521
|
);
|
|
3522
3522
|
}
|
|
3523
3523
|
}
|
|
3524
|
-
|
|
3524
|
+
|
|
3525
3525
|
}
|
|
3526
3526
|
|
|
3527
3527
|
void WebGL2RenderingContext::UniformMatrix3x4fv(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -3529,18 +3529,18 @@ void WebGL2RenderingContext::UniformMatrix3x4fv(const v8::FunctionCallbackInfo<v
|
|
|
3529
3529
|
if (ptr == nullptr) {
|
|
3530
3530
|
return;
|
|
3531
3531
|
}
|
|
3532
|
-
|
|
3532
|
+
|
|
3533
3533
|
auto isolate = args.GetIsolate();
|
|
3534
3534
|
auto context = isolate->GetCurrentContext();
|
|
3535
|
-
|
|
3536
|
-
|
|
3535
|
+
|
|
3536
|
+
|
|
3537
3537
|
auto locationValue = args[0];
|
|
3538
3538
|
auto type = GetNativeType(locationValue);
|
|
3539
3539
|
if (type == NativeType::WebGLUniformLocation) {
|
|
3540
3540
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
3541
3541
|
auto transpose = args[1]->BooleanValue(isolate);
|
|
3542
3542
|
auto dataValue = args[2];
|
|
3543
|
-
|
|
3543
|
+
|
|
3544
3544
|
if (dataValue->IsFloat32Array()) {
|
|
3545
3545
|
auto buf = dataValue.As<v8::Float32Array>();
|
|
3546
3546
|
auto array = buf->Buffer();
|
|
@@ -3548,8 +3548,8 @@ void WebGL2RenderingContext::UniformMatrix3x4fv(const v8::FunctionCallbackInfo<v
|
|
|
3548
3548
|
auto size = buf->Length();
|
|
3549
3549
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3550
3550
|
auto data = static_cast<float *>((void *) data_ptr);
|
|
3551
|
-
|
|
3552
|
-
|
|
3551
|
+
|
|
3552
|
+
|
|
3553
3553
|
canvas_native_webgl2_uniform_matrix3x4fv(
|
|
3554
3554
|
location->GetUniformLocation(),
|
|
3555
3555
|
transpose,
|
|
@@ -3567,8 +3567,8 @@ void WebGL2RenderingContext::UniformMatrix3x4fv(const v8::FunctionCallbackInfo<v
|
|
|
3567
3567
|
static_cast<float>(item->NumberValue(
|
|
3568
3568
|
context).ToChecked()));
|
|
3569
3569
|
}
|
|
3570
|
-
|
|
3571
|
-
|
|
3570
|
+
|
|
3571
|
+
|
|
3572
3572
|
canvas_native_webgl2_uniform_matrix3x4fv(
|
|
3573
3573
|
location->GetUniformLocation(),
|
|
3574
3574
|
transpose,
|
|
@@ -3577,7 +3577,7 @@ void WebGL2RenderingContext::UniformMatrix3x4fv(const v8::FunctionCallbackInfo<v
|
|
|
3577
3577
|
);
|
|
3578
3578
|
}
|
|
3579
3579
|
}
|
|
3580
|
-
|
|
3580
|
+
|
|
3581
3581
|
}
|
|
3582
3582
|
|
|
3583
3583
|
void WebGL2RenderingContext::UniformMatrix4x2fv(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -3585,27 +3585,27 @@ void WebGL2RenderingContext::UniformMatrix4x2fv(const v8::FunctionCallbackInfo<v
|
|
|
3585
3585
|
if (ptr == nullptr) {
|
|
3586
3586
|
return;
|
|
3587
3587
|
}
|
|
3588
|
-
|
|
3588
|
+
|
|
3589
3589
|
auto isolate = args.GetIsolate();
|
|
3590
3590
|
auto context = isolate->GetCurrentContext();
|
|
3591
|
-
|
|
3592
|
-
|
|
3591
|
+
|
|
3592
|
+
|
|
3593
3593
|
auto locationValue = args[0];
|
|
3594
3594
|
auto type = GetNativeType(locationValue);
|
|
3595
3595
|
if (type == NativeType::WebGLUniformLocation) {
|
|
3596
3596
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
3597
3597
|
auto transpose = args[1]->BooleanValue(isolate);
|
|
3598
3598
|
auto dataValue = args[2];
|
|
3599
|
-
|
|
3599
|
+
|
|
3600
3600
|
if (dataValue->IsFloat32Array()) {
|
|
3601
3601
|
auto buf = dataValue.As<v8::Float32Array>();
|
|
3602
|
-
|
|
3602
|
+
|
|
3603
3603
|
auto array = buf->Buffer();
|
|
3604
3604
|
auto offset = buf->ByteOffset();
|
|
3605
3605
|
auto size = buf->Length();
|
|
3606
3606
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3607
3607
|
auto data = static_cast<float *>((void *) data_ptr);
|
|
3608
|
-
|
|
3608
|
+
|
|
3609
3609
|
canvas_native_webgl2_uniform_matrix4x2fv(
|
|
3610
3610
|
location->GetUniformLocation(),
|
|
3611
3611
|
transpose,
|
|
@@ -3623,8 +3623,8 @@ void WebGL2RenderingContext::UniformMatrix4x2fv(const v8::FunctionCallbackInfo<v
|
|
|
3623
3623
|
static_cast<float>(item->NumberValue(
|
|
3624
3624
|
context).ToChecked()));
|
|
3625
3625
|
}
|
|
3626
|
-
|
|
3627
|
-
|
|
3626
|
+
|
|
3627
|
+
|
|
3628
3628
|
canvas_native_webgl2_uniform_matrix4x2fv(
|
|
3629
3629
|
location->GetUniformLocation(),
|
|
3630
3630
|
transpose,
|
|
@@ -3633,7 +3633,7 @@ void WebGL2RenderingContext::UniformMatrix4x2fv(const v8::FunctionCallbackInfo<v
|
|
|
3633
3633
|
);
|
|
3634
3634
|
}
|
|
3635
3635
|
}
|
|
3636
|
-
|
|
3636
|
+
|
|
3637
3637
|
}
|
|
3638
3638
|
|
|
3639
3639
|
void WebGL2RenderingContext::UniformMatrix4x3fv(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -3641,18 +3641,18 @@ void WebGL2RenderingContext::UniformMatrix4x3fv(const v8::FunctionCallbackInfo<v
|
|
|
3641
3641
|
if (ptr == nullptr) {
|
|
3642
3642
|
return;
|
|
3643
3643
|
}
|
|
3644
|
-
|
|
3644
|
+
|
|
3645
3645
|
auto isolate = args.GetIsolate();
|
|
3646
3646
|
auto context = isolate->GetCurrentContext();
|
|
3647
|
-
|
|
3648
|
-
|
|
3647
|
+
|
|
3648
|
+
|
|
3649
3649
|
auto locationValue = args[0];
|
|
3650
3650
|
auto type = GetNativeType(locationValue);
|
|
3651
3651
|
if (type == NativeType::WebGLUniformLocation) {
|
|
3652
3652
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
3653
3653
|
auto transpose = args[1]->BooleanValue(isolate);
|
|
3654
3654
|
auto dataValue = args[2];
|
|
3655
|
-
|
|
3655
|
+
|
|
3656
3656
|
if (dataValue->IsFloat32Array()) {
|
|
3657
3657
|
auto buf = dataValue.As<v8::Float32Array>();
|
|
3658
3658
|
auto array = buf->Buffer();
|
|
@@ -3660,7 +3660,7 @@ void WebGL2RenderingContext::UniformMatrix4x3fv(const v8::FunctionCallbackInfo<v
|
|
|
3660
3660
|
auto size = buf->Length();
|
|
3661
3661
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3662
3662
|
auto data = static_cast<float *>((void *) data_ptr);
|
|
3663
|
-
|
|
3663
|
+
|
|
3664
3664
|
canvas_native_webgl2_uniform_matrix4x3fv(
|
|
3665
3665
|
location->GetUniformLocation(),
|
|
3666
3666
|
transpose,
|
|
@@ -3678,8 +3678,8 @@ void WebGL2RenderingContext::UniformMatrix4x3fv(const v8::FunctionCallbackInfo<v
|
|
|
3678
3678
|
static_cast<float>(item->NumberValue(
|
|
3679
3679
|
context).ToChecked()));
|
|
3680
3680
|
}
|
|
3681
|
-
|
|
3682
|
-
|
|
3681
|
+
|
|
3682
|
+
|
|
3683
3683
|
canvas_native_webgl2_uniform_matrix4x3fv(
|
|
3684
3684
|
location->GetUniformLocation(),
|
|
3685
3685
|
transpose,
|
|
@@ -3688,7 +3688,7 @@ void WebGL2RenderingContext::UniformMatrix4x3fv(const v8::FunctionCallbackInfo<v
|
|
|
3688
3688
|
);
|
|
3689
3689
|
}
|
|
3690
3690
|
}
|
|
3691
|
-
|
|
3691
|
+
|
|
3692
3692
|
}
|
|
3693
3693
|
|
|
3694
3694
|
void WebGL2RenderingContext::VertexAttribDivisor(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -3696,11 +3696,11 @@ void WebGL2RenderingContext::VertexAttribDivisor(const v8::FunctionCallbackInfo<
|
|
|
3696
3696
|
if (ptr == nullptr) {
|
|
3697
3697
|
return;
|
|
3698
3698
|
}
|
|
3699
|
-
|
|
3699
|
+
|
|
3700
3700
|
auto isolate = args.GetIsolate();
|
|
3701
3701
|
auto context = isolate->GetCurrentContext();
|
|
3702
|
-
|
|
3703
|
-
|
|
3702
|
+
|
|
3703
|
+
|
|
3704
3704
|
auto index = args[0]->Uint32Value(
|
|
3705
3705
|
context).ToChecked();
|
|
3706
3706
|
auto divisor = args[1]->Uint32Value(
|
|
@@ -3710,7 +3710,7 @@ void WebGL2RenderingContext::VertexAttribDivisor(const v8::FunctionCallbackInfo<
|
|
|
3710
3710
|
divisor,
|
|
3711
3711
|
ptr->GetState()
|
|
3712
3712
|
);
|
|
3713
|
-
|
|
3713
|
+
|
|
3714
3714
|
}
|
|
3715
3715
|
|
|
3716
3716
|
void WebGL2RenderingContext::VertexAttribI4i(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -3718,11 +3718,11 @@ void WebGL2RenderingContext::VertexAttribI4i(const v8::FunctionCallbackInfo<v8::
|
|
|
3718
3718
|
if (ptr == nullptr) {
|
|
3719
3719
|
return;
|
|
3720
3720
|
}
|
|
3721
|
-
|
|
3721
|
+
|
|
3722
3722
|
auto isolate = args.GetIsolate();
|
|
3723
3723
|
auto context = isolate->GetCurrentContext();
|
|
3724
|
-
|
|
3725
|
-
|
|
3724
|
+
|
|
3725
|
+
|
|
3726
3726
|
auto index = args[0]->Int32Value(
|
|
3727
3727
|
context).ToChecked();
|
|
3728
3728
|
auto v0 = args[1]->Int32Value(
|
|
@@ -3741,7 +3741,7 @@ void WebGL2RenderingContext::VertexAttribI4i(const v8::FunctionCallbackInfo<v8::
|
|
|
3741
3741
|
v3,
|
|
3742
3742
|
ptr->GetState()
|
|
3743
3743
|
);
|
|
3744
|
-
|
|
3744
|
+
|
|
3745
3745
|
}
|
|
3746
3746
|
|
|
3747
3747
|
void WebGL2RenderingContext::VertexAttribI4iv(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -3749,24 +3749,24 @@ void WebGL2RenderingContext::VertexAttribI4iv(const v8::FunctionCallbackInfo<v8:
|
|
|
3749
3749
|
if (ptr == nullptr) {
|
|
3750
3750
|
return;
|
|
3751
3751
|
}
|
|
3752
|
-
|
|
3752
|
+
|
|
3753
3753
|
auto isolate = args.GetIsolate();
|
|
3754
3754
|
auto context = isolate->GetCurrentContext();
|
|
3755
|
-
|
|
3756
|
-
|
|
3755
|
+
|
|
3756
|
+
|
|
3757
3757
|
auto index = args[0]->Uint32Value(
|
|
3758
3758
|
context).ToChecked();
|
|
3759
3759
|
auto value = args[1];
|
|
3760
3760
|
if (value->IsInt32Array()) {
|
|
3761
3761
|
auto buf = value.As<v8::Int32Array>();
|
|
3762
|
-
|
|
3762
|
+
|
|
3763
3763
|
auto array = buf->Buffer();
|
|
3764
3764
|
auto offset = buf->ByteOffset();
|
|
3765
3765
|
auto size = buf->Length();
|
|
3766
3766
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3767
3767
|
auto data = static_cast<int32_t *>((void *) data_ptr);
|
|
3768
|
-
|
|
3769
|
-
|
|
3768
|
+
|
|
3769
|
+
|
|
3770
3770
|
canvas_native_webgl2_vertex_attrib_i4iv(
|
|
3771
3771
|
index,
|
|
3772
3772
|
data, size,
|
|
@@ -3784,15 +3784,15 @@ void WebGL2RenderingContext::VertexAttribI4iv(const v8::FunctionCallbackInfo<v8:
|
|
|
3784
3784
|
context).ToChecked();
|
|
3785
3785
|
buf.push_back(item);
|
|
3786
3786
|
}
|
|
3787
|
-
|
|
3788
|
-
|
|
3787
|
+
|
|
3788
|
+
|
|
3789
3789
|
canvas_native_webgl2_vertex_attrib_i4iv(
|
|
3790
3790
|
index,
|
|
3791
3791
|
buf.data(), buf.size(),
|
|
3792
3792
|
ptr->GetState()
|
|
3793
3793
|
);
|
|
3794
3794
|
}
|
|
3795
|
-
|
|
3795
|
+
|
|
3796
3796
|
}
|
|
3797
3797
|
|
|
3798
3798
|
void WebGL2RenderingContext::VertexAttribI4ui(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -3800,11 +3800,11 @@ void WebGL2RenderingContext::VertexAttribI4ui(const v8::FunctionCallbackInfo<v8:
|
|
|
3800
3800
|
if (ptr == nullptr) {
|
|
3801
3801
|
return;
|
|
3802
3802
|
}
|
|
3803
|
-
|
|
3803
|
+
|
|
3804
3804
|
auto isolate = args.GetIsolate();
|
|
3805
3805
|
auto context = isolate->GetCurrentContext();
|
|
3806
|
-
|
|
3807
|
-
|
|
3806
|
+
|
|
3807
|
+
|
|
3808
3808
|
auto index = args[0]->Uint32Value(
|
|
3809
3809
|
context).ToChecked();
|
|
3810
3810
|
auto v0 = args[1]->Uint32Value(
|
|
@@ -3815,7 +3815,7 @@ void WebGL2RenderingContext::VertexAttribI4ui(const v8::FunctionCallbackInfo<v8:
|
|
|
3815
3815
|
context).ToChecked();
|
|
3816
3816
|
auto v3 = args[4]->Uint32Value(
|
|
3817
3817
|
context).ToChecked();
|
|
3818
|
-
|
|
3818
|
+
|
|
3819
3819
|
canvas_native_webgl2_vertex_attrib_i4ui(
|
|
3820
3820
|
index,
|
|
3821
3821
|
v0,
|
|
@@ -3824,7 +3824,7 @@ void WebGL2RenderingContext::VertexAttribI4ui(const v8::FunctionCallbackInfo<v8:
|
|
|
3824
3824
|
v3,
|
|
3825
3825
|
ptr->GetState()
|
|
3826
3826
|
);
|
|
3827
|
-
|
|
3827
|
+
|
|
3828
3828
|
}
|
|
3829
3829
|
|
|
3830
3830
|
void WebGL2RenderingContext::VertexAttribI4uiv(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -3832,10 +3832,10 @@ void WebGL2RenderingContext::VertexAttribI4uiv(const v8::FunctionCallbackInfo<v8
|
|
|
3832
3832
|
if (ptr == nullptr) {
|
|
3833
3833
|
return;
|
|
3834
3834
|
}
|
|
3835
|
-
|
|
3835
|
+
|
|
3836
3836
|
auto isolate = args.GetIsolate();
|
|
3837
3837
|
auto context = isolate->GetCurrentContext();
|
|
3838
|
-
|
|
3838
|
+
|
|
3839
3839
|
auto index = args[0]->Uint32Value(
|
|
3840
3840
|
context).ToChecked();
|
|
3841
3841
|
auto value = args[1];
|
|
@@ -3846,8 +3846,8 @@ void WebGL2RenderingContext::VertexAttribI4uiv(const v8::FunctionCallbackInfo<v8
|
|
|
3846
3846
|
auto size = buf->Length();
|
|
3847
3847
|
auto data_ptr = static_cast<uint8_t *>(array->GetBackingStore()->Data()) + offset;
|
|
3848
3848
|
auto data = static_cast<uint32_t *>((void *) data_ptr);
|
|
3849
|
-
|
|
3850
|
-
|
|
3849
|
+
|
|
3850
|
+
|
|
3851
3851
|
canvas_native_webgl2_vertex_attrib_i4uiv(
|
|
3852
3852
|
index,
|
|
3853
3853
|
data, size,
|
|
@@ -3865,68 +3865,68 @@ void WebGL2RenderingContext::VertexAttribI4uiv(const v8::FunctionCallbackInfo<v8
|
|
|
3865
3865
|
context).ToChecked();
|
|
3866
3866
|
buf.push_back(item);
|
|
3867
3867
|
}
|
|
3868
|
-
|
|
3869
|
-
|
|
3868
|
+
|
|
3869
|
+
|
|
3870
3870
|
canvas_native_webgl2_vertex_attrib_i4uiv(
|
|
3871
3871
|
index,
|
|
3872
3872
|
buf.data(), buf.size(),
|
|
3873
3873
|
ptr->GetState()
|
|
3874
3874
|
);
|
|
3875
3875
|
}
|
|
3876
|
-
|
|
3876
|
+
|
|
3877
3877
|
}
|
|
3878
3878
|
|
|
3879
3879
|
void WebGL2RenderingContext::SetConstants(v8::Isolate *isolate,
|
|
3880
3880
|
const v8::Local<v8::ObjectTemplate> &tmpl) {
|
|
3881
3881
|
/* Getting GL parameter information */
|
|
3882
|
-
|
|
3882
|
+
|
|
3883
3883
|
tmpl->Set(isolate, "READ_BUFFER", v8::Integer::NewFromUnsigned(isolate, 0x0C02));
|
|
3884
|
-
|
|
3884
|
+
|
|
3885
3885
|
tmpl->Set(isolate, "UNPACK_ROW_LENGTH", v8::Integer::NewFromUnsigned(isolate, 0x0CF2));
|
|
3886
|
-
|
|
3886
|
+
|
|
3887
3887
|
tmpl->Set(isolate, "UNPACK_SKIP_ROWS", v8::Integer::NewFromUnsigned(isolate, 0x0CF3));
|
|
3888
|
-
|
|
3888
|
+
|
|
3889
3889
|
tmpl->Set(isolate, "UNPACK_SKIP_PIXELS", v8::Integer::NewFromUnsigned(isolate, 0x0CF4));
|
|
3890
|
-
|
|
3890
|
+
|
|
3891
3891
|
tmpl->Set(isolate, "PACK_ROW_LENGTH", v8::Integer::NewFromUnsigned(isolate, 0x0D02));
|
|
3892
|
-
|
|
3892
|
+
|
|
3893
3893
|
tmpl->Set(isolate, "PACK_SKIP_ROWS", v8::Integer::NewFromUnsigned(isolate, 0x0D03));
|
|
3894
|
-
|
|
3894
|
+
|
|
3895
3895
|
tmpl->Set(isolate, "PACK_SKIP_PIXELS", v8::Integer::NewFromUnsigned(isolate, 0x0D04));
|
|
3896
|
-
|
|
3896
|
+
|
|
3897
3897
|
tmpl->Set(isolate, "TEXTURE_BINDING_3D", v8::Integer::NewFromUnsigned(isolate, 0x806A));
|
|
3898
|
-
|
|
3898
|
+
|
|
3899
3899
|
tmpl->Set(isolate, "UNPACK_SKIP_IMAGES", v8::Integer::NewFromUnsigned(isolate, 0x806D));
|
|
3900
|
-
|
|
3900
|
+
|
|
3901
3901
|
tmpl->Set(isolate, "UNPACK_IMAGE_HEIGHT", v8::Integer::NewFromUnsigned(isolate, 0x806E));
|
|
3902
|
-
|
|
3902
|
+
|
|
3903
3903
|
tmpl->Set(isolate, "MAX_3D_TEXTURE_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x8073));
|
|
3904
|
-
|
|
3904
|
+
|
|
3905
3905
|
tmpl->Set(isolate, "MAX_ELEMENTS_VERTICES", v8::Integer::NewFromUnsigned(isolate, 0x80E8));
|
|
3906
|
-
|
|
3906
|
+
|
|
3907
3907
|
tmpl->Set(isolate, "MAX_ELEMENTS_INDICES", v8::Integer::NewFromUnsigned(isolate, 0x80E9));
|
|
3908
|
-
|
|
3908
|
+
|
|
3909
3909
|
tmpl->Set(isolate, "MAX_TEXTURE_LOD_BIAS", v8::Integer::NewFromUnsigned(isolate, 0x84FD));
|
|
3910
|
-
|
|
3910
|
+
|
|
3911
3911
|
tmpl->Set(isolate, "MAX_FRAGMENT_UNIFORM_COMPONENTS",
|
|
3912
3912
|
v8::Integer::NewFromUnsigned(isolate, 0x8B49));
|
|
3913
|
-
|
|
3913
|
+
|
|
3914
3914
|
tmpl->Set(isolate, "MAX_VERTEX_UNIFORM_COMPONENTS",
|
|
3915
3915
|
v8::Integer::NewFromUnsigned(isolate, 0x8B4A));
|
|
3916
|
-
|
|
3916
|
+
|
|
3917
3917
|
tmpl->Set(isolate, "MAX_ARRAY_TEXTURE_LAYERS", v8::Integer::NewFromUnsigned(isolate, 0x88FF));
|
|
3918
|
-
|
|
3918
|
+
|
|
3919
3919
|
tmpl->Set(isolate, "MIN_PROGRAM_TEXEL_OFFSET", v8::Integer::NewFromUnsigned(isolate, 0x8904));
|
|
3920
|
-
|
|
3920
|
+
|
|
3921
3921
|
tmpl->Set(isolate, "MAX_PROGRAM_TEXEL_OFFSET", v8::Integer::NewFromUnsigned(isolate, 0x8905));
|
|
3922
|
-
|
|
3922
|
+
|
|
3923
3923
|
tmpl->Set(isolate, "MAX_VARYING_COMPONENTS", v8::Integer::NewFromUnsigned(isolate, 0x8B4B));
|
|
3924
|
-
|
|
3924
|
+
|
|
3925
3925
|
tmpl->Set(isolate, "FRAGMENT_SHADER_DERIVATIVE_HINT",
|
|
3926
3926
|
v8::Integer::NewFromUnsigned(isolate, 0x8B8B));
|
|
3927
|
-
|
|
3927
|
+
|
|
3928
3928
|
tmpl->Set(isolate, "RASTERIZER_DISCARD", v8::Integer::NewFromUnsigned(isolate, 0x8C89));
|
|
3929
|
-
|
|
3929
|
+
|
|
3930
3930
|
tmpl->Set(isolate, "VERTEX_ARRAY_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x85B5));
|
|
3931
3931
|
tmpl->Set(isolate, "MAX_VERTEX_OUTPUT_COMPONENTS",
|
|
3932
3932
|
v8::Integer::NewFromUnsigned(isolate, 0x9122));
|
|
@@ -3934,95 +3934,95 @@ void WebGL2RenderingContext::SetConstants(v8::Isolate *isolate,
|
|
|
3934
3934
|
v8::Integer::NewFromUnsigned(isolate, 0x9125));
|
|
3935
3935
|
tmpl->Set(isolate, "MAX_SERVER_WAIT_TIMEOUT", v8::Integer::NewFromUnsigned(isolate, 0x9111));
|
|
3936
3936
|
tmpl->Set(isolate, "MAX_ELEMENT_INDEX", v8::Integer::NewFromUnsigned(isolate, 0x8D6B));
|
|
3937
|
-
|
|
3937
|
+
|
|
3938
3938
|
tmpl->Set(isolate, "RED", v8::Integer::NewFromUnsigned(isolate, 0x1903));
|
|
3939
3939
|
tmpl->Set(isolate, "RGB8", v8::Integer::NewFromUnsigned(isolate, 0x8051));
|
|
3940
3940
|
tmpl->Set(isolate, "RGBA8", v8::Integer::NewFromUnsigned(isolate, 0x8058));
|
|
3941
3941
|
tmpl->Set(isolate, "RGB10_A2", v8::Integer::NewFromUnsigned(isolate, 0x8059));
|
|
3942
3942
|
tmpl->Set(isolate, "TEXTURE_3D", v8::Integer::NewFromUnsigned(isolate, 0x806F));
|
|
3943
|
-
|
|
3943
|
+
|
|
3944
3944
|
tmpl->Set(isolate, "TEXTURE_WRAP_R", v8::Integer::NewFromUnsigned(isolate, 0x8072));
|
|
3945
3945
|
tmpl->Set(isolate, "TEXTURE_MIN_LOD", v8::Integer::NewFromUnsigned(isolate, 0x813A));
|
|
3946
3946
|
tmpl->Set(isolate, "TEXTURE_MAX_LOD", v8::Integer::NewFromUnsigned(isolate, 0x813B));
|
|
3947
3947
|
tmpl->Set(isolate, "TEXTURE_BASE_LEVEL", v8::Integer::NewFromUnsigned(isolate, 0x813C));
|
|
3948
3948
|
tmpl->Set(isolate, "TEXTURE_MAX_LEVEL", v8::Integer::NewFromUnsigned(isolate, 0x813D));
|
|
3949
|
-
|
|
3950
|
-
|
|
3949
|
+
|
|
3950
|
+
|
|
3951
3951
|
tmpl->Set(isolate, "TEXTURE_COMPARE_MODE", v8::Integer::NewFromUnsigned(isolate, 0x884C));
|
|
3952
3952
|
tmpl->Set(isolate, "TEXTURE_COMPARE_FUNC", v8::Integer::NewFromUnsigned(isolate, 0x884D));
|
|
3953
3953
|
tmpl->Set(isolate, "SRGB", v8::Integer::NewFromUnsigned(isolate, 0x8C40));
|
|
3954
3954
|
tmpl->Set(isolate, "SRGB8", v8::Integer::NewFromUnsigned(isolate, 0x8C41));
|
|
3955
3955
|
tmpl->Set(isolate, "SRGB8_ALPHA8", v8::Integer::NewFromUnsigned(isolate, 0x8C43));
|
|
3956
|
-
|
|
3956
|
+
|
|
3957
3957
|
tmpl->Set(isolate, "COMPARE_REF_TO_TEXTURE", v8::Integer::NewFromUnsigned(isolate, 0x884E));
|
|
3958
3958
|
tmpl->Set(isolate, "RGBA32F", v8::Integer::NewFromUnsigned(isolate, 0x8814));
|
|
3959
3959
|
tmpl->Set(isolate, "RGB32F", v8::Integer::NewFromUnsigned(isolate, 0x8815));
|
|
3960
3960
|
tmpl->Set(isolate, "RGBA16F", v8::Integer::NewFromUnsigned(isolate, 0x881A));
|
|
3961
3961
|
tmpl->Set(isolate, "RGB16F", v8::Integer::NewFromUnsigned(isolate, 0x881B));
|
|
3962
|
-
|
|
3962
|
+
|
|
3963
3963
|
tmpl->Set(isolate, "TEXTURE_2D_ARRAY", v8::Integer::NewFromUnsigned(isolate, 0x8C1A));
|
|
3964
3964
|
tmpl->Set(isolate, "TEXTURE_BINDING_2D_ARRAY", v8::Integer::NewFromUnsigned(isolate, 0x8C1D));
|
|
3965
3965
|
tmpl->Set(isolate, "R11F_G11F_B10F", v8::Integer::NewFromUnsigned(isolate, 0x8C3A));
|
|
3966
3966
|
tmpl->Set(isolate, "RGB9_E5", v8::Integer::NewFromUnsigned(isolate, 0x8C3D));
|
|
3967
3967
|
tmpl->Set(isolate, "RGBA32UI", v8::Integer::NewFromUnsigned(isolate, 0x8D70));
|
|
3968
|
-
|
|
3969
|
-
|
|
3968
|
+
|
|
3969
|
+
|
|
3970
3970
|
tmpl->Set(isolate, "RGB32UI", v8::Integer::NewFromUnsigned(isolate, 0x8D71));
|
|
3971
3971
|
tmpl->Set(isolate, "RGBA16UI", v8::Integer::NewFromUnsigned(isolate, 0x8D76));
|
|
3972
3972
|
tmpl->Set(isolate, "RGB16UI", v8::Integer::NewFromUnsigned(isolate, 0x8D77));
|
|
3973
3973
|
tmpl->Set(isolate, "RGBA8UI", v8::Integer::NewFromUnsigned(isolate, 0x8D7C));
|
|
3974
3974
|
tmpl->Set(isolate, "RGB8UI", v8::Integer::NewFromUnsigned(isolate, 0x8D7D));
|
|
3975
|
-
|
|
3976
|
-
|
|
3975
|
+
|
|
3976
|
+
|
|
3977
3977
|
tmpl->Set(isolate, "RGBA32I", v8::Integer::NewFromUnsigned(isolate, 0x8D82));
|
|
3978
3978
|
tmpl->Set(isolate, "RGB32I", v8::Integer::NewFromUnsigned(isolate, 0x8D83));
|
|
3979
3979
|
tmpl->Set(isolate, "RGBA16I", v8::Integer::NewFromUnsigned(isolate, 0x8D88));
|
|
3980
3980
|
tmpl->Set(isolate, "RGB16I", v8::Integer::NewFromUnsigned(isolate, 0x8D89));
|
|
3981
3981
|
tmpl->Set(isolate, "RGBA8I", v8::Integer::NewFromUnsigned(isolate, 0x8D8E));
|
|
3982
|
-
|
|
3983
|
-
|
|
3982
|
+
|
|
3983
|
+
|
|
3984
3984
|
tmpl->Set(isolate, "RGB8I", v8::Integer::NewFromUnsigned(isolate, 0x8D8F));
|
|
3985
3985
|
tmpl->Set(isolate, "RED_INTEGER", v8::Integer::NewFromUnsigned(isolate, 0x8D94));
|
|
3986
3986
|
tmpl->Set(isolate, "RGB_INTEGER", v8::Integer::NewFromUnsigned(isolate, 0x8D98));
|
|
3987
3987
|
tmpl->Set(isolate, "RGBA_INTEGER", v8::Integer::NewFromUnsigned(isolate, 0x8D99));
|
|
3988
3988
|
tmpl->Set(isolate, "R8", v8::Integer::NewFromUnsigned(isolate, 0x8229));
|
|
3989
|
-
|
|
3990
|
-
|
|
3989
|
+
|
|
3990
|
+
|
|
3991
3991
|
tmpl->Set(isolate, "RG8", v8::Integer::NewFromUnsigned(isolate, 0x822B));
|
|
3992
3992
|
tmpl->Set(isolate, "R16F", v8::Integer::NewFromUnsigned(isolate, 0x822D));
|
|
3993
3993
|
tmpl->Set(isolate, "R32F", v8::Integer::NewFromUnsigned(isolate, 0x822E));
|
|
3994
3994
|
tmpl->Set(isolate, "RG16F", v8::Integer::NewFromUnsigned(isolate, 0x822F));
|
|
3995
3995
|
tmpl->Set(isolate, "RG32F", v8::Integer::NewFromUnsigned(isolate, 0x8230));
|
|
3996
|
-
|
|
3997
|
-
|
|
3996
|
+
|
|
3997
|
+
|
|
3998
3998
|
tmpl->Set(isolate, "R8I", v8::Integer::NewFromUnsigned(isolate, 0x8231));
|
|
3999
3999
|
tmpl->Set(isolate, "R8UI", v8::Integer::NewFromUnsigned(isolate, 0x8232));
|
|
4000
4000
|
tmpl->Set(isolate, "R16I", v8::Integer::NewFromUnsigned(isolate, 0x8233));
|
|
4001
4001
|
tmpl->Set(isolate, "R16UI", v8::Integer::NewFromUnsigned(isolate, 0x8234));
|
|
4002
4002
|
tmpl->Set(isolate, "R32I", v8::Integer::NewFromUnsigned(isolate, 0x8235));
|
|
4003
|
-
|
|
4004
|
-
|
|
4003
|
+
|
|
4004
|
+
|
|
4005
4005
|
tmpl->Set(isolate, "R32UI", v8::Integer::NewFromUnsigned(isolate, 0x8236));
|
|
4006
4006
|
tmpl->Set(isolate, "RG8I", v8::Integer::NewFromUnsigned(isolate, 0x8237));
|
|
4007
4007
|
tmpl->Set(isolate, "RG8UI", v8::Integer::NewFromUnsigned(isolate, 0x8238));
|
|
4008
4008
|
tmpl->Set(isolate, "RG16I", v8::Integer::NewFromUnsigned(isolate, 0x8239));
|
|
4009
4009
|
tmpl->Set(isolate, "RG16UI", v8::Integer::NewFromUnsigned(isolate, 0x823A));
|
|
4010
|
-
|
|
4010
|
+
|
|
4011
4011
|
tmpl->Set(isolate, "RG32I", v8::Integer::NewFromUnsigned(isolate, 0x823B));
|
|
4012
4012
|
tmpl->Set(isolate, "RG32UI", v8::Integer::NewFromUnsigned(isolate, 0x823C));
|
|
4013
4013
|
tmpl->Set(isolate, "R8_SNORM", v8::Integer::NewFromUnsigned(isolate, 0x8F94));
|
|
4014
4014
|
tmpl->Set(isolate, "RG8_SNORM", v8::Integer::NewFromUnsigned(isolate, 0x8F95));
|
|
4015
4015
|
tmpl->Set(isolate, "RGB8_SNORM", v8::Integer::NewFromUnsigned(isolate, 0x8F96));
|
|
4016
|
-
|
|
4017
|
-
|
|
4016
|
+
|
|
4017
|
+
|
|
4018
4018
|
tmpl->Set(isolate, "RGBA8_SNORM", v8::Integer::NewFromUnsigned(isolate, 0x8F97));
|
|
4019
4019
|
tmpl->Set(isolate, "RGB10_A2UI", v8::Integer::NewFromUnsigned(isolate, 0x906F));
|
|
4020
4020
|
tmpl->Set(isolate, "TEXTURE_IMMUTABLE_FORMAT", v8::Integer::NewFromUnsigned(isolate, 0x912F));
|
|
4021
4021
|
tmpl->Set(isolate, "TEXTURE_IMMUTABLE_LEVELS", v8::Integer::NewFromUnsigned(isolate, 0x82DF));
|
|
4022
4022
|
tmpl->Set(isolate, "UNSIGNED_INT_2_10_10_10_REV",
|
|
4023
4023
|
v8::Integer::NewFromUnsigned(isolate, 0x8368));
|
|
4024
|
-
|
|
4025
|
-
|
|
4024
|
+
|
|
4025
|
+
|
|
4026
4026
|
tmpl->Set(isolate, "UNSIGNED_INT_10F_11F_11F_REV",
|
|
4027
4027
|
v8::Integer::NewFromUnsigned(isolate, 0x8C3B));
|
|
4028
4028
|
tmpl->Set(isolate, "UNSIGNED_INT_5_9_9_9_REV", v8::Integer::NewFromUnsigned(isolate, 0x8C3E));
|
|
@@ -4030,21 +4030,21 @@ void WebGL2RenderingContext::SetConstants(v8::Isolate *isolate,
|
|
|
4030
4030
|
v8::Integer::NewFromUnsigned(isolate, 0x8DAD));
|
|
4031
4031
|
tmpl->Set(isolate, "UNSIGNED_INT_24_8", v8::Integer::NewFromUnsigned(isolate, 0x84FA));
|
|
4032
4032
|
tmpl->Set(isolate, "HALF_FLOAT", v8::Integer::NewFromUnsigned(isolate, 0x140B));
|
|
4033
|
-
|
|
4034
|
-
|
|
4033
|
+
|
|
4034
|
+
|
|
4035
4035
|
tmpl->Set(isolate, "RG", v8::Integer::NewFromUnsigned(isolate, 0x8227));
|
|
4036
4036
|
tmpl->Set(isolate, "RG_INTEGER", v8::Integer::NewFromUnsigned(isolate, 0x8228));
|
|
4037
4037
|
tmpl->Set(isolate, "INT_2_10_10_10_REV", v8::Integer::NewFromUnsigned(isolate, 0x8D9F));
|
|
4038
4038
|
tmpl->Set(isolate, "QUERY_RESULT_AVAILABLE", v8::Integer::NewFromUnsigned(isolate, 0x8865));
|
|
4039
4039
|
tmpl->Set(isolate, "QUERY_RESULT", v8::Integer::NewFromUnsigned(isolate, 0x8866));
|
|
4040
|
-
|
|
4041
|
-
|
|
4040
|
+
|
|
4041
|
+
|
|
4042
4042
|
tmpl->Set(isolate, "CURRENT_QUERY", v8::Integer::NewFromUnsigned(isolate, 0x8867));
|
|
4043
4043
|
tmpl->Set(isolate, "ANY_SAMPLES_PASSED", v8::Integer::NewFromUnsigned(isolate, 0x8C2F));
|
|
4044
4044
|
tmpl->Set(isolate, "ANY_SAMPLES_PASSED_CONSERVATIVE",
|
|
4045
4045
|
v8::Integer::NewFromUnsigned(isolate, 0x8D6A));
|
|
4046
4046
|
tmpl->Set(isolate, "MAX_DRAW_BUFFERS", v8::Integer::NewFromUnsigned(isolate, 0x8824));
|
|
4047
|
-
|
|
4047
|
+
|
|
4048
4048
|
tmpl->Set(isolate, "DRAW_BUFFER0", v8::Integer::NewFromUnsigned(isolate, 0x8825));
|
|
4049
4049
|
tmpl->Set(isolate, "DRAW_BUFFER1", v8::Integer::NewFromUnsigned(isolate, 0x8826));
|
|
4050
4050
|
tmpl->Set(isolate, "DRAW_BUFFER2", v8::Integer::NewFromUnsigned(isolate, 0x8827));
|
|
@@ -4056,17 +4056,17 @@ void WebGL2RenderingContext::SetConstants(v8::Isolate *isolate,
|
|
|
4056
4056
|
tmpl->Set(isolate, "DRAW_BUFFER8", v8::Integer::NewFromUnsigned(isolate, 0x882D));
|
|
4057
4057
|
tmpl->Set(isolate, "DRAW_BUFFER9", v8::Integer::NewFromUnsigned(isolate, 0x882E));
|
|
4058
4058
|
tmpl->Set(isolate, "DRAW_BUFFER10", v8::Integer::NewFromUnsigned(isolate, 0x882F));
|
|
4059
|
-
|
|
4059
|
+
|
|
4060
4060
|
/* Getting GL parameter information */
|
|
4061
|
-
|
|
4061
|
+
|
|
4062
4062
|
/* Textures */
|
|
4063
|
-
|
|
4063
|
+
|
|
4064
4064
|
tmpl->Set(isolate, "DRAW_BUFFER11", v8::Integer::NewFromUnsigned(isolate, 0x8830));
|
|
4065
4065
|
tmpl->Set(isolate, "DRAW_BUFFER12", v8::Integer::NewFromUnsigned(isolate, 0x8831));
|
|
4066
4066
|
tmpl->Set(isolate, "DRAW_BUFFER13", v8::Integer::NewFromUnsigned(isolate, 0x8832));
|
|
4067
4067
|
tmpl->Set(isolate, "DRAW_BUFFER14", v8::Integer::NewFromUnsigned(isolate, 0x8833));
|
|
4068
4068
|
tmpl->Set(isolate, "DRAW_BUFFER15", v8::Integer::NewFromUnsigned(isolate, 0x8834));
|
|
4069
|
-
|
|
4069
|
+
|
|
4070
4070
|
tmpl->Set(isolate, "MAX_COLOR_ATTACHMENTS", v8::Integer::NewFromUnsigned(isolate, 0x8CDF));
|
|
4071
4071
|
tmpl->Set(isolate, "COLOR_ATTACHMENT1", v8::Integer::NewFromUnsigned(isolate, 0x8CE1));
|
|
4072
4072
|
tmpl->Set(isolate, "COLOR_ATTACHMENT2", v8::Integer::NewFromUnsigned(isolate, 0x8CE2));
|
|
@@ -4083,52 +4083,52 @@ void WebGL2RenderingContext::SetConstants(v8::Isolate *isolate,
|
|
|
4083
4083
|
tmpl->Set(isolate, "COLOR_ATTACHMENT13", v8::Integer::NewFromUnsigned(isolate, 0x8CED));
|
|
4084
4084
|
tmpl->Set(isolate, "COLOR_ATTACHMENT14", v8::Integer::NewFromUnsigned(isolate, 0x8CEE));
|
|
4085
4085
|
tmpl->Set(isolate, "COLOR_ATTACHMENT15", v8::Integer::NewFromUnsigned(isolate, 0x8CEF));
|
|
4086
|
-
|
|
4086
|
+
|
|
4087
4087
|
tmpl->Set(isolate, "SAMPLER_3D", v8::Integer::NewFromUnsigned(isolate, 0x8B5F));
|
|
4088
4088
|
tmpl->Set(isolate, "SAMPLER_2D_SHADOW", v8::Integer::NewFromUnsigned(isolate, 0x8B62));
|
|
4089
4089
|
tmpl->Set(isolate, "SAMPLER_2D_ARRAY", v8::Integer::NewFromUnsigned(isolate, 0x8DC1));
|
|
4090
4090
|
tmpl->Set(isolate, "SAMPLER_2D_ARRAY_SHADOW", v8::Integer::NewFromUnsigned(isolate, 0x8DC4));
|
|
4091
4091
|
tmpl->Set(isolate, "SAMPLER_CUBE_SHADOW", v8::Integer::NewFromUnsigned(isolate, 0x8DC5));
|
|
4092
|
-
|
|
4092
|
+
|
|
4093
4093
|
tmpl->Set(isolate, "INT_SAMPLER_2D", v8::Integer::NewFromUnsigned(isolate, 0x8DCA));
|
|
4094
4094
|
tmpl->Set(isolate, "INT_SAMPLER_3D", v8::Integer::NewFromUnsigned(isolate, 0x8DCB));
|
|
4095
4095
|
tmpl->Set(isolate, "INT_SAMPLER_CUBE", v8::Integer::NewFromUnsigned(isolate, 0x8DCC));
|
|
4096
4096
|
tmpl->Set(isolate, "INT_SAMPLER_2D_ARRAY", v8::Integer::NewFromUnsigned(isolate, 0x8DCF));
|
|
4097
4097
|
tmpl->Set(isolate, "UNSIGNED_INT_SAMPLER_2D", v8::Integer::NewFromUnsigned(isolate, 0x8DD2));
|
|
4098
|
-
|
|
4098
|
+
|
|
4099
4099
|
tmpl->Set(isolate, "UNSIGNED_INT_SAMPLER_3D", v8::Integer::NewFromUnsigned(isolate, 0x8DD3));
|
|
4100
4100
|
tmpl->Set(isolate, "UNSIGNED_INT_SAMPLER_CUBE", v8::Integer::NewFromUnsigned(isolate, 0x8DD4));
|
|
4101
4101
|
tmpl->Set(isolate, "UNSIGNED_INT_SAMPLER_2D_ARRAY",
|
|
4102
4102
|
v8::Integer::NewFromUnsigned(isolate, 0x8DD7));
|
|
4103
4103
|
tmpl->Set(isolate, "MAX_SAMPLES", v8::Integer::NewFromUnsigned(isolate, 0x8D57));
|
|
4104
4104
|
tmpl->Set(isolate, "SAMPLER_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8919));
|
|
4105
|
-
|
|
4105
|
+
|
|
4106
4106
|
tmpl->Set(isolate, "PIXEL_PACK_BUFFER", v8::Integer::NewFromUnsigned(isolate, 0x88EB));
|
|
4107
4107
|
tmpl->Set(isolate, "PIXEL_UNPACK_BUFFER", v8::Integer::NewFromUnsigned(isolate, 0x88EC));
|
|
4108
4108
|
tmpl->Set(isolate, "PIXEL_PACK_BUFFER_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x88ED));
|
|
4109
4109
|
tmpl->Set(isolate, "PIXEL_UNPACK_BUFFER_BINDING",
|
|
4110
4110
|
v8::Integer::NewFromUnsigned(isolate, 0x88EF));
|
|
4111
4111
|
tmpl->Set(isolate, "COPY_READ_BUFFER", v8::Integer::NewFromUnsigned(isolate, 0x8F36));
|
|
4112
|
-
|
|
4112
|
+
|
|
4113
4113
|
tmpl->Set(isolate, "COPY_WRITE_BUFFER", v8::Integer::NewFromUnsigned(isolate, 0x8F37));
|
|
4114
4114
|
tmpl->Set(isolate, "COPY_READ_BUFFER_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8F36));
|
|
4115
4115
|
tmpl->Set(isolate, "COPY_WRITE_BUFFER_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8F37));
|
|
4116
4116
|
tmpl->Set(isolate, "FLOAT_MAT2x3", v8::Integer::NewFromUnsigned(isolate, 0x8B65));
|
|
4117
4117
|
tmpl->Set(isolate, "FLOAT_MAT2x4", v8::Integer::NewFromUnsigned(isolate, 0x8B66));
|
|
4118
|
-
|
|
4118
|
+
|
|
4119
4119
|
tmpl->Set(isolate, "FLOAT_MAT3x2", v8::Integer::NewFromUnsigned(isolate, 0x8B67));
|
|
4120
4120
|
tmpl->Set(isolate, "FLOAT_MAT3x4", v8::Integer::NewFromUnsigned(isolate, 0x8B68));
|
|
4121
4121
|
tmpl->Set(isolate, "FLOAT_MAT4x2", v8::Integer::NewFromUnsigned(isolate, 0x8B69));
|
|
4122
4122
|
tmpl->Set(isolate, "FLOAT_MAT4x3", v8::Integer::NewFromUnsigned(isolate, 0x8B6A));
|
|
4123
4123
|
tmpl->Set(isolate, "UNSIGNED_INT_VEC2", v8::Integer::NewFromUnsigned(isolate, 0x8DC6));
|
|
4124
|
-
|
|
4124
|
+
|
|
4125
4125
|
tmpl->Set(isolate, "UNSIGNED_INT_VEC3", v8::Integer::NewFromUnsigned(isolate, 0x8DC7));
|
|
4126
4126
|
tmpl->Set(isolate, "UNSIGNED_INT_VEC4", v8::Integer::NewFromUnsigned(isolate, 0x8DC8));
|
|
4127
4127
|
tmpl->Set(isolate, "UNSIGNED_NORMALIZED", v8::Integer::NewFromUnsigned(isolate, 0x8C17));
|
|
4128
4128
|
tmpl->Set(isolate, "SIGNED_NORMALIZED", v8::Integer::NewFromUnsigned(isolate, 0x8F9C));
|
|
4129
|
-
|
|
4129
|
+
|
|
4130
4130
|
/* Vertex attributes */
|
|
4131
|
-
|
|
4131
|
+
|
|
4132
4132
|
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_INTEGER",
|
|
4133
4133
|
v8::Integer::NewFromUnsigned(isolate, 0x88FD));
|
|
4134
4134
|
tmpl->Set(isolate, "VERTEX_ATTRIB_ARRAY_DIVISOR",
|
|
@@ -4139,7 +4139,7 @@ void WebGL2RenderingContext::SetConstants(v8::Isolate *isolate,
|
|
|
4139
4139
|
v8::Integer::NewFromUnsigned(isolate, 0x8C80));
|
|
4140
4140
|
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_VARYINGS",
|
|
4141
4141
|
v8::Integer::NewFromUnsigned(isolate, 0x8C83));
|
|
4142
|
-
|
|
4142
|
+
|
|
4143
4143
|
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_BUFFER_START",
|
|
4144
4144
|
v8::Integer::NewFromUnsigned(isolate, 0x8C84));
|
|
4145
4145
|
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_BUFFER_SIZE",
|
|
@@ -4148,11 +4148,11 @@ void WebGL2RenderingContext::SetConstants(v8::Isolate *isolate,
|
|
|
4148
4148
|
v8::Integer::NewFromUnsigned(isolate, 0x8C88));
|
|
4149
4149
|
tmpl->Set(isolate, "MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS",
|
|
4150
4150
|
v8::Integer::NewFromUnsigned(isolate, 0x8C8A));
|
|
4151
|
-
|
|
4151
|
+
|
|
4152
4152
|
/* Textures */
|
|
4153
|
-
|
|
4153
|
+
|
|
4154
4154
|
/* Pixel types */
|
|
4155
|
-
|
|
4155
|
+
|
|
4156
4156
|
tmpl->Set(isolate, "MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS",
|
|
4157
4157
|
v8::Integer::NewFromUnsigned(isolate, 0x8C8B));
|
|
4158
4158
|
tmpl->Set(isolate, "INTERLEAVED_ATTRIBS", v8::Integer::NewFromUnsigned(isolate, 0x8C8C));
|
|
@@ -4160,16 +4160,16 @@ void WebGL2RenderingContext::SetConstants(v8::Isolate *isolate,
|
|
|
4160
4160
|
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_BUFFER", v8::Integer::NewFromUnsigned(isolate, 0x8C8E));
|
|
4161
4161
|
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_BUFFER_BINDING",
|
|
4162
4162
|
v8::Integer::NewFromUnsigned(isolate, 0x8C8F));
|
|
4163
|
-
|
|
4163
|
+
|
|
4164
4164
|
tmpl->Set(isolate, "TRANSFORM_FEEDBACK", v8::Integer::NewFromUnsigned(isolate, 0x8E22));
|
|
4165
4165
|
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_PAUSED", v8::Integer::NewFromUnsigned(isolate, 0x8E23));
|
|
4166
4166
|
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_ACTIVE", v8::Integer::NewFromUnsigned(isolate, 0x8E24));
|
|
4167
4167
|
tmpl->Set(isolate, "TRANSFORM_FEEDBACK_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8E25));
|
|
4168
|
-
|
|
4168
|
+
|
|
4169
4169
|
/* Pixel types */
|
|
4170
|
-
|
|
4170
|
+
|
|
4171
4171
|
/* Queries */
|
|
4172
|
-
|
|
4172
|
+
|
|
4173
4173
|
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING",
|
|
4174
4174
|
v8::Integer::NewFromUnsigned(isolate, 0x8210));
|
|
4175
4175
|
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE",
|
|
@@ -4180,11 +4180,11 @@ void WebGL2RenderingContext::SetConstants(v8::Isolate *isolate,
|
|
|
4180
4180
|
v8::Integer::NewFromUnsigned(isolate, 0x8213));
|
|
4181
4181
|
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_BLUE_SIZE",
|
|
4182
4182
|
v8::Integer::NewFromUnsigned(isolate, 0x8214));
|
|
4183
|
-
|
|
4183
|
+
|
|
4184
4184
|
/* Queries */
|
|
4185
|
-
|
|
4185
|
+
|
|
4186
4186
|
/* Draw buffers */
|
|
4187
|
-
|
|
4187
|
+
|
|
4188
4188
|
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE",
|
|
4189
4189
|
v8::Integer::NewFromUnsigned(isolate, 0x8215));
|
|
4190
4190
|
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE",
|
|
@@ -4193,13 +4193,13 @@ void WebGL2RenderingContext::SetConstants(v8::Isolate *isolate,
|
|
|
4193
4193
|
v8::Integer::NewFromUnsigned(isolate, 0x8217));
|
|
4194
4194
|
tmpl->Set(isolate, "FRAMEBUFFER_DEFAULT", v8::Integer::NewFromUnsigned(isolate, 0x8218));
|
|
4195
4195
|
tmpl->Set(isolate, "DEPTH_STENCIL_ATTACHMENT", v8::Integer::NewFromUnsigned(isolate, 0x821A));
|
|
4196
|
-
|
|
4196
|
+
|
|
4197
4197
|
tmpl->Set(isolate, "DEPTH_STENCIL", v8::Integer::NewFromUnsigned(isolate, 0x84F9));
|
|
4198
4198
|
tmpl->Set(isolate, "DEPTH24_STENCIL8", v8::Integer::NewFromUnsigned(isolate, 0x88F0));
|
|
4199
4199
|
tmpl->Set(isolate, "DRAW_FRAMEBUFFER_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8CA6));
|
|
4200
4200
|
tmpl->Set(isolate, "READ_FRAMEBUFFER", v8::Integer::NewFromUnsigned(isolate, 0x8CA8));
|
|
4201
4201
|
tmpl->Set(isolate, "DRAW_FRAMEBUFFER", v8::Integer::NewFromUnsigned(isolate, 0x8CA9));
|
|
4202
|
-
|
|
4202
|
+
|
|
4203
4203
|
tmpl->Set(isolate, "READ_FRAMEBUFFER_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8CAA));
|
|
4204
4204
|
tmpl->Set(isolate, "RENDERBUFFER_SAMPLES", v8::Integer::NewFromUnsigned(isolate, 0x8CAB));
|
|
4205
4205
|
tmpl->Set(isolate, "FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER",
|
|
@@ -4207,14 +4207,14 @@ void WebGL2RenderingContext::SetConstants(v8::Isolate *isolate,
|
|
|
4207
4207
|
tmpl->Set(isolate, "FRAMEBUFFER_INCOMPLETE_MULTISAMPLE",
|
|
4208
4208
|
v8::Integer::NewFromUnsigned(isolate, 0x8D56));
|
|
4209
4209
|
tmpl->Set(isolate, "UNIFORM_BUFFER", v8::Integer::NewFromUnsigned(isolate, 0x8A11));
|
|
4210
|
-
|
|
4210
|
+
|
|
4211
4211
|
tmpl->Set(isolate, "UNIFORM_BUFFER_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8A28));
|
|
4212
4212
|
tmpl->Set(isolate, "UNIFORM_BUFFER_START", v8::Integer::NewFromUnsigned(isolate, 0x8A29));
|
|
4213
4213
|
tmpl->Set(isolate, "UNIFORM_BUFFER_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x8A2A));
|
|
4214
4214
|
tmpl->Set(isolate, "MAX_VERTEX_UNIFORM_BLOCKS", v8::Integer::NewFromUnsigned(isolate, 0x8A2B));
|
|
4215
4215
|
tmpl->Set(isolate, "MAX_FRAGMENT_UNIFORM_BLOCKS",
|
|
4216
4216
|
v8::Integer::NewFromUnsigned(isolate, 0x8A2D));
|
|
4217
|
-
|
|
4217
|
+
|
|
4218
4218
|
tmpl->Set(isolate, "MAX_COMBINED_UNIFORM_BLOCKS",
|
|
4219
4219
|
v8::Integer::NewFromUnsigned(isolate, 0x8A2E));
|
|
4220
4220
|
tmpl->Set(isolate, "MAX_UNIFORM_BUFFER_BINDINGS",
|
|
@@ -4224,22 +4224,22 @@ void WebGL2RenderingContext::SetConstants(v8::Isolate *isolate,
|
|
|
4224
4224
|
v8::Integer::NewFromUnsigned(isolate, 0x8A31));
|
|
4225
4225
|
tmpl->Set(isolate, "MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS",
|
|
4226
4226
|
v8::Integer::NewFromUnsigned(isolate, 0x8A33));
|
|
4227
|
-
|
|
4227
|
+
|
|
4228
4228
|
tmpl->Set(isolate, "UNIFORM_BUFFER_OFFSET_ALIGNMENT",
|
|
4229
4229
|
v8::Integer::NewFromUnsigned(isolate, 0x8A34));
|
|
4230
4230
|
tmpl->Set(isolate, "ACTIVE_UNIFORM_BLOCKS", v8::Integer::NewFromUnsigned(isolate, 0x8A36));
|
|
4231
4231
|
tmpl->Set(isolate, "UNIFORM_TYPE", v8::Integer::NewFromUnsigned(isolate, 0x8A37));
|
|
4232
4232
|
tmpl->Set(isolate, "UNIFORM_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x8A38));
|
|
4233
4233
|
tmpl->Set(isolate, "UNIFORM_BLOCK_INDEX", v8::Integer::NewFromUnsigned(isolate, 0x8A3A));
|
|
4234
|
-
|
|
4234
|
+
|
|
4235
4235
|
tmpl->Set(isolate, "UNIFORM_OFFSET", v8::Integer::NewFromUnsigned(isolate, 0x8A3B));
|
|
4236
4236
|
tmpl->Set(isolate, "UNIFORM_ARRAY_STRIDE", v8::Integer::NewFromUnsigned(isolate, 0x8A3C));
|
|
4237
4237
|
tmpl->Set(isolate, "UNIFORM_MATRIX_STRIDE", v8::Integer::NewFromUnsigned(isolate, 0x8A3D));
|
|
4238
|
-
|
|
4238
|
+
|
|
4239
4239
|
/* Draw buffers */
|
|
4240
|
-
|
|
4240
|
+
|
|
4241
4241
|
/* Samplers */
|
|
4242
|
-
|
|
4242
|
+
|
|
4243
4243
|
tmpl->Set(isolate, "UNIFORM_IS_ROW_MAJOR", v8::Integer::NewFromUnsigned(isolate, 0x8A3E));
|
|
4244
4244
|
tmpl->Set(isolate, "UNIFORM_BLOCK_BINDING", v8::Integer::NewFromUnsigned(isolate, 0x8A3F));
|
|
4245
4245
|
tmpl->Set(isolate, "UNIFORM_BLOCK_DATA_SIZE", v8::Integer::NewFromUnsigned(isolate, 0x8A40));
|
|
@@ -4247,7 +4247,7 @@ void WebGL2RenderingContext::SetConstants(v8::Isolate *isolate,
|
|
|
4247
4247
|
v8::Integer::NewFromUnsigned(isolate, 0x8A42));
|
|
4248
4248
|
tmpl->Set(isolate, "UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES",
|
|
4249
4249
|
v8::Integer::NewFromUnsigned(isolate, 0x8A43));
|
|
4250
|
-
|
|
4250
|
+
|
|
4251
4251
|
tmpl->Set(isolate, "UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER",
|
|
4252
4252
|
v8::Integer::NewFromUnsigned(isolate, 0x8A44));
|
|
4253
4253
|
tmpl->Set(isolate, "UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER",
|
|
@@ -4255,410 +4255,410 @@ void WebGL2RenderingContext::SetConstants(v8::Isolate *isolate,
|
|
|
4255
4255
|
tmpl->Set(isolate, "OBJECT_TYPE", v8::Integer::NewFromUnsigned(isolate, 0x9112));
|
|
4256
4256
|
tmpl->Set(isolate, "SYNC_CONDITION", v8::Integer::NewFromUnsigned(isolate, 0x9113));
|
|
4257
4257
|
tmpl->Set(isolate, "SYNC_STATUS", v8::Integer::NewFromUnsigned(isolate, 0x9114));
|
|
4258
|
-
|
|
4258
|
+
|
|
4259
4259
|
tmpl->Set(isolate, "SYNC_FLAGS", v8::Integer::NewFromUnsigned(isolate, 0x9115));
|
|
4260
4260
|
tmpl->Set(isolate, "SYNC_FENCE", v8::Integer::NewFromUnsigned(isolate, 0x9116));
|
|
4261
4261
|
tmpl->Set(isolate, "SYNC_GPU_COMMANDS_COMPLETE", v8::Integer::NewFromUnsigned(isolate, 0x9117));
|
|
4262
4262
|
tmpl->Set(isolate, "UNSIGNALED", v8::Integer::NewFromUnsigned(isolate, 0x9118));
|
|
4263
4263
|
tmpl->Set(isolate, "SIGNALED", v8::Integer::NewFromUnsigned(isolate, 0x9119));
|
|
4264
|
-
|
|
4264
|
+
|
|
4265
4265
|
/* Samplers */
|
|
4266
|
-
|
|
4266
|
+
|
|
4267
4267
|
/* Buffers */
|
|
4268
|
-
|
|
4268
|
+
|
|
4269
4269
|
tmpl->Set(isolate, "ALREADY_SIGNALED", v8::Integer::NewFromUnsigned(isolate, 0x911A));
|
|
4270
4270
|
tmpl->Set(isolate, "TIMEOUT_EXPIRED", v8::Integer::NewFromUnsigned(isolate, 0x911B));
|
|
4271
4271
|
tmpl->Set(isolate, "CONDITION_SATISFIED", v8::Integer::NewFromUnsigned(isolate, 0x911C));
|
|
4272
4272
|
tmpl->Set(isolate, "WAIT_FAILED", v8::Integer::NewFromUnsigned(isolate, 0x911D));
|
|
4273
4273
|
tmpl->Set(isolate, "SYNC_FLUSH_COMMANDS_BIT",
|
|
4274
4274
|
v8::Integer::NewFromUnsigned(isolate, 0x00000001));
|
|
4275
|
-
|
|
4275
|
+
|
|
4276
4276
|
tmpl->Set(isolate, "COLOR", v8::Integer::NewFromUnsigned(isolate, 0x1800));
|
|
4277
4277
|
tmpl->Set(isolate, "DEPTH", v8::Integer::NewFromUnsigned(isolate, 0x1801));
|
|
4278
4278
|
tmpl->Set(isolate, "STENCIL", v8::Integer::NewFromUnsigned(isolate, 0x1802));
|
|
4279
|
-
|
|
4279
|
+
|
|
4280
4280
|
/* Buffers */
|
|
4281
|
-
|
|
4281
|
+
|
|
4282
4282
|
/* Data types */
|
|
4283
|
-
|
|
4283
|
+
|
|
4284
4284
|
tmpl->Set(isolate, "MIN", v8::Integer::NewFromUnsigned(isolate, 0x8007));
|
|
4285
4285
|
tmpl->Set(isolate, "MAX", v8::Integer::NewFromUnsigned(isolate, 0x8008));
|
|
4286
4286
|
tmpl->Set(isolate, "DEPTH_COMPONENT24", v8::Integer::NewFromUnsigned(isolate, 0x81A6));
|
|
4287
4287
|
tmpl->Set(isolate, "STREAM_READ", v8::Integer::NewFromUnsigned(isolate, 0x88E1));
|
|
4288
4288
|
tmpl->Set(isolate, "STREAM_COPY", v8::Integer::NewFromUnsigned(isolate, 0x88E2));
|
|
4289
|
-
|
|
4289
|
+
|
|
4290
4290
|
tmpl->Set(isolate, "STATIC_READ", v8::Integer::NewFromUnsigned(isolate, 0x88E5));
|
|
4291
4291
|
tmpl->Set(isolate, "STATIC_COPY", v8::Integer::NewFromUnsigned(isolate, 0x88E6));
|
|
4292
4292
|
tmpl->Set(isolate, "DYNAMIC_READ", v8::Integer::NewFromUnsigned(isolate, 0x88E9));
|
|
4293
4293
|
tmpl->Set(isolate, "DYNAMIC_COPY", v8::Integer::NewFromUnsigned(isolate, 0x88EA));
|
|
4294
4294
|
tmpl->Set(isolate, "DEPTH_COMPONENT32F", v8::Integer::NewFromUnsigned(isolate, 0x8CAC));
|
|
4295
4295
|
tmpl->Set(isolate, "DEPTH32F_STENCIL8", v8::Integer::NewFromUnsigned(isolate, 0x8CAD));
|
|
4296
|
-
|
|
4296
|
+
|
|
4297
4297
|
/* Data types */
|
|
4298
|
-
|
|
4298
|
+
|
|
4299
4299
|
tmpl->Set(isolate, "INVALID_INDEX", v8::Integer::NewFromUnsigned(isolate, 0xFFFFFFFF));
|
|
4300
4300
|
tmpl->Set(isolate, "TIMEOUT_IGNORED", v8::Int32::New(isolate, -1));
|
|
4301
|
-
|
|
4301
|
+
|
|
4302
4302
|
/* Vertex attributes */
|
|
4303
|
-
|
|
4303
|
+
|
|
4304
4304
|
/* Transform feedback */
|
|
4305
|
-
|
|
4305
|
+
|
|
4306
4306
|
tmpl->Set(isolate, "MAX_CLIENT_WAIT_TIMEOUT_WEBGL",
|
|
4307
4307
|
v8::Integer::NewFromUnsigned(isolate, 0x9247));
|
|
4308
|
-
|
|
4308
|
+
|
|
4309
4309
|
/* Transform feedback */
|
|
4310
|
-
|
|
4310
|
+
|
|
4311
4311
|
}
|
|
4312
4312
|
|
|
4313
4313
|
|
|
4314
4314
|
void WebGL2RenderingContext::SetMethods(v8::Isolate *isolate,
|
|
4315
4315
|
const v8::Local<v8::ObjectTemplate> &tmpl) {
|
|
4316
|
-
|
|
4316
|
+
|
|
4317
4317
|
SetFastMethod(isolate, tmpl, "beginQuery", BeginQuery, &fast_begin_query_,
|
|
4318
4318
|
v8::Local<v8::Value>());
|
|
4319
|
-
|
|
4319
|
+
|
|
4320
4320
|
SetFastMethod(isolate, tmpl, "beginTransformFeedback", BeginTransformFeedback,
|
|
4321
4321
|
&fast_begin_transform_feedback_, v8::Local<v8::Value>());
|
|
4322
|
-
|
|
4322
|
+
|
|
4323
4323
|
SetFastMethod(isolate, tmpl, "bindBufferBase", BindBufferBase, &fast_bind_buffer_base_,
|
|
4324
4324
|
v8::Local<v8::Value>());
|
|
4325
|
-
|
|
4325
|
+
|
|
4326
4326
|
SetFastMethod(isolate, tmpl, "bindBufferRange", BindBufferRange, &fast_bind_buffer_range_,
|
|
4327
4327
|
v8::Local<v8::Value>());
|
|
4328
|
-
|
|
4328
|
+
|
|
4329
4329
|
SetFastMethod(isolate, tmpl, "bindSampler", BindSampler, &fast_bind_sampler_,
|
|
4330
4330
|
v8::Local<v8::Value>());
|
|
4331
|
-
|
|
4331
|
+
|
|
4332
4332
|
SetFastMethod(isolate, tmpl, "bindTransformFeedback", BindTransformFeedback,
|
|
4333
4333
|
&fast_bind_transform_feedback_, v8::Local<v8::Value>());
|
|
4334
|
-
|
|
4335
|
-
|
|
4334
|
+
|
|
4335
|
+
|
|
4336
4336
|
SetFastMethod(isolate, tmpl, "bindVertexArray", BindVertexArray, &fast_bind_vertex_array_,
|
|
4337
4337
|
v8::Local<v8::Value>());
|
|
4338
|
-
|
|
4339
|
-
|
|
4338
|
+
|
|
4339
|
+
|
|
4340
4340
|
SetFastMethod(isolate, tmpl, "blitFramebuffer", BlitFramebuffer, &fast_blit_framebuffer_,
|
|
4341
4341
|
v8::Local<v8::Value>());
|
|
4342
|
-
|
|
4342
|
+
|
|
4343
4343
|
SetFastMethod(isolate, tmpl, "clearBufferfi", ClearBufferfi, &fast_clear_buffer_fi_,
|
|
4344
4344
|
v8::Local<v8::Value>());
|
|
4345
|
-
|
|
4345
|
+
|
|
4346
4346
|
SetFastMethodWithOverLoads(isolate, tmpl, "clearBufferfv", ClearBufferfv,
|
|
4347
4347
|
fast_clear_buffer_fv_overloads_, v8::Local<v8::Value>());
|
|
4348
|
-
|
|
4349
|
-
|
|
4348
|
+
|
|
4349
|
+
|
|
4350
4350
|
SetFastMethodWithOverLoads(isolate, tmpl, "clearBufferiv", ClearBufferiv,
|
|
4351
4351
|
fast_clear_buffer_iv_overloads_, v8::Local<v8::Value>());
|
|
4352
|
-
|
|
4352
|
+
|
|
4353
4353
|
SetFastMethodWithOverLoads(isolate, tmpl, "clearBufferuiv", ClearBufferuiv,
|
|
4354
4354
|
fast_clear_buffer_uiv_overloads_, v8::Local<v8::Value>());
|
|
4355
|
-
|
|
4356
|
-
|
|
4355
|
+
|
|
4356
|
+
|
|
4357
4357
|
tmpl->Set(
|
|
4358
4358
|
ConvertToV8String(isolate, "clientWaitSync"),
|
|
4359
4359
|
v8::FunctionTemplate::New(isolate, &ClientWaitSync)
|
|
4360
4360
|
);
|
|
4361
|
-
|
|
4361
|
+
|
|
4362
4362
|
tmpl->Set(
|
|
4363
4363
|
ConvertToV8String(isolate, "compressedTexSubImage3D"),
|
|
4364
4364
|
v8::FunctionTemplate::New(isolate, &CompressedTexSubImage3D)
|
|
4365
4365
|
);
|
|
4366
|
-
|
|
4366
|
+
|
|
4367
4367
|
SetFastMethod(isolate, tmpl, "copyBufferSubData", CopyBufferSubData,
|
|
4368
4368
|
&fast_copy_buffer_sub_data_, v8::Local<v8::Value>());
|
|
4369
|
-
|
|
4370
|
-
|
|
4369
|
+
|
|
4370
|
+
|
|
4371
4371
|
SetFastMethod(isolate, tmpl, "copyTexSubImage3D", CopyTexSubImage3D,
|
|
4372
4372
|
&fast_copy_tex_sub_image_3d_, v8::Local<v8::Value>());
|
|
4373
|
-
|
|
4374
|
-
|
|
4373
|
+
|
|
4374
|
+
|
|
4375
4375
|
tmpl->Set(
|
|
4376
4376
|
ConvertToV8String(isolate, "createQuery"),
|
|
4377
4377
|
v8::FunctionTemplate::New(isolate, &CreateQuery)
|
|
4378
4378
|
);
|
|
4379
|
-
|
|
4379
|
+
|
|
4380
4380
|
tmpl->Set(
|
|
4381
4381
|
ConvertToV8String(isolate, "createSampler"),
|
|
4382
4382
|
v8::FunctionTemplate::New(isolate, &CreateSampler)
|
|
4383
4383
|
);
|
|
4384
|
-
|
|
4384
|
+
|
|
4385
4385
|
tmpl->Set(
|
|
4386
4386
|
ConvertToV8String(isolate, "createTransformFeedback"),
|
|
4387
4387
|
v8::FunctionTemplate::New(isolate, &CreateTransformFeedback)
|
|
4388
4388
|
);
|
|
4389
|
-
|
|
4389
|
+
|
|
4390
4390
|
tmpl->Set(
|
|
4391
4391
|
ConvertToV8String(isolate, "createVertexArray"),
|
|
4392
4392
|
v8::FunctionTemplate::New(isolate, &CreateVertexArray)
|
|
4393
4393
|
);
|
|
4394
|
-
|
|
4395
|
-
|
|
4394
|
+
|
|
4395
|
+
|
|
4396
4396
|
SetFastMethod(isolate, tmpl, "deleteQuery", DeleteQuery,
|
|
4397
4397
|
&fast_delete_query_, v8::Local<v8::Value>());
|
|
4398
|
-
|
|
4398
|
+
|
|
4399
4399
|
SetFastMethod(isolate, tmpl, "deleteSampler", DeleteSampler,
|
|
4400
4400
|
&fast_delete_sampler_, v8::Local<v8::Value>());
|
|
4401
|
-
|
|
4401
|
+
|
|
4402
4402
|
SetFastMethod(isolate, tmpl, "deleteSync", DeleteSync,
|
|
4403
4403
|
&fast_delete_sync_, v8::Local<v8::Value>());
|
|
4404
|
-
|
|
4404
|
+
|
|
4405
4405
|
SetFastMethod(isolate, tmpl, "deleteTransformFeedback", DeleteTransformFeedback,
|
|
4406
4406
|
&fast_delete_transform_feedback_, v8::Local<v8::Value>());
|
|
4407
|
-
|
|
4407
|
+
|
|
4408
4408
|
SetFastMethod(isolate, tmpl, "deleteVertexArray", DeleteVertexArray,
|
|
4409
4409
|
&fast_delete_vertex_array_, v8::Local<v8::Value>());
|
|
4410
|
-
|
|
4410
|
+
|
|
4411
4411
|
SetFastMethod(isolate, tmpl, "drawArraysInstanced", DrawArraysInstanced,
|
|
4412
4412
|
&fast_draw_arrays_instanced_, v8::Local<v8::Value>());
|
|
4413
|
-
|
|
4413
|
+
|
|
4414
4414
|
SetFastMethod(isolate, tmpl, "drawBuffers", DrawBuffers, &fast_draw_buffers_,
|
|
4415
4415
|
v8::Local<v8::Value>());
|
|
4416
|
-
|
|
4416
|
+
|
|
4417
4417
|
SetFastMethod(isolate, tmpl, "drawElementsInstanced", DrawElementsInstanced,
|
|
4418
4418
|
&fast_draw_elements_instanced_, v8::Local<v8::Value>());
|
|
4419
|
-
|
|
4420
|
-
|
|
4419
|
+
|
|
4420
|
+
|
|
4421
4421
|
SetFastMethod(isolate, tmpl, "drawRangeElements", DrawRangeElements, &fast_draw_range_elements_,
|
|
4422
4422
|
v8::Local<v8::Value>());
|
|
4423
|
-
|
|
4424
|
-
|
|
4423
|
+
|
|
4424
|
+
|
|
4425
4425
|
SetFastMethod(isolate, tmpl, "endQuery", EndQuery, &fast_end_query_,
|
|
4426
4426
|
v8::Local<v8::Value>());
|
|
4427
|
-
|
|
4427
|
+
|
|
4428
4428
|
SetFastMethod(isolate, tmpl, "endTransformFeedback", EndTransformFeedback, &fast_end_transform_feedback_,
|
|
4429
4429
|
v8::Local<v8::Value>());
|
|
4430
|
-
|
|
4431
|
-
|
|
4430
|
+
|
|
4431
|
+
|
|
4432
4432
|
tmpl->Set(
|
|
4433
4433
|
ConvertToV8String(isolate, "fenceSync"),
|
|
4434
4434
|
v8::FunctionTemplate::New(isolate, &FenceSync)
|
|
4435
4435
|
);
|
|
4436
|
-
|
|
4437
|
-
|
|
4436
|
+
|
|
4437
|
+
|
|
4438
4438
|
SetFastMethod(isolate, tmpl, "framebufferTextureLayer", FramebufferTextureLayer, &fast_framebuffer_texture_layer_,
|
|
4439
4439
|
v8::Local<v8::Value>());
|
|
4440
|
-
|
|
4440
|
+
|
|
4441
4441
|
SetFastMethod(isolate, tmpl, "uniform1ui", Uniform1ui, &fast_uniform_1ui_,
|
|
4442
4442
|
v8::Local<v8::Value>());
|
|
4443
|
-
|
|
4443
|
+
|
|
4444
4444
|
SetFastMethod(isolate, tmpl, "uniform1uiv", Uniform1uiv, &fast_uniform_1uiv_,
|
|
4445
4445
|
v8::Local<v8::Value>());
|
|
4446
|
-
|
|
4446
|
+
|
|
4447
4447
|
SetFastMethod(isolate, tmpl, "uniform2ui", Uniform2ui, &fast_uniform_2ui_,
|
|
4448
4448
|
v8::Local<v8::Value>());
|
|
4449
|
-
|
|
4449
|
+
|
|
4450
4450
|
SetFastMethod(isolate, tmpl, "uniform2uiv", Uniform2uiv, &fast_uniform_2uiv_,
|
|
4451
4451
|
v8::Local<v8::Value>());
|
|
4452
|
-
|
|
4452
|
+
|
|
4453
4453
|
SetFastMethod(isolate, tmpl, "uniform3ui", Uniform3ui, &fast_uniform_3ui_,
|
|
4454
4454
|
v8::Local<v8::Value>());
|
|
4455
|
-
|
|
4455
|
+
|
|
4456
4456
|
SetFastMethod(isolate, tmpl, "uniform3uiv", Uniform3uiv, &fast_uniform_3uiv_,
|
|
4457
4457
|
v8::Local<v8::Value>());
|
|
4458
|
-
|
|
4458
|
+
|
|
4459
4459
|
SetFastMethod(isolate, tmpl, "uniform4ui", Uniform4ui, &fast_uniform_4ui_,
|
|
4460
4460
|
v8::Local<v8::Value>());
|
|
4461
|
-
|
|
4461
|
+
|
|
4462
4462
|
SetFastMethod(isolate, tmpl, "uniform4uiv", Uniform4uiv, &fast_uniform_4uiv_,
|
|
4463
4463
|
v8::Local<v8::Value>());
|
|
4464
|
-
|
|
4464
|
+
|
|
4465
4465
|
SetFastMethod(isolate, tmpl, "uniformBlockBinding", UniformBlockBinding,
|
|
4466
4466
|
&fast_uniform_block_binding_, v8::Local<v8::Value>());
|
|
4467
|
-
|
|
4468
|
-
|
|
4467
|
+
|
|
4468
|
+
|
|
4469
4469
|
SetFastMethodWithOverLoads(isolate, tmpl, "uniformMatrix2x3fv", UniformMatrix2x3fv,
|
|
4470
4470
|
fast_uniform_matrix_2x3fv_overloads_, v8::Local<v8::Value>());
|
|
4471
|
-
|
|
4472
|
-
|
|
4471
|
+
|
|
4472
|
+
|
|
4473
4473
|
SetFastMethodWithOverLoads(isolate, tmpl, "uniformMatrix2x4fv", UniformMatrix2x4fv,
|
|
4474
4474
|
fast_uniform_matrix_2x4fv_overloads_, v8::Local<v8::Value>());
|
|
4475
|
-
|
|
4476
|
-
|
|
4475
|
+
|
|
4476
|
+
|
|
4477
4477
|
SetFastMethodWithOverLoads(isolate, tmpl, "uniformMatrix3x2fv", UniformMatrix3x2fv,
|
|
4478
4478
|
fast_uniform_matrix_3x2fv_overloads_, v8::Local<v8::Value>());
|
|
4479
|
-
|
|
4479
|
+
|
|
4480
4480
|
SetFastMethodWithOverLoads(isolate, tmpl, "uniformMatrix3x4fv", UniformMatrix3x4fv,
|
|
4481
4481
|
fast_uniform_matrix_3x4fv_overloads_, v8::Local<v8::Value>());
|
|
4482
|
-
|
|
4483
|
-
|
|
4482
|
+
|
|
4483
|
+
|
|
4484
4484
|
SetFastMethodWithOverLoads(isolate, tmpl, "uniformMatrix4x2fv", UniformMatrix4x2fv,
|
|
4485
4485
|
fast_uniform_matrix_4x2fv_overloads_, v8::Local<v8::Value>());
|
|
4486
|
-
|
|
4487
|
-
|
|
4486
|
+
|
|
4487
|
+
|
|
4488
4488
|
SetFastMethodWithOverLoads(isolate, tmpl, "uniformMatrix4x3fv", UniformMatrix4x3fv,
|
|
4489
4489
|
fast_uniform_matrix_4x3fv_overloads_, v8::Local<v8::Value>());
|
|
4490
|
-
|
|
4491
|
-
|
|
4490
|
+
|
|
4491
|
+
|
|
4492
4492
|
SetFastMethod(isolate, tmpl, "vertexAttribDivisor", VertexAttribDivisor,
|
|
4493
4493
|
&fast_vertex_attrib_divisor_, v8::Local<v8::Value>());
|
|
4494
|
-
|
|
4495
|
-
|
|
4494
|
+
|
|
4495
|
+
|
|
4496
4496
|
SetFastMethod(isolate, tmpl, "vertexAttribI4i", VertexAttribI4i, &fast_vertex_attrib_i_4i_,
|
|
4497
4497
|
v8::Local<v8::Value>());
|
|
4498
|
-
|
|
4498
|
+
|
|
4499
4499
|
SetFastMethodWithOverLoads(isolate, tmpl, "vertexAttribI4iv", VertexAttribI4iv,
|
|
4500
4500
|
fast_vertex_attrib_i_4iv_overloads_, v8::Local<v8::Value>());
|
|
4501
|
-
|
|
4502
|
-
|
|
4501
|
+
|
|
4502
|
+
|
|
4503
4503
|
SetFastMethod(isolate, tmpl, "vertexAttribI4ui", VertexAttribI4ui, &fast_vertex_attrib_i_4ui_,
|
|
4504
4504
|
v8::Local<v8::Value>());
|
|
4505
|
-
|
|
4506
|
-
|
|
4505
|
+
|
|
4506
|
+
|
|
4507
4507
|
SetFastMethodWithOverLoads(isolate, tmpl, "vertexAttribI4uiv", VertexAttribI4uiv,
|
|
4508
4508
|
fast_vertex_attrib_i_4uiv_overloads_, v8::Local<v8::Value>());
|
|
4509
|
-
|
|
4510
|
-
|
|
4509
|
+
|
|
4510
|
+
|
|
4511
4511
|
tmpl->Set(
|
|
4512
4512
|
ConvertToV8String(isolate, "getActiveUniformBlockName"),
|
|
4513
4513
|
v8::FunctionTemplate::New(isolate, &GetActiveUniformBlockName)
|
|
4514
4514
|
);
|
|
4515
|
-
|
|
4515
|
+
|
|
4516
4516
|
tmpl->Set(
|
|
4517
4517
|
ConvertToV8String(isolate, "getActiveUniformBlockParameter"),
|
|
4518
4518
|
v8::FunctionTemplate::New(isolate, &GetActiveUniformBlockParameter)
|
|
4519
4519
|
);
|
|
4520
|
-
|
|
4520
|
+
|
|
4521
4521
|
tmpl->Set(
|
|
4522
4522
|
ConvertToV8String(isolate, "getActiveUniforms"),
|
|
4523
4523
|
v8::FunctionTemplate::New(isolate, &GetActiveUniforms)
|
|
4524
4524
|
);
|
|
4525
|
-
|
|
4525
|
+
|
|
4526
4526
|
tmpl->Set(
|
|
4527
4527
|
ConvertToV8String(isolate, "getBufferSubData"),
|
|
4528
4528
|
v8::FunctionTemplate::New(isolate, &GetBufferSubData)
|
|
4529
4529
|
);
|
|
4530
|
-
|
|
4531
|
-
|
|
4530
|
+
|
|
4531
|
+
|
|
4532
4532
|
tmpl->Set(
|
|
4533
4533
|
ConvertToV8String(isolate, "getFragDataLocation"),
|
|
4534
4534
|
v8::FunctionTemplate::New(isolate, &GetFragDataLocation)
|
|
4535
4535
|
);
|
|
4536
|
-
|
|
4537
|
-
|
|
4536
|
+
|
|
4537
|
+
|
|
4538
4538
|
tmpl->Set(
|
|
4539
4539
|
ConvertToV8String(isolate, "getIndexedParameter"),
|
|
4540
4540
|
v8::FunctionTemplate::New(isolate, &GetIndexedParameter)
|
|
4541
4541
|
);
|
|
4542
|
-
|
|
4542
|
+
|
|
4543
4543
|
tmpl->Set(
|
|
4544
4544
|
ConvertToV8String(isolate, "getInternalformatParameter"),
|
|
4545
4545
|
v8::FunctionTemplate::New(isolate, &GetInternalformatParameter)
|
|
4546
4546
|
);
|
|
4547
|
-
|
|
4547
|
+
|
|
4548
4548
|
tmpl->Set(
|
|
4549
4549
|
ConvertToV8String(isolate, "getParameter"),
|
|
4550
4550
|
v8::FunctionTemplate::New(isolate, &GetParameter)
|
|
4551
4551
|
);
|
|
4552
|
-
|
|
4552
|
+
|
|
4553
4553
|
tmpl->Set(
|
|
4554
4554
|
ConvertToV8String(isolate, "getQueryParameter"),
|
|
4555
4555
|
v8::FunctionTemplate::New(isolate, &GetQueryParameter)
|
|
4556
4556
|
);
|
|
4557
|
-
|
|
4558
|
-
|
|
4557
|
+
|
|
4558
|
+
|
|
4559
4559
|
tmpl->Set(
|
|
4560
4560
|
ConvertToV8String(isolate, "getQuery"),
|
|
4561
4561
|
v8::FunctionTemplate::New(isolate, &GetQuery)
|
|
4562
4562
|
);
|
|
4563
|
-
|
|
4563
|
+
|
|
4564
4564
|
tmpl->Set(
|
|
4565
4565
|
ConvertToV8String(isolate, "getSamplerParameter"),
|
|
4566
4566
|
v8::FunctionTemplate::New(isolate, &GetSamplerParameter)
|
|
4567
4567
|
);
|
|
4568
|
-
|
|
4568
|
+
|
|
4569
4569
|
tmpl->Set(
|
|
4570
4570
|
ConvertToV8String(isolate, "getSyncParameter"),
|
|
4571
4571
|
v8::FunctionTemplate::New(isolate, &GetSyncParameter)
|
|
4572
4572
|
);
|
|
4573
|
-
|
|
4573
|
+
|
|
4574
4574
|
tmpl->Set(
|
|
4575
4575
|
ConvertToV8String(isolate, "getTransformFeedbackVarying"),
|
|
4576
4576
|
v8::FunctionTemplate::New(isolate, &GetTransformFeedbackVarying)
|
|
4577
4577
|
);
|
|
4578
|
-
|
|
4578
|
+
|
|
4579
4579
|
tmpl->Set(
|
|
4580
4580
|
ConvertToV8String(isolate, "getUniformBlockIndex"),
|
|
4581
4581
|
v8::FunctionTemplate::New(isolate, &GetUniformBlockIndex)
|
|
4582
4582
|
);
|
|
4583
|
-
|
|
4583
|
+
|
|
4584
4584
|
tmpl->Set(
|
|
4585
4585
|
ConvertToV8String(isolate, "getUniformIndices"),
|
|
4586
4586
|
v8::FunctionTemplate::New(isolate, &GetUniformIndices)
|
|
4587
4587
|
);
|
|
4588
|
-
|
|
4588
|
+
|
|
4589
4589
|
SetFastMethod(isolate, tmpl, "invalidateFramebuffer", InvalidateFramebuffer,
|
|
4590
4590
|
&fast_invalidate_framebuffer_, v8::Local<v8::Value>());
|
|
4591
|
-
|
|
4592
|
-
|
|
4591
|
+
|
|
4592
|
+
|
|
4593
4593
|
SetFastMethod(isolate, tmpl, "invalidateSubFramebuffer", InvalidateSubFramebuffer,
|
|
4594
4594
|
&fast_invalidate_sub_framebuffer_, v8::Local<v8::Value>());
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4595
|
+
|
|
4596
|
+
|
|
4597
|
+
|
|
4598
4598
|
SetFastMethod(isolate, tmpl, "isQuery", IsQuery,
|
|
4599
4599
|
&fast_is_query_, v8::Local<v8::Value>());
|
|
4600
|
-
|
|
4601
|
-
|
|
4600
|
+
|
|
4601
|
+
|
|
4602
4602
|
SetFastMethod(isolate, tmpl, "isSampler", IsSampler,
|
|
4603
4603
|
&fast_is_sampler_, v8::Local<v8::Value>());
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4604
|
+
|
|
4605
|
+
|
|
4606
|
+
|
|
4607
4607
|
SetFastMethod(isolate, tmpl, "isSync", IsSync,
|
|
4608
4608
|
&fast_is_sync_, v8::Local<v8::Value>());
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4609
|
+
|
|
4610
|
+
|
|
4611
|
+
|
|
4612
4612
|
SetFastMethod(isolate, tmpl, "isTransformFeedback", IsTransformFeedback,
|
|
4613
4613
|
&fast_is_transform_feedback_, v8::Local<v8::Value>());
|
|
4614
|
-
|
|
4614
|
+
|
|
4615
4615
|
SetFastMethod(isolate, tmpl, "isVertexArray", IsVertexArray,
|
|
4616
4616
|
&fast_is_vertex_array_, v8::Local<v8::Value>());
|
|
4617
|
-
|
|
4618
|
-
|
|
4617
|
+
|
|
4618
|
+
|
|
4619
4619
|
SetFastMethod(isolate, tmpl, "pauseTransformFeedback", PauseTransformFeedback,
|
|
4620
4620
|
&fast_pause_transform_feedback_, v8::Local<v8::Value>());
|
|
4621
|
-
|
|
4622
|
-
|
|
4621
|
+
|
|
4622
|
+
|
|
4623
4623
|
SetFastMethod(isolate, tmpl, "readBuffer", ReadBuffer,
|
|
4624
4624
|
&fast_read_buffer_, v8::Local<v8::Value>());
|
|
4625
|
-
|
|
4626
|
-
|
|
4625
|
+
|
|
4626
|
+
|
|
4627
4627
|
SetFastMethod(isolate, tmpl, "renderbufferStorageMultisample", RenderbufferStorageMultisample,
|
|
4628
4628
|
&fast_renderbuffer_storage_multisample_, v8::Local<v8::Value>());
|
|
4629
|
-
|
|
4630
|
-
|
|
4629
|
+
|
|
4630
|
+
|
|
4631
4631
|
SetFastMethod(isolate, tmpl, "resumeTransformFeedback", ResumeTransformFeedback,
|
|
4632
4632
|
&fast_resume_transform_feedback_, v8::Local<v8::Value>());
|
|
4633
|
-
|
|
4633
|
+
|
|
4634
4634
|
SetFastMethod(isolate, tmpl, "samplerParameterf", SamplerParameterf, &fast_sampler_parameterf_,
|
|
4635
4635
|
v8::Local<v8::Value>());
|
|
4636
|
-
|
|
4636
|
+
|
|
4637
4637
|
SetFastMethod(isolate, tmpl, "samplerParameteri", SamplerParameteri, &fast_sampler_parameteri_,
|
|
4638
4638
|
v8::Local<v8::Value>());
|
|
4639
|
-
|
|
4640
|
-
|
|
4639
|
+
|
|
4640
|
+
|
|
4641
4641
|
tmpl->Set(
|
|
4642
4642
|
ConvertToV8String(isolate, "texImage3D"),
|
|
4643
4643
|
v8::FunctionTemplate::New(isolate, &TexImage3D)
|
|
4644
4644
|
);
|
|
4645
|
-
|
|
4646
|
-
|
|
4645
|
+
|
|
4646
|
+
|
|
4647
4647
|
tmpl->Set(
|
|
4648
4648
|
ConvertToV8String(isolate, "texStorage2D"),
|
|
4649
4649
|
v8::FunctionTemplate::New(isolate, &TexStorage2D)
|
|
4650
4650
|
);
|
|
4651
|
-
|
|
4651
|
+
|
|
4652
4652
|
tmpl->Set(
|
|
4653
4653
|
ConvertToV8String(isolate, "texStorage3D"),
|
|
4654
4654
|
v8::FunctionTemplate::New(isolate, &TexStorage3D)
|
|
4655
4655
|
);
|
|
4656
|
-
|
|
4656
|
+
|
|
4657
4657
|
tmpl->Set(
|
|
4658
4658
|
ConvertToV8String(isolate, "texSubImage3D"),
|
|
4659
4659
|
v8::FunctionTemplate::New(isolate, &TexSubImage3D)
|
|
4660
4660
|
);
|
|
4661
|
-
|
|
4661
|
+
|
|
4662
4662
|
tmpl->Set(
|
|
4663
4663
|
ConvertToV8String(isolate, "transformFeedbackVaryings"),
|
|
4664
4664
|
v8::FunctionTemplate::New(isolate, &TransformFeedbackVaryings)
|
|
@@ -4667,5 +4667,5 @@ void WebGL2RenderingContext::SetMethods(v8::Isolate *isolate,
|
|
|
4667
4667
|
|
|
4668
4668
|
void WebGL2RenderingContext::SetProps(v8::Isolate *isolate,
|
|
4669
4669
|
const v8::Local<v8::ObjectTemplate> &webgl2RenderingContextTpl) {
|
|
4670
|
-
|
|
4670
|
+
|
|
4671
4671
|
}
|