@nativescript/canvas 2.0.0-beta.9 → 2.0.0-rc.1
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 +16 -24
- package/Canvas/common.js +149 -203
- package/Canvas/common.js.map +1 -1
- package/Canvas/index.android.d.ts +13 -15
- package/Canvas/index.android.js +152 -151
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.d.ts +23 -11
- package/Canvas/index.ios.d.ts +14 -6
- package/Canvas/index.ios.js +213 -124
- package/Canvas/index.ios.js.map +1 -1
- package/Canvas/utils.d.ts +3 -0
- package/Canvas/utils.js +85 -0
- package/Canvas/utils.js.map +1 -0
- package/Canvas2D/CanvasRenderingContext2D/index.d.ts +4 -2
- package/Canvas2D/CanvasRenderingContext2D/index.js +79 -85
- package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
- package/Canvas2D/DOMMatrix/index.d.ts +14 -0
- package/Canvas2D/DOMMatrix/index.js +62 -0
- package/Canvas2D/DOMMatrix/index.js.map +1 -1
- package/Canvas2D/ImageData/index.js +4 -6
- 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.d.ts +1 -2
- package/Dom/Group.js.map +1 -1
- package/Dom/Image.d.ts +4 -1
- package/Dom/Image.js +15 -2
- package/Dom/Image.js.map +1 -1
- package/Dom/Paint.d.ts +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.d.ts +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/Fonts/FontFace.android.d.ts +46 -0
- package/Fonts/FontFace.android.js +197 -0
- package/Fonts/FontFace.android.js.map +1 -0
- package/Fonts/FontFace.ios.d.ts +45 -0
- package/Fonts/FontFace.ios.js +169 -0
- package/Fonts/FontFace.ios.js.map +1 -0
- package/Fonts/FontFaceSet.android.d.ts +31 -0
- package/Fonts/FontFaceSet.android.js +119 -0
- package/Fonts/FontFaceSet.android.js.map +1 -0
- package/Fonts/FontFaceSet.ios.d.ts +31 -0
- package/Fonts/FontFaceSet.ios.js +109 -0
- package/Fonts/FontFaceSet.ios.js.map +1 -0
- package/Fonts/index.d.ts +2 -0
- package/Fonts/index.js +3 -0
- package/Fonts/index.js.map +1 -0
- package/ImageAsset/index.d.ts +8 -3
- package/ImageAsset/index.js +206 -11
- package/ImageAsset/index.js.map +1 -1
- package/ImageBitmap/index.js +110 -23
- package/ImageBitmap/index.js.map +1 -1
- package/README.md +62 -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.d.ts +1 -1
- package/WebGL/WebGLRenderingContext/common.js.map +1 -1
- package/WebGL/WebGLRenderingContext/index.d.ts +1 -0
- package/WebGL/WebGLRenderingContext/index.js +144 -46
- package/WebGL/WebGLRenderingContext/index.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/index.d.ts +1 -0
- package/WebGL2/WebGL2RenderingContext/index.js +7 -8
- package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
- package/WebGPU/Constants.d.ts +36 -0
- package/WebGPU/Constants.js +42 -0
- package/WebGPU/Constants.js.map +1 -0
- package/WebGPU/Errors.d.ts +18 -0
- package/WebGPU/Errors.js +21 -0
- package/WebGPU/Errors.js.map +1 -0
- package/WebGPU/GPU.d.ts +13 -0
- package/WebGPU/GPU.js +36 -0
- package/WebGPU/GPU.js.map +1 -0
- package/WebGPU/GPUAdapter.d.ts +26 -0
- package/WebGPU/GPUAdapter.js +93 -0
- package/WebGPU/GPUAdapter.js.map +1 -0
- package/WebGPU/GPUAdapterInfo.d.ts +9 -0
- package/WebGPU/GPUAdapterInfo.js +24 -0
- package/WebGPU/GPUAdapterInfo.js.map +1 -0
- package/WebGPU/GPUBindGroup.d.ts +6 -0
- package/WebGPU/GPUBindGroup.js +15 -0
- package/WebGPU/GPUBindGroup.js.map +1 -0
- package/WebGPU/GPUBindGroupLayout.d.ts +6 -0
- package/WebGPU/GPUBindGroupLayout.js +15 -0
- package/WebGPU/GPUBindGroupLayout.js.map +1 -0
- package/WebGPU/GPUBuffer.d.ts +15 -0
- package/WebGPU/GPUBuffer.js +66 -0
- package/WebGPU/GPUBuffer.js.map +1 -0
- package/WebGPU/GPUCanvasContext.d.ts +42 -0
- package/WebGPU/GPUCanvasContext.js +149 -0
- package/WebGPU/GPUCanvasContext.js.map +1 -0
- package/WebGPU/GPUCommandBuffer.d.ts +6 -0
- package/WebGPU/GPUCommandBuffer.js +15 -0
- package/WebGPU/GPUCommandBuffer.js.map +1 -0
- package/WebGPU/GPUCommandEncoder.d.ts +35 -0
- package/WebGPU/GPUCommandEncoder.js +163 -0
- package/WebGPU/GPUCommandEncoder.js.map +1 -0
- package/WebGPU/GPUComputePassEncoder.d.ts +17 -0
- package/WebGPU/GPUComputePassEncoder.js +53 -0
- package/WebGPU/GPUComputePassEncoder.js.map +1 -0
- package/WebGPU/GPUComputePipeline.d.ts +8 -0
- package/WebGPU/GPUComputePipeline.js +19 -0
- package/WebGPU/GPUComputePipeline.js.map +1 -0
- package/WebGPU/GPUDevice.d.ts +111 -0
- package/WebGPU/GPUDevice.js +341 -0
- package/WebGPU/GPUDevice.js.map +1 -0
- package/WebGPU/GPUDeviceLostInfo.d.ts +1 -0
- package/WebGPU/GPUDeviceLostInfo.js +10 -0
- package/WebGPU/GPUDeviceLostInfo.js.map +1 -0
- package/WebGPU/GPUExternalTexture.d.ts +6 -0
- package/WebGPU/GPUExternalTexture.js +15 -0
- package/WebGPU/GPUExternalTexture.js.map +1 -0
- package/WebGPU/GPUPipelineLayout.d.ts +6 -0
- package/WebGPU/GPUPipelineLayout.js +15 -0
- package/WebGPU/GPUPipelineLayout.js.map +1 -0
- package/WebGPU/GPUQuerySet.d.ts +6 -0
- package/WebGPU/GPUQuerySet.js +15 -0
- package/WebGPU/GPUQuerySet.js.map +1 -0
- package/WebGPU/GPUQueue.d.ts +15 -0
- package/WebGPU/GPUQueue.js +128 -0
- package/WebGPU/GPUQueue.js.map +1 -0
- package/WebGPU/GPURenderBundle.d.ts +6 -0
- package/WebGPU/GPURenderBundle.js +15 -0
- package/WebGPU/GPURenderBundle.js.map +1 -0
- package/WebGPU/GPURenderBundleEncoder.d.ts +22 -0
- package/WebGPU/GPURenderBundleEncoder.js +65 -0
- package/WebGPU/GPURenderBundleEncoder.js.map +1 -0
- package/WebGPU/GPURenderPassEncoder.d.ts +33 -0
- package/WebGPU/GPURenderPassEncoder.js +106 -0
- package/WebGPU/GPURenderPassEncoder.js.map +1 -0
- package/WebGPU/GPURenderPipeline.d.ts +8 -0
- package/WebGPU/GPURenderPipeline.js +19 -0
- package/WebGPU/GPURenderPipeline.js.map +1 -0
- package/WebGPU/GPUSampler.d.ts +6 -0
- package/WebGPU/GPUSampler.js +15 -0
- package/WebGPU/GPUSampler.js.map +1 -0
- package/WebGPU/GPUShaderModule.d.ts +6 -0
- package/WebGPU/GPUShaderModule.js +15 -0
- package/WebGPU/GPUShaderModule.js.map +1 -0
- package/WebGPU/GPUTexture.d.ts +18 -0
- package/WebGPU/GPUTexture.js +47 -0
- package/WebGPU/GPUTexture.js.map +1 -0
- package/WebGPU/GPUTextureView.d.ts +6 -0
- package/WebGPU/GPUTextureView.js +15 -0
- package/WebGPU/GPUTextureView.js.map +1 -0
- package/WebGPU/Interfaces.d.ts +246 -0
- package/WebGPU/Interfaces.js +2 -0
- package/WebGPU/Interfaces.js.map +1 -0
- package/WebGPU/Types.d.ts +47 -0
- package/WebGPU/Types.js +2 -0
- package/WebGPU/Types.js.map +1 -0
- package/WebGPU/Utils.d.ts +7 -0
- package/WebGPU/Utils.js +301 -0
- package/WebGPU/Utils.js.map +1 -0
- package/WebGPU/index.d.ts +28 -0
- package/WebGPU/index.js +29 -0
- package/WebGPU/index.js.map +1 -0
- package/angular/{esm2020 → esm2022}/index.mjs +5 -5
- package/angular/{fesm2015 → fesm2022}/nativescript-canvas-angular.mjs +4 -4
- package/angular/{fesm2015 → fesm2022}/nativescript-canvas-angular.mjs.map +1 -1
- package/angular/package.json +4 -10
- package/common.d.ts +0 -3
- package/common.js +1 -5
- package/common.js.map +1 -1
- package/helpers.js.map +1 -1
- package/index.d.ts +4 -2
- package/index.js +37 -3
- package/index.js.map +1 -1
- package/package.json +2 -5
- 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 +194 -56
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative.h +1 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/NSCMTLView.h +32 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +152 -151
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +2901 -411
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist +0 -0
- 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 +10901 -8099
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +259 -52
- 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 +259 -52
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Black.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Bold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-ExtraBold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-ExtraLight.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Light.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Medium.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Regular.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-SemiBold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoMath-Regular.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Bold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-BoldItalic.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Italic.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Medium.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-MediumItalic.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Regular.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-SemiBold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-SemiBoldItalic.ttf +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 +994 -663
- 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 +388 -112
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative.h +1 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/NSCMTLView.h +32 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +152 -151
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +2901 -411
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist +0 -0
- 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 +10901 -8099
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +259 -52
- 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 +259 -52
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +10901 -8099
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +259 -52
- 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 +259 -52
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +143 -33
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Black.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Bold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-ExtraBold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-ExtraLight.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Light.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Medium.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Regular.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-SemiBold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoMath-Regular.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Bold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-BoldItalic.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Italic.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Medium.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-MediumItalic.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Regular.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-SemiBold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-SemiBoldItalic.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +993 -662
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +1037 -641
- package/platforms/ios/build.xcconfig +3 -1
- package/platforms/ios/src/NSOperationQueueWrapper.h +3 -1
- package/platforms/ios/src/NSOperationQueueWrapper.mm +41 -9
- package/platforms/ios/src/cpp/AsyncCallback.h +214 -0
- package/platforms/ios/src/cpp/Caches.h +69 -1
- package/platforms/ios/src/cpp/CanvasJSIModule.cpp +647 -1166
- package/platforms/ios/src/cpp/CanvasJSIModule.h +11 -1
- package/platforms/ios/src/cpp/Helpers.h +2 -129
- package/platforms/ios/src/cpp/ImageAssetImpl.cpp +600 -437
- package/platforms/ios/src/cpp/ImageAssetImpl.h +18 -10
- package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +63 -6
- package/platforms/ios/src/cpp/ImageBitmapImpl.h +12 -4
- 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 +197 -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 -11
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.h +3 -3
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +193 -90
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +77 -23
- 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 +409 -3
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.h +29 -2
- package/platforms/ios/src/cpp/canvas2d/Path2D.cpp +6 -3
- package/platforms/ios/src/cpp/canvas2d/Path2D.h +7 -7
- 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 +247 -160
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.h +1 -1
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.cpp +6 -6
- 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 +1067 -960
- 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 +371 -0
- package/platforms/ios/src/cpp/webgpu/GPUAdapterImpl.h +63 -0
- package/platforms/ios/src/cpp/webgpu/GPUAdapterInfoImpl.cpp +174 -0
- package/platforms/ios/src/cpp/webgpu/GPUAdapterInfoImpl.h +58 -0
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupImpl.cpp +79 -0
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupImpl.h +48 -0
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupLayoutImpl.cpp +79 -0
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupLayoutImpl.h +48 -0
- package/platforms/ios/src/cpp/webgpu/GPUBufferImpl.cpp +277 -0
- package/platforms/ios/src/cpp/webgpu/GPUBufferImpl.h +63 -0
- package/platforms/ios/src/cpp/webgpu/GPUCanvasContextImpl.cpp +379 -0
- package/platforms/ios/src/cpp/webgpu/GPUCanvasContextImpl.h +57 -0
- package/platforms/ios/src/cpp/webgpu/GPUCommandBufferImpl.cpp +81 -0
- package/platforms/ios/src/cpp/webgpu/GPUCommandBufferImpl.h +48 -0
- package/platforms/ios/src/cpp/webgpu/GPUCommandEncoderImpl.cpp +1217 -0
- package/platforms/ios/src/cpp/webgpu/GPUCommandEncoderImpl.h +73 -0
- package/platforms/ios/src/cpp/webgpu/GPUComputePassEncoderImpl.cpp +293 -0
- package/platforms/ios/src/cpp/webgpu/GPUComputePassEncoderImpl.h +65 -0
- package/platforms/ios/src/cpp/webgpu/GPUComputePipelineImpl.cpp +109 -0
- package/platforms/ios/src/cpp/webgpu/GPUComputePipelineImpl.h +51 -0
- package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.cpp +3701 -0
- package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.h +97 -0
- package/platforms/ios/src/cpp/webgpu/GPUImpl.cpp +200 -0
- package/platforms/ios/src/cpp/webgpu/GPUImpl.h +55 -0
- package/platforms/ios/src/cpp/webgpu/GPULabel.h +33 -0
- package/platforms/ios/src/cpp/webgpu/GPUPipelineLayoutImpl.cpp +80 -0
- package/platforms/ios/src/cpp/webgpu/GPUPipelineLayoutImpl.h +49 -0
- package/platforms/ios/src/cpp/webgpu/GPUQuerySetImpl.cpp +136 -0
- package/platforms/ios/src/cpp/webgpu/GPUQuerySetImpl.h +55 -0
- package/platforms/ios/src/cpp/webgpu/GPUQueueImpl.cpp +605 -0
- package/platforms/ios/src/cpp/webgpu/GPUQueueImpl.h +59 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleEncoderImpl.cpp +501 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleEncoderImpl.h +74 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleImpl.cpp +78 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleImpl.h +48 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderPassEncoderImpl.cpp +723 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderPassEncoderImpl.h +92 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderPipelineImpl.cpp +109 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderPipelineImpl.h +52 -0
- package/platforms/ios/src/cpp/webgpu/GPUSamplerImpl.cpp +79 -0
- package/platforms/ios/src/cpp/webgpu/GPUSamplerImpl.h +48 -0
- package/platforms/ios/src/cpp/webgpu/GPUShaderModuleImpl.cpp +80 -0
- package/platforms/ios/src/cpp/webgpu/GPUShaderModuleImpl.h +48 -0
- package/platforms/ios/src/cpp/webgpu/GPUSupportedLimitsImpl.cpp +1304 -0
- package/platforms/ios/src/cpp/webgpu/GPUSupportedLimitsImpl.h +288 -0
- package/platforms/ios/src/cpp/webgpu/GPUTextureImpl.cpp +386 -0
- package/platforms/ios/src/cpp/webgpu/GPUTextureImpl.h +77 -0
- package/platforms/ios/src/cpp/webgpu/GPUTextureViewImpl.cpp +79 -0
- package/platforms/ios/src/cpp/webgpu/GPUTextureViewImpl.h +48 -0
- package/platforms/ios/src/cpp/webgpu/GPUUtils.h +756 -0
- package/react/index.d.ts +1 -1
- package/utils.d.ts +1 -1
- package/utils.js.map +1 -1
- package/SVG/Circle.d.ts +0 -11
- package/SVG/Circle.js +0 -21
- package/SVG/Circle.js.map +0 -1
- package/SVG/ClipPath.d.ts +0 -4
- package/SVG/ClipPath.js +0 -9
- package/SVG/ClipPath.js.map +0 -1
- package/SVG/Defs.d.ts +0 -4
- package/SVG/Defs.js +0 -9
- package/SVG/Defs.js.map +0 -1
- package/SVG/Ellipse.d.ts +0 -13
- package/SVG/Ellipse.js +0 -26
- package/SVG/Ellipse.js.map +0 -1
- package/SVG/G.d.ts +0 -7
- package/SVG/G.js +0 -9
- package/SVG/G.js.map +0 -1
- package/SVG/Image.d.ts +0 -11
- package/SVG/Image.js +0 -40
- package/SVG/Image.js.map +0 -1
- package/SVG/Line.d.ts +0 -13
- package/SVG/Line.js +0 -26
- package/SVG/Line.js.map +0 -1
- package/SVG/LinearGradient.d.ts +0 -10
- package/SVG/LinearGradient.js +0 -13
- package/SVG/LinearGradient.js.map +0 -1
- package/SVG/Path.d.ts +0 -7
- package/SVG/Path.js +0 -14
- package/SVG/Path.js.map +0 -1
- package/SVG/Pattern.d.ts +0 -4
- package/SVG/Pattern.js +0 -9
- package/SVG/Pattern.js.map +0 -1
- package/SVG/Polygon.d.ts +0 -7
- package/SVG/Polygon.js +0 -14
- package/SVG/Polygon.js.map +0 -1
- package/SVG/Polyline.d.ts +0 -7
- package/SVG/Polyline.js +0 -14
- package/SVG/Polyline.js.map +0 -1
- package/SVG/Rect.d.ts +0 -8
- package/SVG/Rect.js +0 -13
- package/SVG/Rect.js.map +0 -1
- package/SVG/SVG.d.ts +0 -32
- package/SVG/SVG.js +0 -204
- package/SVG/SVG.js.map +0 -1
- package/SVG/SVGItem.d.ts +0 -5
- package/SVG/SVGItem.js +0 -8
- package/SVG/SVGItem.js.map +0 -1
- package/SVG/Stop.d.ts +0 -5
- package/SVG/Stop.js +0 -9
- package/SVG/Stop.js.map +0 -1
- package/SVG/Symbol.d.ts +0 -4
- package/SVG/Symbol.js +0 -9
- package/SVG/Symbol.js.map +0 -1
- package/SVG/Text.d.ts +0 -14
- package/SVG/Text.js +0 -26
- package/SVG/Text.js.map +0 -1
- package/SVG/Use.d.ts +0 -4
- package/SVG/Use.js +0 -9
- package/SVG/Use.js.map +0 -1
- package/SVG/index.d.ts +0 -18
- package/SVG/index.js +0 -19
- package/SVG/index.js.map +0 -1
- package/angular/fesm2020/nativescript-canvas-angular.mjs +0 -24
- package/angular/fesm2020/nativescript-canvas-angular.mjs.map +0 -1
- package/platforms/ios/src/cpp/PerIsolateData.cpp +0 -49
- package/platforms/ios/src/cpp/PerIsolateData.h +0 -54
- package/platforms/ios/src/cpp/URLImpl.cpp +0 -464
- package/platforms/ios/src/cpp/URLImpl.h +0 -121
- 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
|
@@ -5,298 +5,298 @@
|
|
|
5
5
|
#include "WebGL2RenderingContext.h"
|
|
6
6
|
|
|
7
7
|
v8::CFunction WebGL2RenderingContext::fast_begin_query_(
|
|
8
|
-
|
|
8
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastBeginQuery));
|
|
9
9
|
|
|
10
10
|
v8::CFunction WebGL2RenderingContext::fast_begin_transform_feedback_(
|
|
11
|
-
|
|
11
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastBeginTransformFeedback));
|
|
12
12
|
|
|
13
13
|
v8::CFunction WebGL2RenderingContext::fast_bind_vertex_array_(
|
|
14
|
-
|
|
14
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastBindVertexArray));
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
v8::CFunction WebGL2RenderingContext::fast_bind_buffer_base_(
|
|
18
|
-
|
|
18
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastBindBufferBase));
|
|
19
19
|
|
|
20
20
|
v8::CFunction WebGL2RenderingContext::fast_bind_buffer_range_(
|
|
21
|
-
|
|
21
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastBindBufferRange));
|
|
22
22
|
|
|
23
23
|
v8::CFunction WebGL2RenderingContext::fast_bind_sampler_(
|
|
24
|
-
|
|
24
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastBindSampler));
|
|
25
25
|
|
|
26
26
|
v8::CFunction WebGL2RenderingContext::fast_bind_transform_feedback_(
|
|
27
|
-
|
|
27
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastBindTransformFeedback));
|
|
28
28
|
|
|
29
29
|
v8::CFunction WebGL2RenderingContext::fast_blit_framebuffer_(
|
|
30
|
-
|
|
30
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastBlitFramebuffer));
|
|
31
31
|
|
|
32
32
|
v8::CFunction WebGL2RenderingContext::fast_clear_buffer_fi_(
|
|
33
|
-
|
|
33
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastClearBufferfi));
|
|
34
34
|
|
|
35
35
|
v8::CFunction WebGL2RenderingContext::fast_clear_buffer_fv_(
|
|
36
|
-
|
|
36
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastClearBufferfv));
|
|
37
37
|
|
|
38
38
|
v8::CFunction WebGL2RenderingContext::fast_clear_buffer_fv_array_(
|
|
39
|
-
|
|
39
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastClearBufferfvArray));
|
|
40
40
|
|
|
41
41
|
const v8::CFunction fast_clear_buffer_fv_overloads_[] = {
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
WebGL2RenderingContext::fast_clear_buffer_fv_,
|
|
43
|
+
WebGL2RenderingContext::fast_clear_buffer_fv_array_
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
v8::CFunction WebGL2RenderingContext::fast_clear_buffer_iv_(
|
|
47
|
-
|
|
47
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastClearBufferiv));
|
|
48
48
|
|
|
49
49
|
v8::CFunction WebGL2RenderingContext::fast_clear_buffer_iv_array_(
|
|
50
|
-
|
|
50
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastClearBufferivArray));
|
|
51
51
|
|
|
52
52
|
const v8::CFunction fast_clear_buffer_iv_overloads_[] = {
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
WebGL2RenderingContext::fast_clear_buffer_iv_,
|
|
54
|
+
WebGL2RenderingContext::fast_clear_buffer_iv_array_
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
v8::CFunction WebGL2RenderingContext::fast_clear_buffer_uiv_(
|
|
59
|
-
|
|
59
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastClearBufferuiv));
|
|
60
60
|
|
|
61
61
|
v8::CFunction WebGL2RenderingContext::fast_clear_buffer_uiv_array_(
|
|
62
|
-
|
|
62
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastClearBufferuivArray));
|
|
63
63
|
|
|
64
64
|
const v8::CFunction fast_clear_buffer_uiv_overloads_[] = {
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
WebGL2RenderingContext::fast_clear_buffer_uiv_,
|
|
66
|
+
WebGL2RenderingContext::fast_clear_buffer_uiv_array_
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
v8::CFunction WebGL2RenderingContext::fast_draw_arrays_instanced_(
|
|
70
|
-
|
|
70
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastDrawArraysInstanced));
|
|
71
71
|
|
|
72
72
|
v8::CFunction WebGL2RenderingContext::fast_draw_buffers_(
|
|
73
|
-
|
|
73
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastDrawBuffers));
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
v8::CFunction WebGL2RenderingContext::fast_draw_elements_instanced_(
|
|
77
|
-
|
|
77
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastDrawElementsInstanced));
|
|
78
78
|
|
|
79
79
|
v8::CFunction WebGL2RenderingContext::fast_draw_range_elements_(
|
|
80
|
-
|
|
80
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastDrawRangeElements));
|
|
81
81
|
|
|
82
82
|
v8::CFunction WebGL2RenderingContext::fast_resume_transform_feedback_(
|
|
83
|
-
|
|
83
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastResumeTransformFeedback));
|
|
84
84
|
|
|
85
85
|
v8::CFunction WebGL2RenderingContext::fast_sampler_parameterf_(
|
|
86
|
-
|
|
86
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastSamplerParameterf));
|
|
87
87
|
|
|
88
88
|
v8::CFunction WebGL2RenderingContext::fast_sampler_parameteri_(
|
|
89
|
-
|
|
89
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastSamplerParameteri));
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
v8::CFunction WebGL2RenderingContext::fast_uniform_1ui_(
|
|
93
|
-
|
|
93
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniform1ui));
|
|
94
94
|
|
|
95
95
|
v8::CFunction WebGL2RenderingContext::fast_uniform_1uiv_(
|
|
96
|
-
|
|
96
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniform1uiv));
|
|
97
97
|
|
|
98
98
|
v8::CFunction WebGL2RenderingContext::fast_uniform_2ui_(
|
|
99
|
-
|
|
99
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniform2ui));
|
|
100
100
|
|
|
101
101
|
v8::CFunction WebGL2RenderingContext::fast_uniform_2uiv_(
|
|
102
|
-
|
|
102
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniform2uiv));
|
|
103
103
|
|
|
104
104
|
v8::CFunction WebGL2RenderingContext::fast_uniform_3ui_(
|
|
105
|
-
|
|
105
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniform3ui));
|
|
106
106
|
|
|
107
107
|
v8::CFunction WebGL2RenderingContext::fast_uniform_3uiv_(
|
|
108
|
-
|
|
108
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniform3uiv));
|
|
109
109
|
|
|
110
110
|
v8::CFunction WebGL2RenderingContext::fast_uniform_4ui_(
|
|
111
|
-
|
|
111
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniform4ui));
|
|
112
112
|
|
|
113
113
|
v8::CFunction WebGL2RenderingContext::fast_uniform_4uiv_(
|
|
114
|
-
|
|
114
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniform4uiv));
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_2x3fv_(
|
|
118
|
-
|
|
118
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix2x3fv));
|
|
119
119
|
|
|
120
120
|
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_2x3fv_array_(
|
|
121
|
-
|
|
121
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix2x3fvArray));
|
|
122
122
|
|
|
123
123
|
const v8::CFunction fast_uniform_matrix_2x3fv_overloads_[] = {
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
WebGL2RenderingContext::fast_uniform_matrix_2x3fv_,
|
|
125
|
+
WebGL2RenderingContext::fast_uniform_matrix_2x3fv_array_
|
|
126
126
|
};
|
|
127
127
|
|
|
128
128
|
|
|
129
129
|
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_2x4fv_(
|
|
130
|
-
|
|
130
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix2x4fv));
|
|
131
131
|
|
|
132
132
|
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_2x4fv_array_(
|
|
133
|
-
|
|
133
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix2x4fvArray));
|
|
134
134
|
|
|
135
135
|
const v8::CFunction fast_uniform_matrix_2x4fv_overloads_[] = {
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
WebGL2RenderingContext::fast_uniform_matrix_2x4fv_,
|
|
137
|
+
WebGL2RenderingContext::fast_uniform_matrix_2x4fv_array_
|
|
138
138
|
};
|
|
139
139
|
|
|
140
140
|
|
|
141
141
|
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_3x2fv_(
|
|
142
|
-
|
|
142
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix3x2fv));
|
|
143
143
|
|
|
144
144
|
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_3x2fv_array_(
|
|
145
|
-
|
|
145
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix3x2fvArray));
|
|
146
146
|
|
|
147
147
|
const v8::CFunction fast_uniform_matrix_3x2fv_overloads_[] = {
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
WebGL2RenderingContext::fast_uniform_matrix_3x2fv_,
|
|
149
|
+
WebGL2RenderingContext::fast_uniform_matrix_3x2fv_array_
|
|
150
150
|
};
|
|
151
151
|
|
|
152
152
|
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_3x4fv_(
|
|
153
|
-
|
|
153
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix3x4fv));
|
|
154
154
|
|
|
155
155
|
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_3x4fv_array_(
|
|
156
|
-
|
|
156
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix3x4fvArray));
|
|
157
157
|
|
|
158
158
|
const v8::CFunction fast_uniform_matrix_3x4fv_overloads_[] = {
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
WebGL2RenderingContext::fast_uniform_matrix_3x4fv_,
|
|
160
|
+
WebGL2RenderingContext::fast_uniform_matrix_3x4fv_array_
|
|
161
161
|
};
|
|
162
162
|
|
|
163
163
|
|
|
164
164
|
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_4x2fv_(
|
|
165
|
-
|
|
165
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix4x2fv));
|
|
166
166
|
|
|
167
167
|
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_4x2fv_array_(
|
|
168
|
-
|
|
168
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix4x2fvArray));
|
|
169
169
|
|
|
170
170
|
const v8::CFunction fast_uniform_matrix_4x2fv_overloads_[] = {
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
WebGL2RenderingContext::fast_uniform_matrix_4x2fv_,
|
|
172
|
+
WebGL2RenderingContext::fast_uniform_matrix_4x2fv_array_
|
|
173
173
|
};
|
|
174
174
|
|
|
175
175
|
|
|
176
176
|
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_4x3fv_(
|
|
177
|
-
|
|
177
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix4x3fv));
|
|
178
178
|
|
|
179
179
|
v8::CFunction WebGL2RenderingContext::fast_uniform_matrix_4x3fv_array_(
|
|
180
|
-
|
|
180
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformMatrix4x3fvArray));
|
|
181
181
|
|
|
182
182
|
const v8::CFunction fast_uniform_matrix_4x3fv_overloads_[] = {
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
WebGL2RenderingContext::fast_uniform_matrix_4x3fv_,
|
|
184
|
+
WebGL2RenderingContext::fast_uniform_matrix_4x3fv_array_
|
|
185
185
|
};
|
|
186
186
|
|
|
187
187
|
v8::CFunction WebGL2RenderingContext::fast_vertex_attrib_divisor_(
|
|
188
|
-
|
|
188
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastVertexAttribDivisor));
|
|
189
189
|
|
|
190
190
|
|
|
191
191
|
v8::CFunction WebGL2RenderingContext::fast_vertex_attrib_i_4i_(
|
|
192
|
-
|
|
192
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastVertexAttribI4i));
|
|
193
193
|
|
|
194
194
|
|
|
195
195
|
v8::CFunction WebGL2RenderingContext::fast_vertex_attrib_i_4iv_(
|
|
196
|
-
|
|
196
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastVertexAttribI4iv));
|
|
197
197
|
|
|
198
198
|
v8::CFunction WebGL2RenderingContext::fast_vertex_attrib_i_4iv_array_(
|
|
199
|
-
|
|
199
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastVertexAttribI4ivArray));
|
|
200
200
|
|
|
201
201
|
const v8::CFunction fast_vertex_attrib_i_4iv_overloads_[] = {
|
|
202
|
-
|
|
203
|
-
|
|
202
|
+
WebGL2RenderingContext::fast_vertex_attrib_i_4iv_,
|
|
203
|
+
WebGL2RenderingContext::fast_vertex_attrib_i_4iv_array_
|
|
204
204
|
};
|
|
205
205
|
|
|
206
206
|
|
|
207
207
|
v8::CFunction WebGL2RenderingContext::fast_vertex_attrib_i_4ui_(
|
|
208
|
-
|
|
208
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastVertexAttribI4ui));
|
|
209
209
|
|
|
210
210
|
|
|
211
211
|
v8::CFunction WebGL2RenderingContext::fast_vertex_attrib_i_4uiv_(
|
|
212
|
-
|
|
212
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastVertexAttribI4uiv));
|
|
213
213
|
|
|
214
214
|
v8::CFunction WebGL2RenderingContext::fast_vertex_attrib_i_4uiv_array_(
|
|
215
|
-
|
|
215
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastVertexAttribI4uivArray));
|
|
216
216
|
|
|
217
217
|
const v8::CFunction fast_vertex_attrib_i_4uiv_overloads_[] = {
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
WebGL2RenderingContext::fast_vertex_attrib_i_4uiv_,
|
|
219
|
+
WebGL2RenderingContext::fast_vertex_attrib_i_4uiv_array_
|
|
220
220
|
};
|
|
221
221
|
|
|
222
222
|
v8::CFunction WebGL2RenderingContext::fast_uniform_block_binding_(
|
|
223
|
-
|
|
223
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastUniformBlockBinding));
|
|
224
224
|
|
|
225
225
|
|
|
226
226
|
v8::CFunction WebGL2RenderingContext::fast_invalidate_framebuffer_(
|
|
227
|
-
|
|
227
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastInvalidateFramebuffer));
|
|
228
228
|
|
|
229
229
|
v8::CFunction WebGL2RenderingContext::fast_invalidate_sub_framebuffer_(
|
|
230
|
-
|
|
230
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastInvalidateSubFramebuffer));
|
|
231
231
|
|
|
232
232
|
|
|
233
233
|
v8::CFunction WebGL2RenderingContext::fast_copy_tex_sub_image_3d_(
|
|
234
|
-
|
|
234
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastCopyTexSubImage3D));
|
|
235
235
|
|
|
236
236
|
v8::CFunction WebGL2RenderingContext::fast_copy_buffer_sub_data_(
|
|
237
|
-
|
|
237
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastCopyBufferSubData));
|
|
238
238
|
|
|
239
239
|
v8::CFunction WebGL2RenderingContext::fast_delete_query_(
|
|
240
|
-
|
|
240
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastDeleteQuery));
|
|
241
241
|
v8::CFunction WebGL2RenderingContext::fast_delete_sampler_(
|
|
242
|
-
|
|
242
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastDeleteSampler));
|
|
243
243
|
v8::CFunction WebGL2RenderingContext::fast_delete_sync_(
|
|
244
|
-
|
|
244
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastDeleteSync));
|
|
245
245
|
v8::CFunction WebGL2RenderingContext::fast_delete_transform_feedback_(
|
|
246
|
-
|
|
246
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastDeleteTransformFeedback));
|
|
247
247
|
v8::CFunction WebGL2RenderingContext::fast_delete_vertex_array_(
|
|
248
|
-
|
|
248
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastDeleteVertexArray));
|
|
249
249
|
|
|
250
250
|
v8::CFunction WebGL2RenderingContext::fast_end_query_(
|
|
251
|
-
|
|
251
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastEndQuery));
|
|
252
252
|
|
|
253
253
|
v8::CFunction WebGL2RenderingContext::fast_end_transform_feedback_(
|
|
254
|
-
|
|
254
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastEndTransformFeedback));
|
|
255
255
|
|
|
256
256
|
v8::CFunction WebGL2RenderingContext::fast_framebuffer_texture_layer_(
|
|
257
|
-
|
|
257
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastFramebufferTextureLayer));
|
|
258
258
|
|
|
259
259
|
v8::CFunction WebGL2RenderingContext::fast_pause_transform_feedback_(
|
|
260
|
-
|
|
260
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastPauseTransformFeedback));
|
|
261
261
|
|
|
262
262
|
|
|
263
263
|
v8::CFunction WebGL2RenderingContext::fast_read_buffer_(
|
|
264
|
-
|
|
264
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastReadBuffer));
|
|
265
265
|
|
|
266
266
|
v8::CFunction WebGL2RenderingContext::fast_renderbuffer_storage_multisample_(
|
|
267
|
-
|
|
267
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastRenderbufferStorageMultisample));
|
|
268
268
|
|
|
269
269
|
|
|
270
270
|
v8::CFunction WebGL2RenderingContext::fast_is_query_(
|
|
271
|
-
|
|
271
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastIsQuery));
|
|
272
272
|
|
|
273
273
|
|
|
274
274
|
v8::CFunction WebGL2RenderingContext::fast_is_sampler_(
|
|
275
|
-
|
|
275
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastIsSampler));
|
|
276
276
|
|
|
277
277
|
|
|
278
278
|
v8::CFunction WebGL2RenderingContext::fast_is_sync_(
|
|
279
|
-
|
|
279
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastIsSync));
|
|
280
280
|
|
|
281
281
|
|
|
282
282
|
v8::CFunction WebGL2RenderingContext::fast_is_transform_feedback_(
|
|
283
|
-
|
|
283
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastIsTransformFeedback));
|
|
284
284
|
|
|
285
285
|
|
|
286
286
|
v8::CFunction WebGL2RenderingContext::fast_is_vertex_array_(
|
|
287
|
-
|
|
287
|
+
v8::CFunction::Make(WebGL2RenderingContext::FastIsVertexArray));
|
|
288
288
|
|
|
289
289
|
|
|
290
290
|
|
|
291
291
|
WebGL2RenderingContext::WebGL2RenderingContext(WebGLState *state) : WebGLRenderingContext(
|
|
292
|
-
|
|
293
|
-
}
|
|
292
|
+
state, WebGLRenderingVersion::V2) {
|
|
293
|
+
}
|
|
294
294
|
|
|
295
295
|
|
|
296
296
|
|
|
297
297
|
WebGL2RenderingContext::WebGL2RenderingContext(WebGLState *state,
|
|
298
298
|
WebGLRenderingVersion version)
|
|
299
|
-
|
|
299
|
+
: WebGLRenderingContext(state, version) {
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
|
|
@@ -322,7 +322,7 @@ v8::Local<v8::FunctionTemplate> WebGL2RenderingContext::GetCtor(v8::Isolate *iso
|
|
|
322
322
|
WebGLRenderingContext::SetProps(isolate, tmpl);
|
|
323
323
|
SetProps(isolate, tmpl);
|
|
324
324
|
cache->WebGL2RenderingContextTmpl =
|
|
325
|
-
|
|
325
|
+
std::make_unique<v8::Persistent<v8::FunctionTemplate>>(isolate, ctorTmpl);
|
|
326
326
|
return ctorTmpl;
|
|
327
327
|
}
|
|
328
328
|
|
|
@@ -351,10 +351,10 @@ void WebGL2RenderingContext::BeginQuery(const v8::FunctionCallbackInfo<v8::Value
|
|
|
351
351
|
|
|
352
352
|
if (query != nullptr) {
|
|
353
353
|
canvas_native_webgl2_begin_query(
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
354
|
+
target,
|
|
355
|
+
query->GetQuery(),
|
|
356
|
+
ptr->GetState()
|
|
357
|
+
);
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
}
|
|
@@ -371,9 +371,9 @@ WebGL2RenderingContext::BeginTransformFeedback(const v8::FunctionCallbackInfo<v8
|
|
|
371
371
|
|
|
372
372
|
auto value = args[0]->Uint32Value(context).ToChecked();
|
|
373
373
|
canvas_native_webgl2_begin_transform_feedback(
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
374
|
+
value,
|
|
375
|
+
ptr->GetState()
|
|
376
|
+
);
|
|
377
377
|
}
|
|
378
378
|
|
|
379
379
|
void WebGL2RenderingContext::BindBufferBase(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -395,11 +395,11 @@ void WebGL2RenderingContext::BindBufferBase(const v8::FunctionCallbackInfo<v8::V
|
|
|
395
395
|
auto buffer = WebGLBuffer::GetPointer(bufferValue.As<v8::Object>());
|
|
396
396
|
|
|
397
397
|
canvas_native_webgl2_bind_buffer_base(
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
398
|
+
target,
|
|
399
|
+
index,
|
|
400
|
+
buffer->GetBuffer(),
|
|
401
|
+
ptr->GetState()
|
|
402
|
+
);
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
|
|
@@ -421,13 +421,13 @@ void WebGL2RenderingContext::BindBufferRange(const v8::FunctionCallbackInfo<v8::
|
|
|
421
421
|
auto size = args[4]->NumberValue(context).ToChecked();
|
|
422
422
|
auto buffer = WebGLBuffer::GetPointer(bufferValue.As<v8::Object>());
|
|
423
423
|
canvas_native_webgl2_bind_buffer_range(
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
424
|
+
target,
|
|
425
|
+
index,
|
|
426
|
+
buffer->GetBuffer(),
|
|
427
|
+
static_cast<ssize_t>(offset),
|
|
428
|
+
static_cast<ssize_t>(size),
|
|
429
|
+
ptr->GetState()
|
|
430
|
+
);
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
433
|
|
|
@@ -447,10 +447,10 @@ void WebGL2RenderingContext::BindSampler(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
447
447
|
auto sampler = WebGLSampler::GetPointer(samplerValue.As<v8::Object>());
|
|
448
448
|
|
|
449
449
|
canvas_native_webgl2_bind_sampler(
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
450
|
+
unit,
|
|
451
|
+
sampler->GetSampler(),
|
|
452
|
+
ptr->GetState()
|
|
453
|
+
);
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
456
|
|
|
@@ -470,13 +470,13 @@ WebGL2RenderingContext::BindTransformFeedback(const v8::FunctionCallbackInfo<v8:
|
|
|
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
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
476
|
+
target,
|
|
477
|
+
transformFeedback->GetFeedback(),
|
|
478
|
+
ptr->GetState()
|
|
479
|
+
);
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
482
|
|
|
@@ -491,9 +491,9 @@ void WebGL2RenderingContext::BindVertexArray(const v8::FunctionCallbackInfo<v8::
|
|
|
491
491
|
auto value = args[0];
|
|
492
492
|
if (value->IsNull()) {
|
|
493
493
|
canvas_native_webgl2_bind_vertex_array(
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
494
|
+
0,
|
|
495
|
+
ptr->GetState()
|
|
496
|
+
);
|
|
497
497
|
return;
|
|
498
498
|
}
|
|
499
499
|
|
|
@@ -503,9 +503,9 @@ void WebGL2RenderingContext::BindVertexArray(const v8::FunctionCallbackInfo<v8::
|
|
|
503
503
|
|
|
504
504
|
if (vertexArray != nullptr) {
|
|
505
505
|
canvas_native_webgl2_bind_vertex_array(
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
506
|
+
vertexArray->GetVertexArrayObject(),
|
|
507
|
+
ptr->GetState()
|
|
508
|
+
);
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
}
|
|
@@ -534,18 +534,18 @@ void WebGL2RenderingContext::BlitFramebuffer(const v8::FunctionCallbackInfo<v8::
|
|
|
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(
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
537
|
+
srcX0,
|
|
538
|
+
srcY0,
|
|
539
|
+
srcX1,
|
|
540
|
+
srcY1,
|
|
541
|
+
dstX0,
|
|
542
|
+
dstY0,
|
|
543
|
+
dstX1,
|
|
544
|
+
dstY1,
|
|
545
|
+
mask,
|
|
546
|
+
filter,
|
|
547
|
+
ptr->GetState()
|
|
548
|
+
);
|
|
549
549
|
}
|
|
550
550
|
|
|
551
551
|
void WebGL2RenderingContext::ClearBufferfv(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -567,19 +567,19 @@ void WebGL2RenderingContext::ClearBufferfv(const v8::FunctionCallbackInfo<v8::Va
|
|
|
567
567
|
buf.reserve(len);
|
|
568
568
|
for (int j = 0; j < len; ++j) {
|
|
569
569
|
auto item = array->Get(
|
|
570
|
-
|
|
570
|
+
context, j).ToLocalChecked();
|
|
571
571
|
buf.push_back(
|
|
572
|
-
|
|
573
|
-
|
|
572
|
+
static_cast<float>(item->NumberValue(context).ToChecked())
|
|
573
|
+
);
|
|
574
574
|
}
|
|
575
575
|
|
|
576
576
|
canvas_native_webgl2_clear_bufferfv(
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
577
|
+
buffer,
|
|
578
|
+
drawbuffer,
|
|
579
|
+
buf.data(),
|
|
580
|
+
buf.size(),
|
|
581
|
+
ptr->GetState()
|
|
582
|
+
);
|
|
583
583
|
|
|
584
584
|
} else if (values->IsFloat32Array()) {
|
|
585
585
|
auto buf = values.As<v8::Float32Array>();
|
|
@@ -591,12 +591,12 @@ void WebGL2RenderingContext::ClearBufferfv(const v8::FunctionCallbackInfo<v8::Va
|
|
|
591
591
|
|
|
592
592
|
|
|
593
593
|
canvas_native_webgl2_clear_bufferfv(
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
594
|
+
buffer,
|
|
595
|
+
drawbuffer,
|
|
596
|
+
data,
|
|
597
|
+
size,
|
|
598
|
+
ptr->GetState()
|
|
599
|
+
);
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
602
|
|
|
@@ -620,20 +620,20 @@ void WebGL2RenderingContext::ClearBufferiv(const v8::FunctionCallbackInfo<v8::Va
|
|
|
620
620
|
buf.reserve(len);
|
|
621
621
|
for (int j = 0; j < len; ++j) {
|
|
622
622
|
auto item = array->Get(
|
|
623
|
-
|
|
623
|
+
context, j).ToLocalChecked();
|
|
624
624
|
buf.push_back(
|
|
625
|
-
|
|
626
|
-
|
|
625
|
+
item->Int32Value(context).ToChecked()
|
|
626
|
+
);
|
|
627
627
|
}
|
|
628
628
|
|
|
629
629
|
|
|
630
630
|
canvas_native_webgl2_clear_bufferiv(
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
631
|
+
buffer,
|
|
632
|
+
drawbuffer,
|
|
633
|
+
buf.data(),
|
|
634
|
+
buf.size(),
|
|
635
|
+
ptr->GetState()
|
|
636
|
+
);
|
|
637
637
|
|
|
638
638
|
} else if (values->IsInt32Array()) {
|
|
639
639
|
auto buf = values.As<v8::Int32Array>();
|
|
@@ -646,12 +646,12 @@ void WebGL2RenderingContext::ClearBufferiv(const v8::FunctionCallbackInfo<v8::Va
|
|
|
646
646
|
|
|
647
647
|
|
|
648
648
|
canvas_native_webgl2_clear_bufferiv(
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
649
|
+
buffer,
|
|
650
|
+
drawbuffer,
|
|
651
|
+
data,
|
|
652
|
+
size,
|
|
653
|
+
ptr->GetState()
|
|
654
|
+
);
|
|
655
655
|
}
|
|
656
656
|
}
|
|
657
657
|
|
|
@@ -669,12 +669,12 @@ void WebGL2RenderingContext::ClearBufferfi(const v8::FunctionCallbackInfo<v8::Va
|
|
|
669
669
|
auto depth = args[2]->NumberValue(context).ToChecked();
|
|
670
670
|
auto stencil = args[3]->Int32Value(context).ToChecked();
|
|
671
671
|
canvas_native_webgl2_clear_bufferfi(
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
672
|
+
buffer,
|
|
673
|
+
drawbuffer,
|
|
674
|
+
static_cast<float>(depth),
|
|
675
|
+
stencil,
|
|
676
|
+
ptr->GetState()
|
|
677
|
+
);
|
|
678
678
|
}
|
|
679
679
|
|
|
680
680
|
void WebGL2RenderingContext::ClearBufferuiv(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -698,20 +698,20 @@ void WebGL2RenderingContext::ClearBufferuiv(const v8::FunctionCallbackInfo<v8::V
|
|
|
698
698
|
buf.reserve(len);
|
|
699
699
|
for (int j = 0; j < len; ++j) {
|
|
700
700
|
auto item = array->Get(
|
|
701
|
-
|
|
701
|
+
context, j).ToLocalChecked();
|
|
702
702
|
buf.push_back(
|
|
703
|
-
|
|
704
|
-
|
|
703
|
+
item->Uint32Value(context).ToChecked()
|
|
704
|
+
);
|
|
705
705
|
}
|
|
706
706
|
|
|
707
707
|
|
|
708
708
|
canvas_native_webgl2_clear_bufferuiv(
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
709
|
+
buffer,
|
|
710
|
+
drawbuffer,
|
|
711
|
+
buf.data(),
|
|
712
|
+
buf.size(),
|
|
713
|
+
ptr->GetState()
|
|
714
|
+
);
|
|
715
715
|
|
|
716
716
|
} else if (values->IsUint32Array()) {
|
|
717
717
|
auto buf = values.As<v8::Uint32Array>();
|
|
@@ -723,11 +723,11 @@ void WebGL2RenderingContext::ClearBufferuiv(const v8::FunctionCallbackInfo<v8::V
|
|
|
723
723
|
|
|
724
724
|
|
|
725
725
|
canvas_native_webgl2_clear_bufferuiv(
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
726
|
+
buffer,
|
|
727
|
+
drawbuffer,
|
|
728
|
+
data, size,
|
|
729
|
+
ptr->GetState()
|
|
730
|
+
);
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
733
|
|
|
@@ -748,11 +748,11 @@ void WebGL2RenderingContext::ClientWaitSync(const v8::FunctionCallbackInfo<v8::V
|
|
|
748
748
|
auto flags = args[1]->Uint32Value(context).ToChecked();
|
|
749
749
|
auto timeout = args[2]->NumberValue(context).ToChecked();
|
|
750
750
|
auto ret = canvas_native_webgl2_client_wait_sync(
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
751
|
+
sync->GetSync(),
|
|
752
|
+
flags,
|
|
753
|
+
static_cast<ssize_t>(timeout),
|
|
754
|
+
ptr->GetState()
|
|
755
|
+
);
|
|
756
756
|
|
|
757
757
|
args.GetReturnValue().Set(ret);
|
|
758
758
|
return;
|
|
@@ -800,26 +800,26 @@ WebGL2RenderingContext::CompressedTexSubImage3D(const v8::FunctionCallbackInfo<v
|
|
|
800
800
|
size_t srcLengthOverride = 0;
|
|
801
801
|
if (args[11]->IsNumber()) {
|
|
802
802
|
srcLengthOverride = static_cast<size_t>(args[11]->NumberValue(
|
|
803
|
-
|
|
803
|
+
context).ToChecked());
|
|
804
804
|
}
|
|
805
805
|
|
|
806
806
|
|
|
807
807
|
canvas_native_webgl2_compressed_tex_sub_image3d(
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
808
|
+
target,
|
|
809
|
+
level,
|
|
810
|
+
xoffset,
|
|
811
|
+
yoffset,
|
|
812
|
+
zoffset,
|
|
813
|
+
width,
|
|
814
|
+
height,
|
|
815
|
+
depth,
|
|
816
|
+
format,
|
|
817
|
+
data,
|
|
818
|
+
size,
|
|
819
|
+
srcOffset,
|
|
820
|
+
srcLengthOverride,
|
|
821
|
+
ptr->GetState()
|
|
822
|
+
);
|
|
823
823
|
}
|
|
824
824
|
} else {
|
|
825
825
|
auto imageSizeOrBuf = imageSizeOrBufValue->Int32Value(context).ToChecked();
|
|
@@ -828,19 +828,19 @@ WebGL2RenderingContext::CompressedTexSubImage3D(const v8::FunctionCallbackInfo<v
|
|
|
828
828
|
offset = args[10]->Int32Value(context).ToChecked();
|
|
829
829
|
}
|
|
830
830
|
canvas_native_webgl2_compressed_tex_sub_image3d_none(
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
831
|
+
target,
|
|
832
|
+
level,
|
|
833
|
+
xoffset,
|
|
834
|
+
yoffset,
|
|
835
|
+
zoffset,
|
|
836
|
+
width,
|
|
837
|
+
height,
|
|
838
|
+
depth,
|
|
839
|
+
format,
|
|
840
|
+
imageSizeOrBuf,
|
|
841
|
+
offset,
|
|
842
|
+
ptr->GetState()
|
|
843
|
+
);
|
|
844
844
|
}
|
|
845
845
|
}
|
|
846
846
|
}
|
|
@@ -860,13 +860,13 @@ void WebGL2RenderingContext::CopyBufferSubData(const v8::FunctionCallbackInfo<v8
|
|
|
860
860
|
auto writeOffset = args[3]->NumberValue(context).ToChecked();
|
|
861
861
|
auto size = args[4]->NumberValue(context).ToChecked();
|
|
862
862
|
canvas_native_webgl2_copy_buffer_sub_data(
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
863
|
+
readTarget,
|
|
864
|
+
writeTarget,
|
|
865
|
+
static_cast<ssize_t>(readOffset),
|
|
866
|
+
static_cast<ssize_t>(writeOffset),
|
|
867
|
+
static_cast<ssize_t>(size),
|
|
868
|
+
ptr->GetState()
|
|
869
|
+
);
|
|
870
870
|
}
|
|
871
871
|
|
|
872
872
|
void WebGL2RenderingContext::CopyTexSubImage3D(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -888,17 +888,17 @@ void WebGL2RenderingContext::CopyTexSubImage3D(const v8::FunctionCallbackInfo<v8
|
|
|
888
888
|
auto width = args[7]->Int32Value(context).ToChecked();
|
|
889
889
|
auto height = args[8]->Int32Value(context).ToChecked();
|
|
890
890
|
canvas_native_webgl2_copy_tex_sub_image3d(
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
891
|
+
target,
|
|
892
|
+
level,
|
|
893
|
+
xoffset,
|
|
894
|
+
yoffset,
|
|
895
|
+
zoffset,
|
|
896
|
+
x,
|
|
897
|
+
y,
|
|
898
|
+
width,
|
|
899
|
+
height,
|
|
900
|
+
ptr->GetState()
|
|
901
|
+
);
|
|
902
902
|
}
|
|
903
903
|
|
|
904
904
|
void WebGL2RenderingContext::CreateQuery(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -911,7 +911,7 @@ void WebGL2RenderingContext::CreateQuery(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
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);
|
|
@@ -927,7 +927,7 @@ void WebGL2RenderingContext::CreateSampler(const v8::FunctionCallbackInfo<v8::Va
|
|
|
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);
|
|
@@ -944,10 +944,10 @@ WebGL2RenderingContext::CreateTransformFeedback(const v8::FunctionCallbackInfo<v
|
|
|
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
|
}
|
|
@@ -962,7 +962,7 @@ void WebGL2RenderingContext::CreateVertexArray(const v8::FunctionCallbackInfo<v8
|
|
|
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));
|
|
@@ -985,9 +985,9 @@ void WebGL2RenderingContext::DeleteQuery(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
985
985
|
|
|
986
986
|
if (query != nullptr) {
|
|
987
987
|
canvas_native_webgl2_delete_query_with_query(
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
988
|
+
query->GetQuery(),
|
|
989
|
+
ptr->GetState()
|
|
990
|
+
);
|
|
991
991
|
}
|
|
992
992
|
}
|
|
993
993
|
}
|
|
@@ -1009,9 +1009,9 @@ void WebGL2RenderingContext::DeleteSampler(const v8::FunctionCallbackInfo<v8::Va
|
|
|
1009
1009
|
|
|
1010
1010
|
if (sampler != nullptr) {
|
|
1011
1011
|
canvas_native_webgl2_delete_sampler_with_sampler(
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1012
|
+
sampler->GetSampler(),
|
|
1013
|
+
ptr->GetState()
|
|
1014
|
+
);
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
@@ -1032,9 +1032,9 @@ void WebGL2RenderingContext::DeleteSync(const v8::FunctionCallbackInfo<v8::Value
|
|
|
1032
1032
|
|
|
1033
1033
|
if (sync != nullptr) {
|
|
1034
1034
|
canvas_native_webgl2_delete_sync_with_sync(
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1035
|
+
sync->GetSync(),
|
|
1036
|
+
ptr->GetState()
|
|
1037
|
+
);
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
1040
|
}
|
|
@@ -1053,13 +1053,13 @@ WebGL2RenderingContext::DeleteTransformFeedback(const v8::FunctionCallbackInfo<v
|
|
|
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
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1060
|
+
transformFeedback->GetFeedback(),
|
|
1061
|
+
ptr->GetState()
|
|
1062
|
+
);
|
|
1063
1063
|
}
|
|
1064
1064
|
}
|
|
1065
1065
|
}
|
|
@@ -1080,9 +1080,9 @@ void WebGL2RenderingContext::DeleteVertexArray(const v8::FunctionCallbackInfo<v8
|
|
|
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(
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1083
|
+
vertexArray->GetVertexArrayObject(),
|
|
1084
|
+
ptr->GetState()
|
|
1085
|
+
);
|
|
1086
1086
|
}
|
|
1087
1087
|
}
|
|
1088
1088
|
}
|
|
@@ -1101,12 +1101,12 @@ void WebGL2RenderingContext::DrawArraysInstanced(const v8::FunctionCallbackInfo<
|
|
|
1101
1101
|
auto count_ = args[2]->Int32Value(context).ToChecked();
|
|
1102
1102
|
auto instanceCount = args[3]->Int32Value(context).ToChecked();
|
|
1103
1103
|
canvas_native_webgl2_draw_arrays_instanced(
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1104
|
+
mode,
|
|
1105
|
+
first,
|
|
1106
|
+
count_,
|
|
1107
|
+
instanceCount,
|
|
1108
|
+
ptr->GetState()
|
|
1109
|
+
);
|
|
1110
1110
|
|
|
1111
1111
|
ptr->UpdateInvalidateState();
|
|
1112
1112
|
}
|
|
@@ -1128,13 +1128,13 @@ void WebGL2RenderingContext::DrawBuffers(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1128
1128
|
buf.reserve(len);
|
|
1129
1129
|
for (int j = 0; j < len; ++j) {
|
|
1130
1130
|
auto item = array->Get(
|
|
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
|
-
|
|
1137
|
-
|
|
1136
|
+
buf.data(), buf.size(),
|
|
1137
|
+
ptr->GetState());
|
|
1138
1138
|
}
|
|
1139
1139
|
}
|
|
1140
1140
|
|
|
@@ -1154,13 +1154,13 @@ WebGL2RenderingContext::DrawElementsInstanced(const v8::FunctionCallbackInfo<v8:
|
|
|
1154
1154
|
auto offset = args[3]->NumberValue(context).ToChecked();
|
|
1155
1155
|
auto instanceCount = args[4]->Int32Value(context).ToChecked();
|
|
1156
1156
|
canvas_native_webgl2_draw_elements_instanced(
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1157
|
+
mode,
|
|
1158
|
+
count_,
|
|
1159
|
+
type,
|
|
1160
|
+
static_cast<ssize_t>(offset),
|
|
1161
|
+
instanceCount,
|
|
1162
|
+
ptr->GetState()
|
|
1163
|
+
);
|
|
1164
1164
|
|
|
1165
1165
|
ptr->UpdateInvalidateState();
|
|
1166
1166
|
}
|
|
@@ -1181,14 +1181,14 @@ void WebGL2RenderingContext::DrawRangeElements(const v8::FunctionCallbackInfo<v8
|
|
|
1181
1181
|
auto type = args[4]->Uint32Value(context).ToChecked();
|
|
1182
1182
|
auto offset = args[5]->NumberValue(context).ToChecked();
|
|
1183
1183
|
canvas_native_webgl2_draw_range_elements(
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1184
|
+
mode,
|
|
1185
|
+
start,
|
|
1186
|
+
end,
|
|
1187
|
+
count,
|
|
1188
|
+
type,
|
|
1189
|
+
static_cast<ssize_t>(offset),
|
|
1190
|
+
ptr->GetState()
|
|
1191
|
+
);
|
|
1192
1192
|
|
|
1193
1193
|
ptr->UpdateInvalidateState();
|
|
1194
1194
|
}
|
|
@@ -1217,7 +1217,7 @@ void WebGL2RenderingContext::EndTransformFeedback(const v8::FunctionCallbackInfo
|
|
|
1217
1217
|
|
|
1218
1218
|
|
|
1219
1219
|
canvas_native_webgl2_end_transform_feedback(
|
|
1220
|
-
|
|
1220
|
+
ptr->GetState());
|
|
1221
1221
|
}
|
|
1222
1222
|
|
|
1223
1223
|
void WebGL2RenderingContext::FenceSync(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -1233,10 +1233,10 @@ void WebGL2RenderingContext::FenceSync(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
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(
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1236
|
+
condition,
|
|
1237
|
+
flags,
|
|
1238
|
+
ptr->GetState()
|
|
1239
|
+
);
|
|
1240
1240
|
auto ret = WebGLSyncImpl::NewInstance(isolate, new WebGLSyncImpl(sync));
|
|
1241
1241
|
|
|
1242
1242
|
args.GetReturnValue().Set(ret);
|
|
@@ -1264,13 +1264,13 @@ WebGL2RenderingContext::FramebufferTextureLayer(const v8::FunctionCallbackInfo<v
|
|
|
1264
1264
|
auto layer = args[4]->Int32Value(context).ToChecked();
|
|
1265
1265
|
if (texture != nullptr) {
|
|
1266
1266
|
canvas_native_webgl2_framebuffer_texture_layer(
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1267
|
+
target,
|
|
1268
|
+
attachment,
|
|
1269
|
+
texture->GetTexture(),
|
|
1270
|
+
level,
|
|
1271
|
+
layer,
|
|
1272
|
+
ptr->GetState()
|
|
1273
|
+
);
|
|
1274
1274
|
}
|
|
1275
1275
|
|
|
1276
1276
|
}
|
|
@@ -1294,10 +1294,10 @@ WebGL2RenderingContext::GetActiveUniformBlockName(const v8::FunctionCallbackInfo
|
|
|
1294
1294
|
if (program != nullptr) {
|
|
1295
1295
|
auto uniformBlockIndex = args[1]->Uint32Value(context).ToChecked();
|
|
1296
1296
|
auto name = canvas_native_webgl2_get_active_uniform_block_name(
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1297
|
+
program->GetProgram(),
|
|
1298
|
+
uniformBlockIndex,
|
|
1299
|
+
ptr->GetState()
|
|
1300
|
+
);
|
|
1301
1301
|
args.GetReturnValue().Set(ConvertToV8OneByteString(isolate, (char *) name));
|
|
1302
1302
|
return;
|
|
1303
1303
|
}
|
|
@@ -1308,7 +1308,7 @@ WebGL2RenderingContext::GetActiveUniformBlockName(const v8::FunctionCallbackInfo
|
|
|
1308
1308
|
}
|
|
1309
1309
|
|
|
1310
1310
|
void WebGL2RenderingContext::GetActiveUniformBlockParameter(
|
|
1311
|
-
|
|
1311
|
+
const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
1312
1312
|
WebGL2RenderingContext *ptr = GetPointer(args.This());
|
|
1313
1313
|
if (ptr == nullptr) {
|
|
1314
1314
|
args.GetReturnValue().SetNull();
|
|
@@ -1328,23 +1328,23 @@ void WebGL2RenderingContext::GetActiveUniformBlockParameter(
|
|
|
1328
1328
|
auto uniformBlockIndex = args[1]->Uint32Value(context).ToChecked();
|
|
1329
1329
|
auto pname = args[2]->Uint32Value(context).ToChecked();
|
|
1330
1330
|
auto ret = canvas_native_webgl2_get_active_uniform_block_parameter(
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1331
|
+
program->GetProgram(),
|
|
1332
|
+
uniformBlockIndex,
|
|
1333
|
+
pname,
|
|
1334
|
+
ptr->GetState()
|
|
1335
|
+
);
|
|
1336
1336
|
|
|
1337
1337
|
switch (pname) {
|
|
1338
1338
|
case GL_UNIFORM_BLOCK_BINDING:
|
|
1339
1339
|
case GL_UNIFORM_BLOCK_DATA_SIZE:
|
|
1340
1340
|
case GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS:
|
|
1341
1341
|
args.GetReturnValue().Set(canvas_native_webgl_result_get_i32(
|
|
1342
|
-
|
|
1342
|
+
ret));
|
|
1343
1343
|
canvas_native_webgl_WebGLResult_destroy(ret);
|
|
1344
1344
|
return;
|
|
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);
|
|
@@ -1353,11 +1353,11 @@ void WebGL2RenderingContext::GetActiveUniformBlockParameter(
|
|
|
1353
1353
|
auto store = v8::ArrayBuffer::NewBackingStore(buf, bytes_size,
|
|
1354
1354
|
[](void *data, size_t length,
|
|
1355
1355
|
void *deleter_data) {
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1356
|
+
if (deleter_data != nullptr) {
|
|
1357
|
+
canvas_native_u32_buffer_release(
|
|
1358
|
+
(U32Buffer *) deleter_data);
|
|
1359
|
+
}
|
|
1360
|
+
},
|
|
1361
1361
|
value);
|
|
1362
1362
|
|
|
1363
1363
|
auto arraybuffer = v8::ArrayBuffer::New(isolate, std::move(store));
|
|
@@ -1370,7 +1370,7 @@ void WebGL2RenderingContext::GetActiveUniformBlockParameter(
|
|
|
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;
|
|
@@ -1408,37 +1408,37 @@ void WebGL2RenderingContext::GetActiveUniforms(const v8::FunctionCallbackInfo<v8
|
|
|
1408
1408
|
buf.reserve(size);
|
|
1409
1409
|
for (int j = 0; j < size; j++) {
|
|
1410
1410
|
auto item = uniformIndices->Get(
|
|
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
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1416
|
+
program->GetProgram(),
|
|
1417
|
+
buf.data(), buf.size(),
|
|
1418
|
+
pname,
|
|
1419
|
+
ptr->GetState()
|
|
1420
|
+
);
|
|
1421
1421
|
|
|
1422
1422
|
switch (pname) {
|
|
1423
1423
|
case GL_UNIFORM_TYPE:
|
|
1424
1424
|
case GL_UNIFORM_SIZE: {
|
|
1425
1425
|
auto value = canvas_native_webgl_result_get_u32_array(
|
|
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];
|
|
1436
1436
|
array->Set(
|
|
1437
|
-
|
|
1438
|
-
|
|
1437
|
+
context, j,
|
|
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
|
}
|
|
@@ -1447,41 +1447,41 @@ void WebGL2RenderingContext::GetActiveUniforms(const v8::FunctionCallbackInfo<v8
|
|
|
1447
1447
|
case GL_UNIFORM_ARRAY_STRIDE:
|
|
1448
1448
|
case GL_UNIFORM_MATRIX_STRIDE: {
|
|
1449
1449
|
auto value = canvas_native_webgl_result_get_i32_array(
|
|
1450
|
-
|
|
1450
|
+
ret);
|
|
1451
1451
|
auto len = canvas_native_i32_buffer_get_length(value);
|
|
1452
1452
|
auto buffer = canvas_native_i32_buffer_get_bytes(value);
|
|
1453
1453
|
auto array = v8::Array::New(
|
|
1454
|
-
|
|
1454
|
+
isolate, (int) len);
|
|
1455
1455
|
for (int j = 0;
|
|
1456
1456
|
j < len; ++j) {
|
|
1457
1457
|
auto item = buffer[j];
|
|
1458
1458
|
array->Set(
|
|
1459
|
-
|
|
1460
|
-
|
|
1459
|
+
context, j,
|
|
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
|
}
|
|
1467
1467
|
case GL_UNIFORM_IS_ROW_MAJOR: {
|
|
1468
1468
|
auto value = canvas_native_webgl_result_get_bool_array(
|
|
1469
|
-
|
|
1469
|
+
ret);
|
|
1470
1470
|
auto len = canvas_native_u8_buffer_get_length(value);
|
|
1471
1471
|
auto buffer = canvas_native_u8_buffer_get_bytes(value);
|
|
1472
1472
|
auto array = v8::Array::New(
|
|
1473
|
-
|
|
1474
|
-
|
|
1473
|
+
isolate,
|
|
1474
|
+
(int) len);
|
|
1475
1475
|
for (int j = 0;
|
|
1476
1476
|
j < len; ++j) {
|
|
1477
1477
|
bool item =
|
|
1478
|
-
|
|
1478
|
+
buffer[j] == 1;
|
|
1479
1479
|
array->Set(
|
|
1480
|
-
|
|
1481
|
-
|
|
1480
|
+
context, j,
|
|
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
|
}
|
|
@@ -1520,32 +1520,32 @@ void WebGL2RenderingContext::GetBufferSubData(const v8::FunctionCallbackInfo<v8:
|
|
|
1520
1520
|
|
|
1521
1521
|
|
|
1522
1522
|
auto BYTES_PER_ELEMENT = (ssize_t) array->Get(
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1523
|
+
context,
|
|
1524
|
+
ConvertToV8String(isolate, "BYTES_PER_ELEMENT")).ToLocalChecked()->NumberValue(
|
|
1525
|
+
context).ToChecked();
|
|
1526
1526
|
|
|
1527
1527
|
ssize_t dstOffsetValue = 0;
|
|
1528
1528
|
if (args[3]->IsNumber()) {
|
|
1529
1529
|
dstOffsetValue =
|
|
1530
|
-
|
|
1531
|
-
|
|
1530
|
+
static_cast<ssize_t>(args[3]->NumberValue(context).ToChecked()) *
|
|
1531
|
+
BYTES_PER_ELEMENT;
|
|
1532
1532
|
}
|
|
1533
1533
|
|
|
1534
1534
|
ssize_t lengthValue = 0;
|
|
1535
1535
|
if (args[4]->IsNumber()) {
|
|
1536
1536
|
lengthValue =
|
|
1537
|
-
|
|
1538
|
-
|
|
1537
|
+
static_cast<ssize_t>(args[4]->NumberValue(context).ToChecked()) *
|
|
1538
|
+
BYTES_PER_ELEMENT;
|
|
1539
1539
|
}
|
|
1540
1540
|
|
|
1541
1541
|
canvas_native_webgl2_get_buffer_sub_data(
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1542
|
+
target,
|
|
1543
|
+
static_cast<ssize_t>(srcByteOffset),
|
|
1544
|
+
data, size,
|
|
1545
|
+
dstOffsetValue,
|
|
1546
|
+
lengthValue,
|
|
1547
|
+
ptr->GetState()
|
|
1548
|
+
);
|
|
1549
1549
|
}
|
|
1550
1550
|
}
|
|
1551
1551
|
|
|
@@ -1569,10 +1569,10 @@ void WebGL2RenderingContext::GetFragDataLocation(const v8::FunctionCallbackInfo<
|
|
|
1569
1569
|
auto name = ConvertFromV8String(isolate, nameValue);
|
|
1570
1570
|
|
|
1571
1571
|
auto ret = canvas_native_webgl2_get_frag_data_location(
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1572
|
+
program->GetProgram(),
|
|
1573
|
+
name.c_str(),
|
|
1574
|
+
ptr->GetState()
|
|
1575
|
+
);
|
|
1576
1576
|
|
|
1577
1577
|
args.GetReturnValue().Set(ret);
|
|
1578
1578
|
|
|
@@ -1595,19 +1595,19 @@ void WebGL2RenderingContext::GetIndexedParameter(const v8::FunctionCallbackInfo<
|
|
|
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(
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1598
|
+
target,
|
|
1599
|
+
index,
|
|
1600
|
+
ptr->GetState()
|
|
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
|
}
|
|
1612
1612
|
return;
|
|
1613
1613
|
case GL_TRANSFORM_FEEDBACK_BUFFER_SIZE:
|
|
@@ -1615,7 +1615,7 @@ void WebGL2RenderingContext::GetIndexedParameter(const v8::FunctionCallbackInfo<
|
|
|
1615
1615
|
case GL_UNIFORM_BUFFER_SIZE:
|
|
1616
1616
|
case GL_UNIFORM_BUFFER_START: {
|
|
1617
1617
|
auto value = canvas_native_webgl2_indexed_parameter_get_value(
|
|
1618
|
-
|
|
1618
|
+
ret);
|
|
1619
1619
|
args.GetReturnValue().Set(static_cast<double>(value));
|
|
1620
1620
|
return;
|
|
1621
1621
|
}
|
|
@@ -1627,7 +1627,7 @@ void WebGL2RenderingContext::GetIndexedParameter(const v8::FunctionCallbackInfo<
|
|
|
1627
1627
|
}
|
|
1628
1628
|
|
|
1629
1629
|
void WebGL2RenderingContext::GetInternalformatParameter(
|
|
1630
|
-
|
|
1630
|
+
const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
1631
1631
|
WebGL2RenderingContext *ptr = GetPointer(args.This());
|
|
1632
1632
|
if (ptr == nullptr) {
|
|
1633
1633
|
args.GetReturnValue().SetNull();
|
|
@@ -1699,11 +1699,11 @@ void WebGL2RenderingContext::GetInternalformatParameter(
|
|
|
1699
1699
|
|
|
1700
1700
|
|
|
1701
1701
|
auto ret = canvas_native_webgl2_get_internalformat_parameter(
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1702
|
+
target,
|
|
1703
|
+
internalformat,
|
|
1704
|
+
pname,
|
|
1705
|
+
ptr->GetState()
|
|
1706
|
+
);
|
|
1707
1707
|
|
|
1708
1708
|
if (pname == GL_SAMPLES) {
|
|
1709
1709
|
auto value = canvas_native_webgl_result_get_i32_array(ret);
|
|
@@ -1715,11 +1715,11 @@ void WebGL2RenderingContext::GetInternalformatParameter(
|
|
|
1715
1715
|
auto store = v8::ArrayBuffer::NewBackingStore(buf, bytes_size,
|
|
1716
1716
|
[](void *data, size_t length,
|
|
1717
1717
|
void *deleter_data) {
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1718
|
+
if (deleter_data != nullptr) {
|
|
1719
|
+
canvas_native_i32_buffer_release(
|
|
1720
|
+
(I32Buffer *) deleter_data);
|
|
1721
|
+
}
|
|
1722
|
+
},
|
|
1723
1723
|
value);
|
|
1724
1724
|
|
|
1725
1725
|
auto arraybuffer = v8::ArrayBuffer::New(isolate, std::move(store));
|
|
@@ -1745,20 +1745,20 @@ void WebGL2RenderingContext::GetParameter(const v8::FunctionCallbackInfo<v8::Val
|
|
|
1745
1745
|
|
|
1746
1746
|
auto pname = args[0]->Uint32Value(context).ToChecked();
|
|
1747
1747
|
auto result = canvas_native_webgl2_get_parameter(
|
|
1748
|
-
|
|
1749
|
-
|
|
1748
|
+
pname,
|
|
1749
|
+
ptr->GetState());
|
|
1750
1750
|
switch (pname) {
|
|
1751
1751
|
case GL_COPY_READ_BUFFER_BINDING:
|
|
1752
1752
|
case GL_COPY_WRITE_BUFFER_BINDING:
|
|
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
|
|
|
@@ -1787,18 +1787,18 @@ void WebGL2RenderingContext::GetQueryParameter(const v8::FunctionCallbackInfo<v8
|
|
|
1787
1787
|
|
|
1788
1788
|
|
|
1789
1789
|
auto ret = canvas_native_webgl2_get_query_parameter(
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1790
|
+
query->GetQuery(),
|
|
1791
|
+
pname,
|
|
1792
|
+
ptr->GetState());
|
|
1793
1793
|
if (pname == GL_QUERY_RESULT) {
|
|
1794
1794
|
args.GetReturnValue().Set(canvas_native_webgl_result_get_bool(
|
|
1795
|
-
|
|
1795
|
+
ret));
|
|
1796
1796
|
canvas_native_webgl_WebGLResult_destroy(ret);
|
|
1797
1797
|
return;
|
|
1798
1798
|
} else if (pname ==
|
|
1799
1799
|
GL_QUERY_RESULT_AVAILABLE) {
|
|
1800
1800
|
args.GetReturnValue().Set(canvas_native_webgl_result_get_u32(
|
|
1801
|
-
|
|
1801
|
+
ret));
|
|
1802
1802
|
canvas_native_webgl_WebGLResult_destroy(ret);
|
|
1803
1803
|
return;
|
|
1804
1804
|
}
|
|
@@ -1824,12 +1824,12 @@ void WebGL2RenderingContext::GetQuery(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
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(
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1827
|
+
target,
|
|
1828
|
+
pname,
|
|
1829
|
+
ptr->GetState());
|
|
1830
1830
|
if (pname == GL_CURRENT_QUERY) {
|
|
1831
1831
|
args.GetReturnValue().Set(canvas_native_webgl_result_get_i32(
|
|
1832
|
-
|
|
1832
|
+
ret));
|
|
1833
1833
|
canvas_native_webgl_WebGLResult_destroy(ret);
|
|
1834
1834
|
return;
|
|
1835
1835
|
}
|
|
@@ -1854,16 +1854,16 @@ void WebGL2RenderingContext::GetSamplerParameter(const v8::FunctionCallbackInfo<
|
|
|
1854
1854
|
if (sampler != nullptr) {
|
|
1855
1855
|
auto pname = args[1]->Uint32Value(context).ToChecked();
|
|
1856
1856
|
auto ret = canvas_native_webgl2_get_sampler_parameter(
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1857
|
+
sampler->GetSampler(),
|
|
1858
|
+
pname,
|
|
1859
|
+
ptr->GetState());
|
|
1860
1860
|
|
|
1861
1861
|
switch (pname) {
|
|
1862
1862
|
case GL_TEXTURE_MAX_LOD:
|
|
1863
1863
|
case GL_TEXTURE_MIN_LOD:
|
|
1864
1864
|
args.GetReturnValue().Set(
|
|
1865
|
-
|
|
1866
|
-
|
|
1865
|
+
static_cast<double>(canvas_native_webgl_result_get_f32(
|
|
1866
|
+
ret)));
|
|
1867
1867
|
canvas_native_webgl_WebGLResult_destroy(ret);
|
|
1868
1868
|
return;
|
|
1869
1869
|
case GL_TEXTURE_COMPARE_FUNC:
|
|
@@ -1874,7 +1874,7 @@ void WebGL2RenderingContext::GetSamplerParameter(const v8::FunctionCallbackInfo<
|
|
|
1874
1874
|
case GL_TEXTURE_WRAP_S:
|
|
1875
1875
|
case GL_TEXTURE_WRAP_T:
|
|
1876
1876
|
args.GetReturnValue().Set(canvas_native_webgl_result_get_i32(
|
|
1877
|
-
|
|
1877
|
+
ret));
|
|
1878
1878
|
canvas_native_webgl_WebGLResult_destroy(ret);
|
|
1879
1879
|
return;
|
|
1880
1880
|
default:
|
|
@@ -1903,9 +1903,9 @@ void WebGL2RenderingContext::GetSyncParameter(const v8::FunctionCallbackInfo<v8:
|
|
|
1903
1903
|
if (sync != nullptr) {
|
|
1904
1904
|
auto pname = args[1]->Uint32Value(context).ToChecked();
|
|
1905
1905
|
auto ret = canvas_native_webgl2_get_sync_parameter(
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1906
|
+
sync->GetSync(),
|
|
1907
|
+
pname,
|
|
1908
|
+
ptr->GetState());
|
|
1909
1909
|
|
|
1910
1910
|
switch (pname) {
|
|
1911
1911
|
case GL_OBJECT_TYPE:
|
|
@@ -1913,7 +1913,7 @@ void WebGL2RenderingContext::GetSyncParameter(const v8::FunctionCallbackInfo<v8:
|
|
|
1913
1913
|
case GL_SYNC_CONDITION:
|
|
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;
|
|
@@ -1927,7 +1927,7 @@ void WebGL2RenderingContext::GetSyncParameter(const v8::FunctionCallbackInfo<v8:
|
|
|
1927
1927
|
}
|
|
1928
1928
|
|
|
1929
1929
|
void WebGL2RenderingContext::GetTransformFeedbackVarying(
|
|
1930
|
-
|
|
1930
|
+
const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
1931
1931
|
WebGL2RenderingContext *ptr = GetPointer(args.This());
|
|
1932
1932
|
if (ptr == nullptr) {
|
|
1933
1933
|
args.GetReturnValue().SetNull();
|
|
@@ -1944,17 +1944,17 @@ void WebGL2RenderingContext::GetTransformFeedbackVarying(
|
|
|
1944
1944
|
auto index = args[1]->Uint32Value(context).ToChecked();
|
|
1945
1945
|
if (program != nullptr) {
|
|
1946
1946
|
auto ret = canvas_native_webgl2_get_transform_feedback_varying(
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1947
|
+
program->GetProgram(),
|
|
1948
|
+
index,
|
|
1949
|
+
ptr->GetState()
|
|
1950
|
+
);
|
|
1951
1951
|
|
|
1952
1952
|
if (canvas_native_webgl_active_info_get_is_empty(
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1953
|
+
ret)) {
|
|
1954
|
+
canvas_native_webgl_active_info_destroy(ret);
|
|
1955
|
+
args.GetReturnValue().SetNull();
|
|
1956
|
+
return;
|
|
1957
|
+
}
|
|
1958
1958
|
|
|
1959
1959
|
auto info = WebGLActiveInfoImpl::NewInstance(isolate, new WebGLActiveInfoImpl(ret));
|
|
1960
1960
|
args.GetReturnValue().Set(info);
|
|
@@ -1982,9 +1982,9 @@ void WebGL2RenderingContext::GetUniformBlockIndex(const v8::FunctionCallbackInfo
|
|
|
1982
1982
|
auto index = ConvertFromV8String(isolate, args[1]);
|
|
1983
1983
|
if (program != nullptr) {
|
|
1984
1984
|
auto ret = canvas_native_webgl2_get_uniform_block_index(
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1985
|
+
program->GetProgram(),
|
|
1986
|
+
index.c_str(),
|
|
1987
|
+
ptr->GetState());
|
|
1988
1988
|
args.GetReturnValue().Set((int) ret);
|
|
1989
1989
|
return;
|
|
1990
1990
|
}
|
|
@@ -2018,7 +2018,7 @@ void WebGL2RenderingContext::GetUniformIndices(const v8::FunctionCallbackInfo<v8
|
|
|
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
|
}
|
|
@@ -2031,10 +2031,10 @@ void WebGL2RenderingContext::GetUniformIndices(const v8::FunctionCallbackInfo<v8
|
|
|
2031
2031
|
|
|
2032
2032
|
|
|
2033
2033
|
auto ret = canvas_native_webgl2_get_uniform_indices(
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2034
|
+
program->GetProgram(),
|
|
2035
|
+
cStrings,
|
|
2036
|
+
store.size(),
|
|
2037
|
+
ptr->GetState());
|
|
2038
2038
|
|
|
2039
2039
|
|
|
2040
2040
|
auto retSize = canvas_native_u32_buffer_get_length(ret);
|
|
@@ -2048,7 +2048,7 @@ void WebGL2RenderingContext::GetUniformIndices(const v8::FunctionCallbackInfo<v8
|
|
|
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
|
}
|
|
@@ -2076,13 +2076,13 @@ WebGL2RenderingContext::InvalidateFramebuffer(const v8::FunctionCallbackInfo<v8:
|
|
|
2076
2076
|
buf.reserve(len);
|
|
2077
2077
|
for (int j = 0; j < len; ++j) {
|
|
2078
2078
|
auto item = array->Get(
|
|
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
|
-
|
|
2085
|
-
|
|
2084
|
+
target, buf.data(), buf.size(),
|
|
2085
|
+
ptr->GetState());
|
|
2086
2086
|
}
|
|
2087
2087
|
}
|
|
2088
2088
|
|
|
@@ -2110,18 +2110,18 @@ WebGL2RenderingContext::InvalidateSubFramebuffer(const v8::FunctionCallbackInfo<
|
|
|
2110
2110
|
buf.reserve(len);
|
|
2111
2111
|
for (int j = 0; j < len; ++j) {
|
|
2112
2112
|
auto item = array->Get(
|
|
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
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2118
|
+
target,
|
|
2119
|
+
buf.data(), buf.size(),
|
|
2120
|
+
x,
|
|
2121
|
+
y,
|
|
2122
|
+
width,
|
|
2123
|
+
height,
|
|
2124
|
+
ptr->GetState());
|
|
2125
2125
|
}
|
|
2126
2126
|
}
|
|
2127
2127
|
|
|
@@ -2140,8 +2140,8 @@ void WebGL2RenderingContext::IsQuery(const v8::FunctionCallbackInfo<v8::Value> &
|
|
|
2140
2140
|
auto query = WebGLQuery::GetPointer(value.As<v8::Object>());
|
|
2141
2141
|
if (query != nullptr) {
|
|
2142
2142
|
auto ret = canvas_native_webgl2_is_query(
|
|
2143
|
-
|
|
2144
|
-
|
|
2143
|
+
query->GetQuery(),
|
|
2144
|
+
ptr->GetState());
|
|
2145
2145
|
args.GetReturnValue().Set(ret);
|
|
2146
2146
|
return;
|
|
2147
2147
|
}
|
|
@@ -2165,8 +2165,8 @@ void WebGL2RenderingContext::IsSampler(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
2165
2165
|
auto query = WebGLSampler::GetPointer(value.As<v8::Object>());
|
|
2166
2166
|
if (query != nullptr) {
|
|
2167
2167
|
auto ret = canvas_native_webgl2_is_sampler(
|
|
2168
|
-
|
|
2169
|
-
|
|
2168
|
+
query->GetSampler(),
|
|
2169
|
+
ptr->GetState());
|
|
2170
2170
|
args.GetReturnValue().Set(ret);
|
|
2171
2171
|
return;
|
|
2172
2172
|
}
|
|
@@ -2190,8 +2190,8 @@ void WebGL2RenderingContext::IsSync(const v8::FunctionCallbackInfo<v8::Value> &a
|
|
|
2190
2190
|
auto query = WebGLSyncImpl::GetPointer(value.As<v8::Object>());
|
|
2191
2191
|
if (query != nullptr) {
|
|
2192
2192
|
auto ret = canvas_native_webgl2_is_sync(
|
|
2193
|
-
|
|
2194
|
-
|
|
2193
|
+
query->GetSync(),
|
|
2194
|
+
ptr->GetState());
|
|
2195
2195
|
args.GetReturnValue().Set(ret);
|
|
2196
2196
|
return;
|
|
2197
2197
|
}
|
|
@@ -2215,8 +2215,8 @@ void WebGL2RenderingContext::IsTransformFeedback(const v8::FunctionCallbackInfo<
|
|
|
2215
2215
|
auto query = WebGLTransformFeedback::GetPointer(value.As<v8::Object>());
|
|
2216
2216
|
if (query != nullptr) {
|
|
2217
2217
|
auto ret = canvas_native_webgl2_is_transform_feedback(
|
|
2218
|
-
|
|
2219
|
-
|
|
2218
|
+
query->GetFeedback(),
|
|
2219
|
+
ptr->GetState());
|
|
2220
2220
|
args.GetReturnValue().Set(ret);
|
|
2221
2221
|
return;
|
|
2222
2222
|
}
|
|
@@ -2240,8 +2240,8 @@ void WebGL2RenderingContext::IsVertexArray(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2240
2240
|
auto query = WebGLVertexArrayObject::GetPointer(value.As<v8::Object>());
|
|
2241
2241
|
if (query != nullptr) {
|
|
2242
2242
|
auto ret = canvas_native_webgl2_is_vertex_array(
|
|
2243
|
-
|
|
2244
|
-
|
|
2243
|
+
query->GetVertexArrayObject(),
|
|
2244
|
+
ptr->GetState());
|
|
2245
2245
|
args.GetReturnValue().Set(ret);
|
|
2246
2246
|
return;
|
|
2247
2247
|
}
|
|
@@ -2257,7 +2257,7 @@ WebGL2RenderingContext::PauseTransformFeedback(const v8::FunctionCallbackInfo<v8
|
|
|
2257
2257
|
return;
|
|
2258
2258
|
}
|
|
2259
2259
|
canvas_native_webgl2_pause_transform_feedback(
|
|
2260
|
-
|
|
2260
|
+
ptr->GetState());
|
|
2261
2261
|
}
|
|
2262
2262
|
|
|
2263
2263
|
void WebGL2RenderingContext::ReadBuffer(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -2271,13 +2271,13 @@ void WebGL2RenderingContext::ReadBuffer(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2271
2271
|
|
|
2272
2272
|
auto src = args[0]->Uint32Value(context).ToChecked();
|
|
2273
2273
|
canvas_native_webgl2_read_buffer(
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2274
|
+
src,
|
|
2275
|
+
ptr->GetState()
|
|
2276
|
+
);
|
|
2277
2277
|
}
|
|
2278
2278
|
|
|
2279
2279
|
void WebGL2RenderingContext::RenderbufferStorageMultisample(
|
|
2280
|
-
|
|
2280
|
+
const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
2281
2281
|
WebGL2RenderingContext *ptr = GetPointer(args.This());
|
|
2282
2282
|
if (ptr == nullptr) {
|
|
2283
2283
|
return;
|
|
@@ -2292,13 +2292,13 @@ void WebGL2RenderingContext::RenderbufferStorageMultisample(
|
|
|
2292
2292
|
auto width = args[3]->Int32Value(context).ToChecked();
|
|
2293
2293
|
auto height = args[4]->Int32Value(context).ToChecked();
|
|
2294
2294
|
canvas_native_webgl2_renderbuffer_storage_multisample(
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2295
|
+
target,
|
|
2296
|
+
samples,
|
|
2297
|
+
internalFormat,
|
|
2298
|
+
width,
|
|
2299
|
+
height,
|
|
2300
|
+
ptr->GetState()
|
|
2301
|
+
);
|
|
2302
2302
|
}
|
|
2303
2303
|
|
|
2304
2304
|
void
|
|
@@ -2309,7 +2309,7 @@ WebGL2RenderingContext::ResumeTransformFeedback(const v8::FunctionCallbackInfo<v
|
|
|
2309
2309
|
}
|
|
2310
2310
|
|
|
2311
2311
|
canvas_native_webgl2_resume_transform_feedback(
|
|
2312
|
-
|
|
2312
|
+
ptr->GetState());
|
|
2313
2313
|
}
|
|
2314
2314
|
|
|
2315
2315
|
void WebGL2RenderingContext::SamplerParameterf(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -2329,10 +2329,10 @@ void WebGL2RenderingContext::SamplerParameterf(const v8::FunctionCallbackInfo<v8
|
|
|
2329
2329
|
auto param = args[2]->NumberValue(context).ToChecked();
|
|
2330
2330
|
if (sampler != nullptr) {
|
|
2331
2331
|
canvas_native_webgl2_sampler_parameterf(
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2332
|
+
sampler->GetSampler(),
|
|
2333
|
+
pname,
|
|
2334
|
+
static_cast<float>(param),
|
|
2335
|
+
ptr->GetState());
|
|
2336
2336
|
}
|
|
2337
2337
|
}
|
|
2338
2338
|
|
|
@@ -2355,10 +2355,10 @@ void WebGL2RenderingContext::SamplerParameteri(const v8::FunctionCallbackInfo<v8
|
|
|
2355
2355
|
auto param = args[2]->Int32Value(context).ToChecked();
|
|
2356
2356
|
if (sampler != nullptr) {
|
|
2357
2357
|
canvas_native_webgl2_sampler_parameteri(
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2358
|
+
sampler->GetSampler(),
|
|
2359
|
+
pname,
|
|
2360
|
+
param,
|
|
2361
|
+
ptr->GetState());
|
|
2362
2362
|
}
|
|
2363
2363
|
}
|
|
2364
2364
|
|
|
@@ -2378,42 +2378,42 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2378
2378
|
|
|
2379
2379
|
if (count == 10) {
|
|
2380
2380
|
auto target = args[0]->Int32Value(
|
|
2381
|
-
|
|
2381
|
+
context).ToChecked();
|
|
2382
2382
|
auto level = args[1]->Int32Value(
|
|
2383
|
-
|
|
2383
|
+
context).ToChecked();
|
|
2384
2384
|
auto internalformat = args[2]->Int32Value(
|
|
2385
|
-
|
|
2385
|
+
context).ToChecked();
|
|
2386
2386
|
auto width = args[3]->Int32Value(
|
|
2387
|
-
|
|
2387
|
+
context).ToChecked();
|
|
2388
2388
|
auto height = args[4]->Int32Value(
|
|
2389
|
-
|
|
2389
|
+
context).ToChecked();
|
|
2390
2390
|
auto depth = args[5]->Int32Value(
|
|
2391
|
-
|
|
2391
|
+
context).ToChecked();
|
|
2392
2392
|
auto border = args[6]->Int32Value(
|
|
2393
|
-
|
|
2393
|
+
context).ToChecked();
|
|
2394
2394
|
auto format = args[7]->Int32Value(
|
|
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();
|
|
2404
2404
|
canvas_native_webgl2_tex_image3d_none(
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2405
|
+
target,
|
|
2406
|
+
level,
|
|
2407
|
+
internalformat,
|
|
2408
|
+
width,
|
|
2409
|
+
height,
|
|
2410
|
+
depth,
|
|
2411
|
+
border,
|
|
2412
|
+
format,
|
|
2413
|
+
type,
|
|
2414
|
+
static_cast<ssize_t>(offset),
|
|
2415
|
+
ptr->GetState()
|
|
2416
|
+
);
|
|
2417
2417
|
return;
|
|
2418
2418
|
}
|
|
2419
2419
|
|
|
@@ -2427,44 +2427,65 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
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
|
-
|
|
2431
2430
|
canvas_native_webgl2_tex_image3d(
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2431
|
+
target,
|
|
2432
|
+
level,
|
|
2433
|
+
internalformat,
|
|
2434
|
+
width,
|
|
2435
|
+
height,
|
|
2436
|
+
depth,
|
|
2437
|
+
border,
|
|
2438
|
+
format,
|
|
2439
|
+
type,
|
|
2440
|
+
data,
|
|
2441
|
+
size,
|
|
2442
|
+
ptr->GetState()
|
|
2443
|
+
);
|
|
2445
2444
|
return;
|
|
2446
2445
|
}
|
|
2447
2446
|
|
|
2448
2447
|
auto imageType = GetNativeType(imageOrPixelsOrOffset);
|
|
2449
2448
|
|
|
2450
2449
|
switch (imageType) {
|
|
2450
|
+
case NativeType::CanvasRenderingContext2D: {
|
|
2451
|
+
auto canvas2d = CanvasRenderingContext2DImpl::GetPointer(imageOrPixelsOrOffset.As<v8::Object>());
|
|
2452
|
+
|
|
2453
|
+
if (canvas2d != nullptr) {
|
|
2454
|
+
canvas_native_webgl2_tex_image3d_canvas2d(
|
|
2455
|
+
target,
|
|
2456
|
+
level,
|
|
2457
|
+
internalformat,
|
|
2458
|
+
width,
|
|
2459
|
+
height,
|
|
2460
|
+
depth,
|
|
2461
|
+
border,
|
|
2462
|
+
format,
|
|
2463
|
+
type,
|
|
2464
|
+
canvas2d->GetContext(),
|
|
2465
|
+
ptr->GetState()
|
|
2466
|
+
);
|
|
2467
|
+
|
|
2468
|
+
return;
|
|
2469
|
+
}
|
|
2470
|
+
return;
|
|
2471
|
+
}
|
|
2451
2472
|
case NativeType::ImageAsset: {
|
|
2452
2473
|
auto image_asset = ImageAssetImpl::GetPointer(
|
|
2453
|
-
|
|
2474
|
+
imageOrPixelsOrOffset.As<v8::Object>());
|
|
2454
2475
|
if (image_asset != nullptr) {
|
|
2455
2476
|
canvas_native_webgl2_tex_image3d_asset(
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2477
|
+
target,
|
|
2478
|
+
level,
|
|
2479
|
+
internalformat,
|
|
2480
|
+
width,
|
|
2481
|
+
height,
|
|
2482
|
+
depth,
|
|
2483
|
+
border,
|
|
2484
|
+
format,
|
|
2485
|
+
type,
|
|
2486
|
+
image_asset->GetImageAsset(),
|
|
2487
|
+
ptr->GetState()
|
|
2488
|
+
);
|
|
2468
2489
|
|
|
2469
2490
|
return;
|
|
2470
2491
|
}
|
|
@@ -2472,56 +2493,81 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2472
2493
|
}
|
|
2473
2494
|
case NativeType::ImageBitmap: {
|
|
2474
2495
|
auto image_bitmap = ImageBitmapImpl::GetPointer(
|
|
2475
|
-
|
|
2496
|
+
imageOrPixelsOrOffset.As<v8::Object>());
|
|
2476
2497
|
if (image_bitmap != nullptr) {
|
|
2477
2498
|
canvas_native_webgl2_tex_image3d_asset(
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2499
|
+
target,
|
|
2500
|
+
level,
|
|
2501
|
+
internalformat,
|
|
2502
|
+
width,
|
|
2503
|
+
height,
|
|
2504
|
+
depth,
|
|
2505
|
+
border,
|
|
2506
|
+
format,
|
|
2507
|
+
type,
|
|
2508
|
+
image_bitmap->GetImageAsset(),
|
|
2509
|
+
ptr->GetState()
|
|
2510
|
+
);
|
|
2490
2511
|
|
|
2491
2512
|
return;
|
|
2492
2513
|
}
|
|
2493
2514
|
return;
|
|
2494
2515
|
}
|
|
2516
|
+
case NativeType::ImageData: {
|
|
2517
|
+
auto image_data = ImageDataImpl::GetPointer(imageOrPixelsOrOffset.As<v8::Object>());
|
|
2518
|
+
if (image_data != nullptr) {
|
|
2519
|
+
auto width = canvas_native_image_data_get_width(image_data->GetImageData());
|
|
2520
|
+
auto height = canvas_native_image_data_get_height(image_data->GetImageData());
|
|
2521
|
+
auto buffer = canvas_native_image_data_get_data(image_data->GetImageData());
|
|
2522
|
+
auto size = canvas_native_u8_buffer_get_length(buffer);
|
|
2523
|
+
auto data = canvas_native_u8_buffer_get_bytes(buffer);
|
|
2524
|
+
canvas_native_webgl2_tex_image3d(
|
|
2525
|
+
target,
|
|
2526
|
+
level,
|
|
2527
|
+
internalformat,
|
|
2528
|
+
width,
|
|
2529
|
+
height,
|
|
2530
|
+
depth,
|
|
2531
|
+
border,
|
|
2532
|
+
format,
|
|
2533
|
+
GL_RGBA,
|
|
2534
|
+
data,
|
|
2535
|
+
size,
|
|
2536
|
+
ptr->GetState()
|
|
2537
|
+
);
|
|
2538
|
+
}
|
|
2539
|
+
|
|
2540
|
+
}
|
|
2495
2541
|
default:
|
|
2496
2542
|
return;
|
|
2497
2543
|
}
|
|
2498
2544
|
} else if (args.Length() > 10) {
|
|
2499
2545
|
|
|
2500
2546
|
auto target = args[0]->Int32Value(
|
|
2501
|
-
|
|
2547
|
+
context).ToChecked();
|
|
2502
2548
|
auto level = args[1]->Int32Value(
|
|
2503
|
-
|
|
2549
|
+
context).ToChecked();
|
|
2504
2550
|
auto internalformat = args[2]->Int32Value(
|
|
2505
|
-
|
|
2551
|
+
context).ToChecked();
|
|
2506
2552
|
auto width = args[3]->Int32Value(
|
|
2507
|
-
|
|
2553
|
+
context).ToChecked();
|
|
2508
2554
|
auto height = args[4]->Int32Value(
|
|
2509
|
-
|
|
2555
|
+
context).ToChecked();
|
|
2510
2556
|
auto depth = args[5]->Int32Value(
|
|
2511
|
-
|
|
2557
|
+
context).ToChecked();
|
|
2512
2558
|
auto border = args[6]->Int32Value(
|
|
2513
|
-
|
|
2559
|
+
context).ToChecked();
|
|
2514
2560
|
auto format = args[7]->Int32Value(
|
|
2515
|
-
|
|
2561
|
+
context).ToChecked();
|
|
2516
2562
|
auto type = args[8]->Uint32Value(
|
|
2517
|
-
|
|
2563
|
+
context).ToChecked();
|
|
2518
2564
|
|
|
2519
2565
|
auto imageOrPixelsOrOffset = args[9];
|
|
2520
2566
|
|
|
2521
2567
|
size_t srcOffsetValue = 0;
|
|
2522
2568
|
if (args[9]->IsNumber()) {
|
|
2523
2569
|
srcOffsetValue = static_cast<size_t>(args[9]->NumberValue(
|
|
2524
|
-
|
|
2570
|
+
context).ToChecked());
|
|
2525
2571
|
}
|
|
2526
2572
|
|
|
2527
2573
|
if (imageOrPixelsOrOffset->IsArrayBufferView()) {
|
|
@@ -2534,26 +2580,26 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2534
2580
|
auto data = static_cast<uint8_t *>((void *) data_ptr);
|
|
2535
2581
|
|
|
2536
2582
|
srcOffsetValue =
|
|
2537
|
-
|
|
2583
|
+
srcOffsetValue * size;
|
|
2538
2584
|
if (srcOffsetValue >
|
|
2539
2585
|
size) {
|
|
2540
2586
|
return;
|
|
2541
2587
|
}
|
|
2542
2588
|
|
|
2543
2589
|
canvas_native_webgl2_tex_image3d_offset(
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2590
|
+
target,
|
|
2591
|
+
level,
|
|
2592
|
+
internalformat,
|
|
2593
|
+
width,
|
|
2594
|
+
height,
|
|
2595
|
+
depth,
|
|
2596
|
+
border,
|
|
2597
|
+
format,
|
|
2598
|
+
type,
|
|
2599
|
+
data, size,
|
|
2600
|
+
srcOffsetValue,
|
|
2601
|
+
ptr->GetState()
|
|
2602
|
+
);
|
|
2557
2603
|
return;
|
|
2558
2604
|
}
|
|
2559
2605
|
|
|
@@ -2570,23 +2616,23 @@ void WebGL2RenderingContext::TexStorage2D(const v8::FunctionCallbackInfo<v8::Val
|
|
|
2570
2616
|
auto context = isolate->GetCurrentContext();
|
|
2571
2617
|
|
|
2572
2618
|
auto target = args[0]->Uint32Value(
|
|
2573
|
-
|
|
2619
|
+
context).ToChecked();
|
|
2574
2620
|
auto levels = args[1]->Int32Value(
|
|
2575
|
-
|
|
2621
|
+
context).ToChecked();
|
|
2576
2622
|
auto internalFormat = args[2]->Uint32Value(
|
|
2577
|
-
|
|
2623
|
+
context).ToChecked();
|
|
2578
2624
|
auto width = args[3]->Int32Value(
|
|
2579
|
-
|
|
2625
|
+
context).ToChecked();
|
|
2580
2626
|
auto height = args[4]->Int32Value(
|
|
2581
|
-
|
|
2627
|
+
context).ToChecked();
|
|
2582
2628
|
canvas_native_webgl2_tex_storage2d(
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2629
|
+
target,
|
|
2630
|
+
levels,
|
|
2631
|
+
internalFormat,
|
|
2632
|
+
width,
|
|
2633
|
+
height,
|
|
2634
|
+
ptr->GetState()
|
|
2635
|
+
);
|
|
2590
2636
|
}
|
|
2591
2637
|
|
|
2592
2638
|
void WebGL2RenderingContext::TexStorage3D(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -2599,26 +2645,26 @@ void WebGL2RenderingContext::TexStorage3D(const v8::FunctionCallbackInfo<v8::Val
|
|
|
2599
2645
|
auto context = isolate->GetCurrentContext();
|
|
2600
2646
|
|
|
2601
2647
|
auto target = args[0]->Uint32Value(
|
|
2602
|
-
|
|
2648
|
+
context).ToChecked();
|
|
2603
2649
|
auto levels = args[1]->Int32Value(
|
|
2604
|
-
|
|
2650
|
+
context).ToChecked();
|
|
2605
2651
|
auto internalFormat = args[2]->Uint32Value(
|
|
2606
|
-
|
|
2652
|
+
context).ToChecked();
|
|
2607
2653
|
auto width = args[3]->Int32Value(
|
|
2608
|
-
|
|
2654
|
+
context).ToChecked();
|
|
2609
2655
|
auto height = args[4]->Int32Value(
|
|
2610
|
-
|
|
2656
|
+
context).ToChecked();
|
|
2611
2657
|
auto depth = args[5]->Int32Value(
|
|
2612
|
-
|
|
2658
|
+
context).ToChecked();
|
|
2613
2659
|
canvas_native_webgl2_tex_storage3d(
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2660
|
+
target,
|
|
2661
|
+
levels,
|
|
2662
|
+
internalFormat,
|
|
2663
|
+
width,
|
|
2664
|
+
height,
|
|
2665
|
+
depth,
|
|
2666
|
+
ptr->GetState()
|
|
2667
|
+
);
|
|
2622
2668
|
}
|
|
2623
2669
|
|
|
2624
2670
|
void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -2633,43 +2679,43 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2633
2679
|
auto count = args.Length();
|
|
2634
2680
|
if (count == 11) {
|
|
2635
2681
|
auto target = args[0]->Uint32Value(
|
|
2636
|
-
|
|
2682
|
+
context).ToChecked();
|
|
2637
2683
|
auto level = args[1]->Int32Value(
|
|
2638
|
-
|
|
2684
|
+
context).ToChecked();
|
|
2639
2685
|
auto xoffset = args[2]->Int32Value(
|
|
2640
|
-
|
|
2686
|
+
context).ToChecked();
|
|
2641
2687
|
auto yoffset = args[3]->Int32Value(
|
|
2642
|
-
|
|
2688
|
+
context).ToChecked();
|
|
2643
2689
|
auto zoffset = args[4]->Int32Value(
|
|
2644
|
-
|
|
2690
|
+
context).ToChecked();
|
|
2645
2691
|
auto width = args[5]->Int32Value(
|
|
2646
|
-
|
|
2692
|
+
context).ToChecked();
|
|
2647
2693
|
auto height = args[6]->Int32Value(
|
|
2648
|
-
|
|
2694
|
+
context).ToChecked();
|
|
2649
2695
|
auto depth = args[7]->Int32Value(
|
|
2650
|
-
|
|
2696
|
+
context).ToChecked();
|
|
2651
2697
|
auto format = args[8]->Uint32Value(
|
|
2652
|
-
|
|
2698
|
+
context).ToChecked();
|
|
2653
2699
|
auto type = args[9]->Uint32Value(
|
|
2654
|
-
|
|
2700
|
+
context).ToChecked();
|
|
2655
2701
|
|
|
2656
2702
|
if (args[10]->IsNumber()) {
|
|
2657
2703
|
auto imageOrPixelsOrOffset = args[10]->NumberValue(
|
|
2658
|
-
|
|
2704
|
+
context).ToChecked();
|
|
2659
2705
|
canvas_native_webgl2_tex_sub_image3d_none(
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2706
|
+
target,
|
|
2707
|
+
level,
|
|
2708
|
+
xoffset,
|
|
2709
|
+
yoffset,
|
|
2710
|
+
zoffset,
|
|
2711
|
+
width,
|
|
2712
|
+
height,
|
|
2713
|
+
depth,
|
|
2714
|
+
format,
|
|
2715
|
+
type,
|
|
2716
|
+
static_cast<ssize_t>(imageOrPixelsOrOffset),
|
|
2717
|
+
ptr->GetState()
|
|
2718
|
+
);
|
|
2673
2719
|
return;
|
|
2674
2720
|
}
|
|
2675
2721
|
|
|
@@ -2686,19 +2732,19 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2686
2732
|
|
|
2687
2733
|
|
|
2688
2734
|
canvas_native_webgl2_tex_sub_image3d(
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2735
|
+
target,
|
|
2736
|
+
level,
|
|
2737
|
+
xoffset,
|
|
2738
|
+
yoffset,
|
|
2739
|
+
zoffset,
|
|
2740
|
+
width,
|
|
2741
|
+
height,
|
|
2742
|
+
depth,
|
|
2743
|
+
format,
|
|
2744
|
+
type,
|
|
2745
|
+
data, size,
|
|
2746
|
+
ptr->GetState()
|
|
2747
|
+
);
|
|
2702
2748
|
|
|
2703
2749
|
return;
|
|
2704
2750
|
}
|
|
@@ -2706,54 +2752,115 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2706
2752
|
|
|
2707
2753
|
auto imageType = GetNativeType(imageOrPixelsOrOffsetObject);
|
|
2708
2754
|
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2755
|
+
|
|
2756
|
+
switch (imageType) {
|
|
2757
|
+
case NativeType::ImageAsset:
|
|
2758
|
+
{
|
|
2759
|
+
auto asset = ImageAssetImpl::GetPointer(imageOrPixelsOrOffsetObject.As<v8::Object>());
|
|
2760
|
+
if (asset != nullptr) {
|
|
2761
|
+
|
|
2762
|
+
canvas_native_webgl2_tex_sub_image3d_asset(
|
|
2763
|
+
target,
|
|
2764
|
+
level,
|
|
2765
|
+
xoffset,
|
|
2766
|
+
yoffset,
|
|
2767
|
+
zoffset,
|
|
2768
|
+
width,
|
|
2769
|
+
height,
|
|
2770
|
+
depth,
|
|
2771
|
+
format,
|
|
2772
|
+
type,
|
|
2773
|
+
asset->GetImageAsset(),
|
|
2774
|
+
ptr->GetState()
|
|
2775
|
+
);
|
|
2776
|
+
}
|
|
2777
|
+
}
|
|
2778
|
+
break;
|
|
2779
|
+
|
|
2780
|
+
case NativeType::CanvasRenderingContext2D: {
|
|
2781
|
+
auto canvas2d = CanvasRenderingContext2DImpl::GetPointer(imageOrPixelsOrOffsetObject.As<v8::Object>());
|
|
2782
|
+
|
|
2783
|
+
if (canvas2d != nullptr) {
|
|
2784
|
+
canvas_native_webgl2_tex_sub_image3d_canvas2d(
|
|
2785
|
+
target,
|
|
2786
|
+
level,
|
|
2787
|
+
xoffset,
|
|
2788
|
+
yoffset,
|
|
2789
|
+
zoffset,
|
|
2790
|
+
width,
|
|
2791
|
+
height,
|
|
2792
|
+
depth,
|
|
2793
|
+
format,
|
|
2794
|
+
type,
|
|
2795
|
+
canvas2d->GetContext(),
|
|
2796
|
+
ptr->GetState()
|
|
2797
|
+
);
|
|
2798
|
+
|
|
2799
|
+
return;
|
|
2800
|
+
}
|
|
2801
|
+
return;
|
|
2727
2802
|
}
|
|
2803
|
+
case NativeType::ImageData: {
|
|
2804
|
+
auto image_data = ImageDataImpl::GetPointer(imageOrPixelsOrOffsetObject.As<v8::Object>());
|
|
2805
|
+
if (image_data != nullptr) {
|
|
2806
|
+
auto width = canvas_native_image_data_get_width(image_data->GetImageData());
|
|
2807
|
+
auto height = canvas_native_image_data_get_height(image_data->GetImageData());
|
|
2808
|
+
auto buffer = canvas_native_image_data_get_data(image_data->GetImageData());
|
|
2809
|
+
auto size = canvas_native_u8_buffer_get_length(buffer);
|
|
2810
|
+
auto data = canvas_native_u8_buffer_get_bytes(buffer);
|
|
2811
|
+
canvas_native_webgl2_tex_sub_image3d(
|
|
2812
|
+
target,
|
|
2813
|
+
level,
|
|
2814
|
+
xoffset,
|
|
2815
|
+
yoffset,
|
|
2816
|
+
zoffset,
|
|
2817
|
+
width,
|
|
2818
|
+
height,
|
|
2819
|
+
depth,
|
|
2820
|
+
format,
|
|
2821
|
+
GL_RGBA,
|
|
2822
|
+
data,
|
|
2823
|
+
size,
|
|
2824
|
+
ptr->GetState()
|
|
2825
|
+
);
|
|
2826
|
+
}
|
|
2827
|
+
|
|
2828
|
+
}
|
|
2829
|
+
|
|
2830
|
+
default:
|
|
2831
|
+
break;
|
|
2728
2832
|
}
|
|
2729
2833
|
|
|
2834
|
+
|
|
2835
|
+
|
|
2836
|
+
|
|
2730
2837
|
} else if (count > 11) {
|
|
2731
2838
|
auto target = args[0]->Uint32Value(
|
|
2732
|
-
|
|
2839
|
+
context).ToChecked();
|
|
2733
2840
|
auto level = args[1]->Int32Value(
|
|
2734
|
-
|
|
2841
|
+
context).ToChecked();
|
|
2735
2842
|
auto xoffset = args[2]->Int32Value(
|
|
2736
|
-
|
|
2843
|
+
context).ToChecked();
|
|
2737
2844
|
auto yoffset = args[3]->Int32Value(
|
|
2738
|
-
|
|
2845
|
+
context).ToChecked();
|
|
2739
2846
|
auto zoffset = args[4]->Int32Value(
|
|
2740
|
-
|
|
2847
|
+
context).ToChecked();
|
|
2741
2848
|
auto width = args[5]->Int32Value(
|
|
2742
|
-
|
|
2849
|
+
context).ToChecked();
|
|
2743
2850
|
auto height = args[6]->Int32Value(
|
|
2744
|
-
|
|
2851
|
+
context).ToChecked();
|
|
2745
2852
|
auto depth = args[7]->Int32Value(
|
|
2746
|
-
|
|
2853
|
+
context).ToChecked();
|
|
2747
2854
|
auto format = args[8]->Uint32Value(
|
|
2748
|
-
|
|
2855
|
+
context).ToChecked();
|
|
2749
2856
|
auto type = args[9]->Uint32Value(
|
|
2750
|
-
|
|
2857
|
+
context).ToChecked();
|
|
2751
2858
|
|
|
2752
2859
|
size_t srcOffsetValue = 0;
|
|
2753
2860
|
|
|
2754
2861
|
if (args[11]->IsNumber()) {
|
|
2755
2862
|
srcOffsetValue = static_cast<size_t>(args[11]->NumberValue(
|
|
2756
|
-
|
|
2863
|
+
context).ToChecked());
|
|
2757
2864
|
}
|
|
2758
2865
|
|
|
2759
2866
|
auto imageOrPixelsOrOffsetObject = args[10];
|
|
@@ -2770,27 +2877,27 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfo<v8::Va
|
|
|
2770
2877
|
|
|
2771
2878
|
|
|
2772
2879
|
srcOffsetValue =
|
|
2773
|
-
|
|
2880
|
+
srcOffsetValue * size;
|
|
2774
2881
|
if (srcOffsetValue > size) {
|
|
2775
2882
|
return;
|
|
2776
2883
|
}
|
|
2777
2884
|
|
|
2778
2885
|
|
|
2779
2886
|
canvas_native_webgl2_tex_sub_image3d_offset(
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2887
|
+
target,
|
|
2888
|
+
level,
|
|
2889
|
+
xoffset,
|
|
2890
|
+
yoffset,
|
|
2891
|
+
zoffset,
|
|
2892
|
+
width,
|
|
2893
|
+
height,
|
|
2894
|
+
depth,
|
|
2895
|
+
format,
|
|
2896
|
+
type,
|
|
2897
|
+
data, size,
|
|
2898
|
+
srcOffsetValue,
|
|
2899
|
+
ptr->GetState()
|
|
2900
|
+
);
|
|
2794
2901
|
}
|
|
2795
2902
|
}
|
|
2796
2903
|
}
|
|
@@ -2811,7 +2918,7 @@ WebGL2RenderingContext::TransformFeedbackVaryings(const v8::FunctionCallbackInfo
|
|
|
2811
2918
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
2812
2919
|
auto varyingsObject = args[1];
|
|
2813
2920
|
auto bufferMode = args[2]->Uint32Value(
|
|
2814
|
-
|
|
2921
|
+
context).ToChecked();
|
|
2815
2922
|
|
|
2816
2923
|
if (program != nullptr &&
|
|
2817
2924
|
varyingsObject->IsArray()) {
|
|
@@ -2824,7 +2931,7 @@ WebGL2RenderingContext::TransformFeedbackVaryings(const v8::FunctionCallbackInfo
|
|
|
2824
2931
|
|
|
2825
2932
|
for (int j = 0; j < len; ++j) {
|
|
2826
2933
|
auto name = ConvertFromV8String(isolate, varyings->Get(
|
|
2827
|
-
|
|
2934
|
+
context, j).ToLocalChecked());
|
|
2828
2935
|
|
|
2829
2936
|
store.push_back(name);
|
|
2830
2937
|
}
|
|
@@ -2836,11 +2943,11 @@ WebGL2RenderingContext::TransformFeedbackVaryings(const v8::FunctionCallbackInfo
|
|
|
2836
2943
|
}
|
|
2837
2944
|
|
|
2838
2945
|
canvas_native_webgl2_transform_feedback_varyings(
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2946
|
+
program->GetProgram(),
|
|
2947
|
+
cStrings, store.size(),
|
|
2948
|
+
bufferMode,
|
|
2949
|
+
ptr->GetState()
|
|
2950
|
+
);
|
|
2844
2951
|
}
|
|
2845
2952
|
}
|
|
2846
2953
|
|
|
@@ -2863,14 +2970,14 @@ void WebGL2RenderingContext::Uniform1ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2863
2970
|
|
|
2864
2971
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
2865
2972
|
auto v0 = v0Value->Uint32Value(
|
|
2866
|
-
|
|
2973
|
+
context).ToChecked();
|
|
2867
2974
|
|
|
2868
2975
|
if (location != nullptr) {
|
|
2869
2976
|
canvas_native_webgl2_uniform1ui(
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2977
|
+
location->GetUniformLocation(),
|
|
2978
|
+
v0,
|
|
2979
|
+
ptr->GetState()
|
|
2980
|
+
);
|
|
2874
2981
|
}
|
|
2875
2982
|
}
|
|
2876
2983
|
|
|
@@ -2892,17 +2999,17 @@ void WebGL2RenderingContext::Uniform2ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2892
2999
|
|
|
2893
3000
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
2894
3001
|
auto v0 = args[1]->Uint32Value(
|
|
2895
|
-
|
|
3002
|
+
context).ToChecked();
|
|
2896
3003
|
auto v1 = args[2]->Uint32Value(
|
|
2897
|
-
|
|
3004
|
+
context).ToChecked();
|
|
2898
3005
|
|
|
2899
3006
|
if (location != nullptr) {
|
|
2900
3007
|
canvas_native_webgl2_uniform2ui(
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
3008
|
+
location->GetUniformLocation(),
|
|
3009
|
+
v0,
|
|
3010
|
+
v1,
|
|
3011
|
+
ptr->GetState()
|
|
3012
|
+
);
|
|
2906
3013
|
}
|
|
2907
3014
|
}
|
|
2908
3015
|
|
|
@@ -2924,22 +3031,22 @@ void WebGL2RenderingContext::Uniform3ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2924
3031
|
|
|
2925
3032
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
2926
3033
|
auto v0 = args[1]->Uint32Value(
|
|
2927
|
-
|
|
3034
|
+
context).ToChecked();
|
|
2928
3035
|
|
|
2929
3036
|
auto v1 = args[2]->Uint32Value(
|
|
2930
|
-
|
|
3037
|
+
context).ToChecked();
|
|
2931
3038
|
|
|
2932
3039
|
auto v2 = args[3]->Uint32Value(
|
|
2933
|
-
|
|
3040
|
+
context).ToChecked();
|
|
2934
3041
|
|
|
2935
3042
|
if (location != nullptr) {
|
|
2936
3043
|
canvas_native_webgl2_uniform3ui(
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
3044
|
+
location->GetUniformLocation(),
|
|
3045
|
+
v0,
|
|
3046
|
+
v1,
|
|
3047
|
+
v2,
|
|
3048
|
+
ptr->GetState()
|
|
3049
|
+
);
|
|
2943
3050
|
}
|
|
2944
3051
|
}
|
|
2945
3052
|
|
|
@@ -2961,26 +3068,26 @@ void WebGL2RenderingContext::Uniform4ui(const v8::FunctionCallbackInfo<v8::Value
|
|
|
2961
3068
|
|
|
2962
3069
|
auto location = WebGLUniformLocation::GetPointer(locationValue.As<v8::Object>());
|
|
2963
3070
|
auto v0 = args[1]->Uint32Value(
|
|
2964
|
-
|
|
3071
|
+
context).ToChecked();
|
|
2965
3072
|
|
|
2966
3073
|
auto v1 = args[2]->Uint32Value(
|
|
2967
|
-
|
|
3074
|
+
context).ToChecked();
|
|
2968
3075
|
|
|
2969
3076
|
auto v2 = args[3]->Uint32Value(
|
|
2970
|
-
|
|
3077
|
+
context).ToChecked();
|
|
2971
3078
|
auto v3 = args[4]->Uint32Value(
|
|
2972
|
-
|
|
3079
|
+
context).ToChecked();
|
|
2973
3080
|
|
|
2974
3081
|
|
|
2975
3082
|
if (location != nullptr) {
|
|
2976
3083
|
canvas_native_webgl2_uniform4ui(
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
3084
|
+
location->GetUniformLocation(),
|
|
3085
|
+
v0,
|
|
3086
|
+
v1,
|
|
3087
|
+
v2,
|
|
3088
|
+
v3,
|
|
3089
|
+
ptr->GetState()
|
|
3090
|
+
);
|
|
2984
3091
|
}
|
|
2985
3092
|
}
|
|
2986
3093
|
|
|
@@ -3014,10 +3121,10 @@ void WebGL2RenderingContext::Uniform1uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3014
3121
|
|
|
3015
3122
|
|
|
3016
3123
|
canvas_native_webgl2_uniform1uiv(
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3124
|
+
location->GetUniformLocation(),
|
|
3125
|
+
data, size,
|
|
3126
|
+
ptr->GetState()
|
|
3127
|
+
);
|
|
3021
3128
|
} else {
|
|
3022
3129
|
std::vector<uint32_t> buf;
|
|
3023
3130
|
auto array = dataValue.As<v8::Array>();
|
|
@@ -3025,17 +3132,17 @@ void WebGL2RenderingContext::Uniform1uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3025
3132
|
buf.reserve(len);
|
|
3026
3133
|
for (int i = 0; i < len; i++) {
|
|
3027
3134
|
auto item = array->Get(
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3135
|
+
context,
|
|
3136
|
+
i).ToLocalChecked()->Uint32Value(
|
|
3137
|
+
context).ToChecked();
|
|
3031
3138
|
buf.push_back(item);
|
|
3032
3139
|
}
|
|
3033
3140
|
|
|
3034
3141
|
canvas_native_webgl2_uniform1uiv(
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3142
|
+
location->GetUniformLocation(),
|
|
3143
|
+
buf.data(), buf.size(),
|
|
3144
|
+
ptr->GetState()
|
|
3145
|
+
);
|
|
3039
3146
|
}
|
|
3040
3147
|
|
|
3041
3148
|
|
|
@@ -3071,10 +3178,10 @@ void WebGL2RenderingContext::Uniform2uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3071
3178
|
|
|
3072
3179
|
|
|
3073
3180
|
canvas_native_webgl2_uniform2uiv(
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3181
|
+
location->GetUniformLocation(),
|
|
3182
|
+
data, size,
|
|
3183
|
+
ptr->GetState()
|
|
3184
|
+
);
|
|
3078
3185
|
} else {
|
|
3079
3186
|
std::vector<uint32_t> buf;
|
|
3080
3187
|
auto array = dataValue.As<v8::Array>();
|
|
@@ -3082,16 +3189,16 @@ void WebGL2RenderingContext::Uniform2uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3082
3189
|
buf.reserve(len);
|
|
3083
3190
|
for (int i = 0; i < len; i++) {
|
|
3084
3191
|
auto item = array->Get(
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3192
|
+
context,
|
|
3193
|
+
i).ToLocalChecked()->Uint32Value(
|
|
3194
|
+
context).ToChecked();
|
|
3088
3195
|
buf.push_back(item);
|
|
3089
3196
|
}
|
|
3090
3197
|
canvas_native_webgl2_uniform2uiv(
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3198
|
+
location->GetUniformLocation(),
|
|
3199
|
+
buf.data(), buf.size(),
|
|
3200
|
+
ptr->GetState()
|
|
3201
|
+
);
|
|
3095
3202
|
}
|
|
3096
3203
|
|
|
3097
3204
|
|
|
@@ -3128,10 +3235,10 @@ void WebGL2RenderingContext::Uniform3uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3128
3235
|
|
|
3129
3236
|
|
|
3130
3237
|
canvas_native_webgl2_uniform3uiv(
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3238
|
+
location->GetUniformLocation(),
|
|
3239
|
+
data, size,
|
|
3240
|
+
ptr->GetState()
|
|
3241
|
+
);
|
|
3135
3242
|
} else {
|
|
3136
3243
|
std::vector<uint32_t> buf;
|
|
3137
3244
|
auto array = dataValue.As<v8::Array>();
|
|
@@ -3139,16 +3246,16 @@ void WebGL2RenderingContext::Uniform3uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3139
3246
|
buf.reserve(len);
|
|
3140
3247
|
for (int i = 0; i < len; i++) {
|
|
3141
3248
|
auto item = array->Get(
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3249
|
+
context,
|
|
3250
|
+
i).ToLocalChecked()->Uint32Value(
|
|
3251
|
+
context).ToChecked();
|
|
3145
3252
|
buf.push_back(item);
|
|
3146
3253
|
}
|
|
3147
3254
|
canvas_native_webgl2_uniform3uiv(
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3255
|
+
location->GetUniformLocation(),
|
|
3256
|
+
buf.data(), buf.size(),
|
|
3257
|
+
ptr->GetState()
|
|
3258
|
+
);
|
|
3152
3259
|
}
|
|
3153
3260
|
|
|
3154
3261
|
|
|
@@ -3185,10 +3292,10 @@ void WebGL2RenderingContext::Uniform4uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3185
3292
|
|
|
3186
3293
|
|
|
3187
3294
|
canvas_native_webgl2_uniform4uiv(
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3295
|
+
location->GetUniformLocation(),
|
|
3296
|
+
data, size,
|
|
3297
|
+
ptr->GetState()
|
|
3298
|
+
);
|
|
3192
3299
|
} else {
|
|
3193
3300
|
std::vector<uint32_t> buf;
|
|
3194
3301
|
auto array = dataValue.As<v8::Array>();
|
|
@@ -3196,17 +3303,17 @@ void WebGL2RenderingContext::Uniform4uiv(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
3196
3303
|
buf.reserve(len);
|
|
3197
3304
|
for (int i = 0; i < len; i++) {
|
|
3198
3305
|
auto item = array->Get(
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3306
|
+
context,
|
|
3307
|
+
i).ToLocalChecked()->Uint32Value(
|
|
3308
|
+
context).ToChecked();
|
|
3202
3309
|
buf.push_back(item);
|
|
3203
3310
|
}
|
|
3204
3311
|
|
|
3205
3312
|
canvas_native_webgl2_uniform4uiv(
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3313
|
+
location->GetUniformLocation(),
|
|
3314
|
+
buf.data(), buf.size(),
|
|
3315
|
+
ptr->GetState()
|
|
3316
|
+
);
|
|
3210
3317
|
}
|
|
3211
3318
|
}
|
|
3212
3319
|
}
|
|
@@ -3229,17 +3336,17 @@ void WebGL2RenderingContext::UniformBlockBinding(const v8::FunctionCallbackInfo<
|
|
|
3229
3336
|
|
|
3230
3337
|
auto program = WebGLProgram::GetPointer(programValue.As<v8::Object>());
|
|
3231
3338
|
auto uniformBlockIndex = args[1]->Uint32Value(
|
|
3232
|
-
|
|
3339
|
+
context).ToChecked();
|
|
3233
3340
|
auto uniformBlockBinding = args[2]->Uint32Value(
|
|
3234
|
-
|
|
3341
|
+
context).ToChecked();
|
|
3235
3342
|
|
|
3236
3343
|
if (program != nullptr) {
|
|
3237
3344
|
canvas_native_webgl2_uniform_block_binding(
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3345
|
+
program->GetProgram(),
|
|
3346
|
+
uniformBlockIndex,
|
|
3347
|
+
uniformBlockBinding,
|
|
3348
|
+
ptr->GetState()
|
|
3349
|
+
);
|
|
3243
3350
|
}
|
|
3244
3351
|
|
|
3245
3352
|
}
|
|
@@ -3273,30 +3380,30 @@ void WebGL2RenderingContext::UniformMatrix2x3fv(const v8::FunctionCallbackInfo<v
|
|
|
3273
3380
|
|
|
3274
3381
|
|
|
3275
3382
|
canvas_native_webgl2_uniform_matrix2x3fv(
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3383
|
+
location->GetUniformLocation(),
|
|
3384
|
+
transpose,
|
|
3385
|
+
data, size,
|
|
3386
|
+
ptr->GetState()
|
|
3387
|
+
);
|
|
3281
3388
|
} else if (dataValue->IsArray()) {
|
|
3282
3389
|
std::vector<float> buf;
|
|
3283
3390
|
auto array = dataValue.As<v8::Array>();
|
|
3284
3391
|
auto len = array->Length();
|
|
3285
3392
|
for (int i = 0; i < len; i++) {
|
|
3286
3393
|
auto item = array->Get(
|
|
3287
|
-
|
|
3394
|
+
context, i).ToLocalChecked();
|
|
3288
3395
|
buf.push_back(
|
|
3289
|
-
|
|
3290
|
-
|
|
3396
|
+
static_cast<float>(item->NumberValue(
|
|
3397
|
+
context).ToChecked()));
|
|
3291
3398
|
}
|
|
3292
3399
|
|
|
3293
3400
|
|
|
3294
3401
|
canvas_native_webgl2_uniform_matrix2x3fv(
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3402
|
+
location->GetUniformLocation(),
|
|
3403
|
+
transpose,
|
|
3404
|
+
buf.data(), buf.size(),
|
|
3405
|
+
ptr->GetState()
|
|
3406
|
+
);
|
|
3300
3407
|
}
|
|
3301
3408
|
}
|
|
3302
3409
|
|
|
@@ -3330,30 +3437,30 @@ void WebGL2RenderingContext::UniformMatrix2x4fv(const v8::FunctionCallbackInfo<v
|
|
|
3330
3437
|
|
|
3331
3438
|
|
|
3332
3439
|
canvas_native_webgl2_uniform_matrix2x4fv(
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3440
|
+
location->GetUniformLocation(),
|
|
3441
|
+
transpose,
|
|
3442
|
+
data, size,
|
|
3443
|
+
ptr->GetState()
|
|
3444
|
+
);
|
|
3338
3445
|
} else if (dataValue->IsArray()) {
|
|
3339
3446
|
std::vector<float> buf;
|
|
3340
3447
|
auto array = dataValue.As<v8::Array>();
|
|
3341
3448
|
auto len = array->Length();
|
|
3342
3449
|
for (int i = 0; i < len; i++) {
|
|
3343
3450
|
auto item = array->Get(
|
|
3344
|
-
|
|
3451
|
+
context, i).ToLocalChecked();
|
|
3345
3452
|
buf.push_back(
|
|
3346
|
-
|
|
3347
|
-
|
|
3453
|
+
static_cast<float>(item->NumberValue(
|
|
3454
|
+
context).ToChecked()));
|
|
3348
3455
|
}
|
|
3349
3456
|
|
|
3350
3457
|
|
|
3351
3458
|
canvas_native_webgl2_uniform_matrix2x4fv(
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3459
|
+
location->GetUniformLocation(),
|
|
3460
|
+
transpose,
|
|
3461
|
+
buf.data(), buf.size(),
|
|
3462
|
+
ptr->GetState()
|
|
3463
|
+
);
|
|
3357
3464
|
}
|
|
3358
3465
|
}
|
|
3359
3466
|
|
|
@@ -3388,30 +3495,30 @@ void WebGL2RenderingContext::UniformMatrix3x2fv(const v8::FunctionCallbackInfo<v
|
|
|
3388
3495
|
|
|
3389
3496
|
|
|
3390
3497
|
canvas_native_webgl2_uniform_matrix3x2fv(
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3498
|
+
location->GetUniformLocation(),
|
|
3499
|
+
transpose,
|
|
3500
|
+
data, size,
|
|
3501
|
+
ptr->GetState()
|
|
3502
|
+
);
|
|
3396
3503
|
} else if (dataValue->IsArray()) {
|
|
3397
3504
|
std::vector<float> buf;
|
|
3398
3505
|
auto array = dataValue.As<v8::Array>();
|
|
3399
3506
|
auto len = array->Length();
|
|
3400
3507
|
for (int i = 0; i < len; i++) {
|
|
3401
3508
|
auto item = array->Get(
|
|
3402
|
-
|
|
3509
|
+
context, i).ToLocalChecked();
|
|
3403
3510
|
buf.push_back(
|
|
3404
|
-
|
|
3405
|
-
|
|
3511
|
+
static_cast<float>(item->NumberValue(
|
|
3512
|
+
context).ToChecked()));
|
|
3406
3513
|
}
|
|
3407
3514
|
|
|
3408
3515
|
|
|
3409
3516
|
canvas_native_webgl2_uniform_matrix3x2fv(
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3517
|
+
location->GetUniformLocation(),
|
|
3518
|
+
transpose,
|
|
3519
|
+
buf.data(), buf.size(),
|
|
3520
|
+
ptr->GetState()
|
|
3521
|
+
);
|
|
3415
3522
|
}
|
|
3416
3523
|
}
|
|
3417
3524
|
|
|
@@ -3444,30 +3551,30 @@ void WebGL2RenderingContext::UniformMatrix3x4fv(const v8::FunctionCallbackInfo<v
|
|
|
3444
3551
|
|
|
3445
3552
|
|
|
3446
3553
|
canvas_native_webgl2_uniform_matrix3x4fv(
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3554
|
+
location->GetUniformLocation(),
|
|
3555
|
+
transpose,
|
|
3556
|
+
data, size,
|
|
3557
|
+
ptr->GetState()
|
|
3558
|
+
);
|
|
3452
3559
|
} else if (dataValue->IsArray()) {
|
|
3453
3560
|
std::vector<float> buf;
|
|
3454
3561
|
auto array = dataValue.As<v8::Array>();
|
|
3455
3562
|
auto len = array->Length();
|
|
3456
3563
|
for (int i = 0; i < len; i++) {
|
|
3457
3564
|
auto item = array->Get(
|
|
3458
|
-
|
|
3565
|
+
context, i).ToLocalChecked();
|
|
3459
3566
|
buf.push_back(
|
|
3460
|
-
|
|
3461
|
-
|
|
3567
|
+
static_cast<float>(item->NumberValue(
|
|
3568
|
+
context).ToChecked()));
|
|
3462
3569
|
}
|
|
3463
3570
|
|
|
3464
3571
|
|
|
3465
3572
|
canvas_native_webgl2_uniform_matrix3x4fv(
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3573
|
+
location->GetUniformLocation(),
|
|
3574
|
+
transpose,
|
|
3575
|
+
buf.data(), buf.size(),
|
|
3576
|
+
ptr->GetState()
|
|
3577
|
+
);
|
|
3471
3578
|
}
|
|
3472
3579
|
}
|
|
3473
3580
|
|
|
@@ -3500,30 +3607,30 @@ void WebGL2RenderingContext::UniformMatrix4x2fv(const v8::FunctionCallbackInfo<v
|
|
|
3500
3607
|
auto data = static_cast<float *>((void *) data_ptr);
|
|
3501
3608
|
|
|
3502
3609
|
canvas_native_webgl2_uniform_matrix4x2fv(
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3610
|
+
location->GetUniformLocation(),
|
|
3611
|
+
transpose,
|
|
3612
|
+
data, size,
|
|
3613
|
+
ptr->GetState()
|
|
3614
|
+
);
|
|
3508
3615
|
} else if (dataValue->IsArray()) {
|
|
3509
3616
|
std::vector<float> buf;
|
|
3510
3617
|
auto array = dataValue.As<v8::Array>();
|
|
3511
3618
|
auto len = array->Length();
|
|
3512
3619
|
for (int i = 0; i < len; i++) {
|
|
3513
3620
|
auto item = array->Get(
|
|
3514
|
-
|
|
3621
|
+
context, i).ToLocalChecked();
|
|
3515
3622
|
buf.push_back(
|
|
3516
|
-
|
|
3517
|
-
|
|
3623
|
+
static_cast<float>(item->NumberValue(
|
|
3624
|
+
context).ToChecked()));
|
|
3518
3625
|
}
|
|
3519
3626
|
|
|
3520
3627
|
|
|
3521
3628
|
canvas_native_webgl2_uniform_matrix4x2fv(
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3629
|
+
location->GetUniformLocation(),
|
|
3630
|
+
transpose,
|
|
3631
|
+
buf.data(), buf.size(),
|
|
3632
|
+
ptr->GetState()
|
|
3633
|
+
);
|
|
3527
3634
|
}
|
|
3528
3635
|
}
|
|
3529
3636
|
|
|
@@ -3555,30 +3662,30 @@ void WebGL2RenderingContext::UniformMatrix4x3fv(const v8::FunctionCallbackInfo<v
|
|
|
3555
3662
|
auto data = static_cast<float *>((void *) data_ptr);
|
|
3556
3663
|
|
|
3557
3664
|
canvas_native_webgl2_uniform_matrix4x3fv(
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3665
|
+
location->GetUniformLocation(),
|
|
3666
|
+
transpose,
|
|
3667
|
+
data, size,
|
|
3668
|
+
ptr->GetState()
|
|
3669
|
+
);
|
|
3563
3670
|
} else if (dataValue->IsArray()) {
|
|
3564
3671
|
std::vector<float> buf;
|
|
3565
3672
|
auto array = dataValue.As<v8::Array>();
|
|
3566
3673
|
auto len = array->Length();
|
|
3567
3674
|
for (int i = 0; i < len; i++) {
|
|
3568
3675
|
auto item = array->Get(
|
|
3569
|
-
|
|
3676
|
+
context, i).ToLocalChecked();
|
|
3570
3677
|
buf.push_back(
|
|
3571
|
-
|
|
3572
|
-
|
|
3678
|
+
static_cast<float>(item->NumberValue(
|
|
3679
|
+
context).ToChecked()));
|
|
3573
3680
|
}
|
|
3574
3681
|
|
|
3575
3682
|
|
|
3576
3683
|
canvas_native_webgl2_uniform_matrix4x3fv(
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3684
|
+
location->GetUniformLocation(),
|
|
3685
|
+
transpose,
|
|
3686
|
+
buf.data(), buf.size(),
|
|
3687
|
+
ptr->GetState()
|
|
3688
|
+
);
|
|
3582
3689
|
}
|
|
3583
3690
|
}
|
|
3584
3691
|
|
|
@@ -3595,14 +3702,14 @@ void WebGL2RenderingContext::VertexAttribDivisor(const v8::FunctionCallbackInfo<
|
|
|
3595
3702
|
|
|
3596
3703
|
|
|
3597
3704
|
auto index = args[0]->Uint32Value(
|
|
3598
|
-
|
|
3705
|
+
context).ToChecked();
|
|
3599
3706
|
auto divisor = args[1]->Uint32Value(
|
|
3600
|
-
|
|
3707
|
+
context).ToChecked();
|
|
3601
3708
|
canvas_native_webgl2_vertex_attrib_divisor(
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3709
|
+
index,
|
|
3710
|
+
divisor,
|
|
3711
|
+
ptr->GetState()
|
|
3712
|
+
);
|
|
3606
3713
|
|
|
3607
3714
|
}
|
|
3608
3715
|
|
|
@@ -3617,23 +3724,23 @@ void WebGL2RenderingContext::VertexAttribI4i(const v8::FunctionCallbackInfo<v8::
|
|
|
3617
3724
|
|
|
3618
3725
|
|
|
3619
3726
|
auto index = args[0]->Int32Value(
|
|
3620
|
-
|
|
3727
|
+
context).ToChecked();
|
|
3621
3728
|
auto v0 = args[1]->Int32Value(
|
|
3622
|
-
|
|
3729
|
+
context).ToChecked();
|
|
3623
3730
|
auto v1 = args[2]->Int32Value(
|
|
3624
|
-
|
|
3731
|
+
context).ToChecked();
|
|
3625
3732
|
auto v2 = args[3]->Int32Value(
|
|
3626
|
-
|
|
3733
|
+
context).ToChecked();
|
|
3627
3734
|
auto v3 = args[4]->Int32Value(
|
|
3628
|
-
|
|
3735
|
+
context).ToChecked();
|
|
3629
3736
|
canvas_native_webgl2_vertex_attrib_i4i(
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3737
|
+
index,
|
|
3738
|
+
v0,
|
|
3739
|
+
v1,
|
|
3740
|
+
v2,
|
|
3741
|
+
v3,
|
|
3742
|
+
ptr->GetState()
|
|
3743
|
+
);
|
|
3637
3744
|
|
|
3638
3745
|
}
|
|
3639
3746
|
|
|
@@ -3648,7 +3755,7 @@ void WebGL2RenderingContext::VertexAttribI4iv(const v8::FunctionCallbackInfo<v8:
|
|
|
3648
3755
|
|
|
3649
3756
|
|
|
3650
3757
|
auto index = args[0]->Uint32Value(
|
|
3651
|
-
|
|
3758
|
+
context).ToChecked();
|
|
3652
3759
|
auto value = args[1];
|
|
3653
3760
|
if (value->IsInt32Array()) {
|
|
3654
3761
|
auto buf = value.As<v8::Int32Array>();
|
|
@@ -3661,10 +3768,10 @@ void WebGL2RenderingContext::VertexAttribI4iv(const v8::FunctionCallbackInfo<v8:
|
|
|
3661
3768
|
|
|
3662
3769
|
|
|
3663
3770
|
canvas_native_webgl2_vertex_attrib_i4iv(
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3771
|
+
index,
|
|
3772
|
+
data, size,
|
|
3773
|
+
ptr->GetState()
|
|
3774
|
+
);
|
|
3668
3775
|
} else if (value->IsArray()) {
|
|
3669
3776
|
auto array = value.As<v8::Array>();
|
|
3670
3777
|
auto len = array->Length();
|
|
@@ -3672,18 +3779,18 @@ void WebGL2RenderingContext::VertexAttribI4iv(const v8::FunctionCallbackInfo<v8:
|
|
|
3672
3779
|
buf.reserve(len);
|
|
3673
3780
|
for (int i = 0; i < len; i++) {
|
|
3674
3781
|
auto item = array->Get(
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3782
|
+
context,
|
|
3783
|
+
i).ToLocalChecked()->Int32Value(
|
|
3784
|
+
context).ToChecked();
|
|
3678
3785
|
buf.push_back(item);
|
|
3679
3786
|
}
|
|
3680
3787
|
|
|
3681
3788
|
|
|
3682
3789
|
canvas_native_webgl2_vertex_attrib_i4iv(
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3790
|
+
index,
|
|
3791
|
+
buf.data(), buf.size(),
|
|
3792
|
+
ptr->GetState()
|
|
3793
|
+
);
|
|
3687
3794
|
}
|
|
3688
3795
|
|
|
3689
3796
|
}
|
|
@@ -3699,24 +3806,24 @@ void WebGL2RenderingContext::VertexAttribI4ui(const v8::FunctionCallbackInfo<v8:
|
|
|
3699
3806
|
|
|
3700
3807
|
|
|
3701
3808
|
auto index = args[0]->Uint32Value(
|
|
3702
|
-
|
|
3809
|
+
context).ToChecked();
|
|
3703
3810
|
auto v0 = args[1]->Uint32Value(
|
|
3704
|
-
|
|
3811
|
+
context).ToChecked();
|
|
3705
3812
|
auto v1 = args[2]->Uint32Value(
|
|
3706
|
-
|
|
3813
|
+
context).ToChecked();
|
|
3707
3814
|
auto v2 = args[3]->Uint32Value(
|
|
3708
|
-
|
|
3815
|
+
context).ToChecked();
|
|
3709
3816
|
auto v3 = args[4]->Uint32Value(
|
|
3710
|
-
|
|
3817
|
+
context).ToChecked();
|
|
3711
3818
|
|
|
3712
3819
|
canvas_native_webgl2_vertex_attrib_i4ui(
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3820
|
+
index,
|
|
3821
|
+
v0,
|
|
3822
|
+
v1,
|
|
3823
|
+
v2,
|
|
3824
|
+
v3,
|
|
3825
|
+
ptr->GetState()
|
|
3826
|
+
);
|
|
3720
3827
|
|
|
3721
3828
|
}
|
|
3722
3829
|
|
|
@@ -3730,7 +3837,7 @@ void WebGL2RenderingContext::VertexAttribI4uiv(const v8::FunctionCallbackInfo<v8
|
|
|
3730
3837
|
auto context = isolate->GetCurrentContext();
|
|
3731
3838
|
|
|
3732
3839
|
auto index = args[0]->Uint32Value(
|
|
3733
|
-
|
|
3840
|
+
context).ToChecked();
|
|
3734
3841
|
auto value = args[1];
|
|
3735
3842
|
if (value->IsUint32Array()) {
|
|
3736
3843
|
auto buf = value.As<v8::Uint32Array>();
|
|
@@ -3742,10 +3849,10 @@ void WebGL2RenderingContext::VertexAttribI4uiv(const v8::FunctionCallbackInfo<v8
|
|
|
3742
3849
|
|
|
3743
3850
|
|
|
3744
3851
|
canvas_native_webgl2_vertex_attrib_i4uiv(
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3852
|
+
index,
|
|
3853
|
+
data, size,
|
|
3854
|
+
ptr->GetState()
|
|
3855
|
+
);
|
|
3749
3856
|
} else if (value->IsArray()) {
|
|
3750
3857
|
auto array = value.As<v8::Array>();
|
|
3751
3858
|
auto len = array->Length();
|
|
@@ -3753,18 +3860,18 @@ void WebGL2RenderingContext::VertexAttribI4uiv(const v8::FunctionCallbackInfo<v8
|
|
|
3753
3860
|
buf.reserve(len);
|
|
3754
3861
|
for (int i = 0; i < len; i++) {
|
|
3755
3862
|
auto item = array->Get(
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3863
|
+
context,
|
|
3864
|
+
i).ToLocalChecked()->Uint32Value(
|
|
3865
|
+
context).ToChecked();
|
|
3759
3866
|
buf.push_back(item);
|
|
3760
3867
|
}
|
|
3761
3868
|
|
|
3762
3869
|
|
|
3763
3870
|
canvas_native_webgl2_vertex_attrib_i4uiv(
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3871
|
+
index,
|
|
3872
|
+
buf.data(), buf.size(),
|
|
3873
|
+
ptr->GetState()
|
|
3874
|
+
);
|
|
3768
3875
|
}
|
|
3769
3876
|
|
|
3770
3877
|
}
|
|
@@ -4248,42 +4355,42 @@ void WebGL2RenderingContext::SetMethods(v8::Isolate *isolate,
|
|
|
4248
4355
|
|
|
4249
4356
|
|
|
4250
4357
|
tmpl->Set(
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4358
|
+
ConvertToV8String(isolate, "clientWaitSync"),
|
|
4359
|
+
v8::FunctionTemplate::New(isolate, &ClientWaitSync)
|
|
4360
|
+
);
|
|
4254
4361
|
|
|
4255
4362
|
tmpl->Set(
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4363
|
+
ConvertToV8String(isolate, "compressedTexSubImage3D"),
|
|
4364
|
+
v8::FunctionTemplate::New(isolate, &CompressedTexSubImage3D)
|
|
4365
|
+
);
|
|
4259
4366
|
|
|
4260
4367
|
SetFastMethod(isolate, tmpl, "copyBufferSubData", CopyBufferSubData,
|
|
4261
|
-
|
|
4368
|
+
&fast_copy_buffer_sub_data_, v8::Local<v8::Value>());
|
|
4262
4369
|
|
|
4263
4370
|
|
|
4264
4371
|
SetFastMethod(isolate, tmpl, "copyTexSubImage3D", CopyTexSubImage3D,
|
|
4265
|
-
|
|
4372
|
+
&fast_copy_tex_sub_image_3d_, v8::Local<v8::Value>());
|
|
4266
4373
|
|
|
4267
4374
|
|
|
4268
4375
|
tmpl->Set(
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4376
|
+
ConvertToV8String(isolate, "createQuery"),
|
|
4377
|
+
v8::FunctionTemplate::New(isolate, &CreateQuery)
|
|
4378
|
+
);
|
|
4272
4379
|
|
|
4273
4380
|
tmpl->Set(
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4381
|
+
ConvertToV8String(isolate, "createSampler"),
|
|
4382
|
+
v8::FunctionTemplate::New(isolate, &CreateSampler)
|
|
4383
|
+
);
|
|
4277
4384
|
|
|
4278
4385
|
tmpl->Set(
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4386
|
+
ConvertToV8String(isolate, "createTransformFeedback"),
|
|
4387
|
+
v8::FunctionTemplate::New(isolate, &CreateTransformFeedback)
|
|
4388
|
+
);
|
|
4282
4389
|
|
|
4283
4390
|
tmpl->Set(
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4391
|
+
ConvertToV8String(isolate, "createVertexArray"),
|
|
4392
|
+
v8::FunctionTemplate::New(isolate, &CreateVertexArray)
|
|
4393
|
+
);
|
|
4287
4394
|
|
|
4288
4395
|
|
|
4289
4396
|
SetFastMethod(isolate, tmpl, "deleteQuery", DeleteQuery,
|
|
@@ -4323,9 +4430,9 @@ void WebGL2RenderingContext::SetMethods(v8::Isolate *isolate,
|
|
|
4323
4430
|
|
|
4324
4431
|
|
|
4325
4432
|
tmpl->Set(
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4433
|
+
ConvertToV8String(isolate, "fenceSync"),
|
|
4434
|
+
v8::FunctionTemplate::New(isolate, &FenceSync)
|
|
4435
|
+
);
|
|
4329
4436
|
|
|
4330
4437
|
|
|
4331
4438
|
SetFastMethod(isolate, tmpl, "framebufferTextureLayer", FramebufferTextureLayer, &fast_framebuffer_texture_layer_,
|
|
@@ -4402,82 +4509,82 @@ void WebGL2RenderingContext::SetMethods(v8::Isolate *isolate,
|
|
|
4402
4509
|
|
|
4403
4510
|
|
|
4404
4511
|
tmpl->Set(
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4512
|
+
ConvertToV8String(isolate, "getActiveUniformBlockName"),
|
|
4513
|
+
v8::FunctionTemplate::New(isolate, &GetActiveUniformBlockName)
|
|
4514
|
+
);
|
|
4408
4515
|
|
|
4409
4516
|
tmpl->Set(
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4517
|
+
ConvertToV8String(isolate, "getActiveUniformBlockParameter"),
|
|
4518
|
+
v8::FunctionTemplate::New(isolate, &GetActiveUniformBlockParameter)
|
|
4519
|
+
);
|
|
4413
4520
|
|
|
4414
4521
|
tmpl->Set(
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4522
|
+
ConvertToV8String(isolate, "getActiveUniforms"),
|
|
4523
|
+
v8::FunctionTemplate::New(isolate, &GetActiveUniforms)
|
|
4524
|
+
);
|
|
4418
4525
|
|
|
4419
4526
|
tmpl->Set(
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4527
|
+
ConvertToV8String(isolate, "getBufferSubData"),
|
|
4528
|
+
v8::FunctionTemplate::New(isolate, &GetBufferSubData)
|
|
4529
|
+
);
|
|
4423
4530
|
|
|
4424
4531
|
|
|
4425
4532
|
tmpl->Set(
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4533
|
+
ConvertToV8String(isolate, "getFragDataLocation"),
|
|
4534
|
+
v8::FunctionTemplate::New(isolate, &GetFragDataLocation)
|
|
4535
|
+
);
|
|
4429
4536
|
|
|
4430
4537
|
|
|
4431
4538
|
tmpl->Set(
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4539
|
+
ConvertToV8String(isolate, "getIndexedParameter"),
|
|
4540
|
+
v8::FunctionTemplate::New(isolate, &GetIndexedParameter)
|
|
4541
|
+
);
|
|
4435
4542
|
|
|
4436
4543
|
tmpl->Set(
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4544
|
+
ConvertToV8String(isolate, "getInternalformatParameter"),
|
|
4545
|
+
v8::FunctionTemplate::New(isolate, &GetInternalformatParameter)
|
|
4546
|
+
);
|
|
4440
4547
|
|
|
4441
4548
|
tmpl->Set(
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4549
|
+
ConvertToV8String(isolate, "getParameter"),
|
|
4550
|
+
v8::FunctionTemplate::New(isolate, &GetParameter)
|
|
4551
|
+
);
|
|
4445
4552
|
|
|
4446
4553
|
tmpl->Set(
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4554
|
+
ConvertToV8String(isolate, "getQueryParameter"),
|
|
4555
|
+
v8::FunctionTemplate::New(isolate, &GetQueryParameter)
|
|
4556
|
+
);
|
|
4450
4557
|
|
|
4451
4558
|
|
|
4452
4559
|
tmpl->Set(
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4560
|
+
ConvertToV8String(isolate, "getQuery"),
|
|
4561
|
+
v8::FunctionTemplate::New(isolate, &GetQuery)
|
|
4562
|
+
);
|
|
4456
4563
|
|
|
4457
4564
|
tmpl->Set(
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4565
|
+
ConvertToV8String(isolate, "getSamplerParameter"),
|
|
4566
|
+
v8::FunctionTemplate::New(isolate, &GetSamplerParameter)
|
|
4567
|
+
);
|
|
4461
4568
|
|
|
4462
4569
|
tmpl->Set(
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4570
|
+
ConvertToV8String(isolate, "getSyncParameter"),
|
|
4571
|
+
v8::FunctionTemplate::New(isolate, &GetSyncParameter)
|
|
4572
|
+
);
|
|
4466
4573
|
|
|
4467
4574
|
tmpl->Set(
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4575
|
+
ConvertToV8String(isolate, "getTransformFeedbackVarying"),
|
|
4576
|
+
v8::FunctionTemplate::New(isolate, &GetTransformFeedbackVarying)
|
|
4577
|
+
);
|
|
4471
4578
|
|
|
4472
4579
|
tmpl->Set(
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4580
|
+
ConvertToV8String(isolate, "getUniformBlockIndex"),
|
|
4581
|
+
v8::FunctionTemplate::New(isolate, &GetUniformBlockIndex)
|
|
4582
|
+
);
|
|
4476
4583
|
|
|
4477
4584
|
tmpl->Set(
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4585
|
+
ConvertToV8String(isolate, "getUniformIndices"),
|
|
4586
|
+
v8::FunctionTemplate::New(isolate, &GetUniformIndices)
|
|
4587
|
+
);
|
|
4481
4588
|
|
|
4482
4589
|
SetFastMethod(isolate, tmpl, "invalidateFramebuffer", InvalidateFramebuffer,
|
|
4483
4590
|
&fast_invalidate_framebuffer_, v8::Local<v8::Value>());
|
|
@@ -4532,30 +4639,30 @@ void WebGL2RenderingContext::SetMethods(v8::Isolate *isolate,
|
|
|
4532
4639
|
|
|
4533
4640
|
|
|
4534
4641
|
tmpl->Set(
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4642
|
+
ConvertToV8String(isolate, "texImage3D"),
|
|
4643
|
+
v8::FunctionTemplate::New(isolate, &TexImage3D)
|
|
4644
|
+
);
|
|
4538
4645
|
|
|
4539
4646
|
|
|
4540
4647
|
tmpl->Set(
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4648
|
+
ConvertToV8String(isolate, "texStorage2D"),
|
|
4649
|
+
v8::FunctionTemplate::New(isolate, &TexStorage2D)
|
|
4650
|
+
);
|
|
4544
4651
|
|
|
4545
4652
|
tmpl->Set(
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4653
|
+
ConvertToV8String(isolate, "texStorage3D"),
|
|
4654
|
+
v8::FunctionTemplate::New(isolate, &TexStorage3D)
|
|
4655
|
+
);
|
|
4549
4656
|
|
|
4550
4657
|
tmpl->Set(
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4658
|
+
ConvertToV8String(isolate, "texSubImage3D"),
|
|
4659
|
+
v8::FunctionTemplate::New(isolate, &TexSubImage3D)
|
|
4660
|
+
);
|
|
4554
4661
|
|
|
4555
4662
|
tmpl->Set(
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4663
|
+
ConvertToV8String(isolate, "transformFeedbackVaryings"),
|
|
4664
|
+
v8::FunctionTemplate::New(isolate, &TransformFeedbackVaryings)
|
|
4665
|
+
);
|
|
4559
4666
|
}
|
|
4560
4667
|
|
|
4561
4668
|
void WebGL2RenderingContext::SetProps(v8::Isolate *isolate,
|