@nativescript/canvas 2.0.0-alpha.5 → 2.0.0-alpha.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Canvas/common.d.ts +213 -25
- package/Canvas/common.js +702 -452
- package/Canvas/common.js.map +1 -1
- package/Canvas/index.android.d.ts +12 -1
- package/Canvas/index.android.js +162 -49
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.d.ts +13 -0
- package/Canvas/index.ios.d.ts +9 -4
- package/Canvas/index.ios.js +166 -103
- package/Canvas/index.ios.js.map +1 -1
- package/Canvas2D/CanvasGradient/index.d.ts +1 -3
- package/Canvas2D/CanvasGradient/index.js +1 -10
- package/Canvas2D/CanvasGradient/index.js.map +1 -1
- package/Canvas2D/CanvasPattern/index.d.ts +1 -3
- package/Canvas2D/CanvasPattern/index.js +1 -10
- package/Canvas2D/CanvasPattern/index.js.map +1 -1
- package/Canvas2D/CanvasRenderingContext2D/index.d.ts +7 -3
- package/Canvas2D/CanvasRenderingContext2D/index.js +132 -233
- package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
- package/Canvas2D/DOMMatrix/index.js +3 -3
- package/Canvas2D/DOMMatrix/index.js.map +1 -1
- package/Canvas2D/ImageData/index.js +6 -6
- package/Canvas2D/ImageData/index.js.map +1 -1
- package/Canvas2D/Path2D/index.d.ts +0 -2
- package/Canvas2D/Path2D/index.js +32 -42
- package/Canvas2D/Path2D/index.js.map +1 -1
- package/Dom/Paint.js +2 -3
- package/Dom/Paint.js.map +1 -1
- package/Dom/shapes/Circle.js +1 -2
- package/Dom/shapes/Circle.js.map +1 -1
- package/Dom/shapes/Points.js +1 -2
- package/Dom/shapes/Points.js.map +1 -1
- package/ImageAsset/index.d.ts +2 -2
- package/ImageAsset/index.js +33 -37
- package/ImageAsset/index.js.map +1 -1
- package/ImageBitmap/index.d.ts +0 -2
- package/ImageBitmap/index.js +47 -33
- package/ImageBitmap/index.js.map +1 -1
- package/LICENSE +201 -0
- package/SVG/SVG.js +1 -1
- package/SVG/SVG.js.map +1 -1
- package/TextDecoder/index.d.ts +0 -2
- package/TextDecoder/index.js +3 -12
- package/TextDecoder/index.js.map +1 -1
- package/TextEncoder/index.d.ts +0 -2
- package/TextEncoder/index.js +4 -13
- package/TextEncoder/index.js.map +1 -1
- package/WebGL/WebGLExtensions/index.d.ts +4 -12
- package/WebGL/WebGLExtensions/index.js +27 -77
- package/WebGL/WebGLExtensions/index.js.map +1 -1
- package/WebGL/WebGLProgram.d.ts +0 -1
- package/WebGL/WebGLProgram.js +0 -3
- package/WebGL/WebGLProgram.js.map +1 -1
- package/WebGL/WebGLRenderingContext/common.d.ts +1 -3
- package/WebGL/WebGLRenderingContext/common.js +3 -13
- package/WebGL/WebGLRenderingContext/common.js.map +1 -1
- package/WebGL/WebGLRenderingContext/index.d.ts +19 -17
- package/WebGL/WebGLRenderingContext/index.js +354 -728
- package/WebGL/WebGLRenderingContext/index.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/common.d.ts +2 -2
- package/WebGL2/WebGL2RenderingContext/common.js +2 -2
- package/WebGL2/WebGL2RenderingContext/common.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/index.d.ts +1 -1
- package/WebGL2/WebGL2RenderingContext/index.js +116 -285
- package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
- package/angular/esm2020/index.mjs +4 -4
- package/angular/fesm2015/nativescript-canvas-angular.mjs +4 -4
- package/angular/fesm2020/nativescript-canvas-angular.mjs +4 -4
- package/angular/package.json +2 -2
- package/index.js.map +1 -1
- package/package.json +3 -2
- package/platforms/android/canvas-release.aar +0 -0
- package/platforms/android/include.gradle +15 -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 +135 -68
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative.h +10 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +144 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +2774 -70
- 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 +5851 -2555
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +44 -24
- 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 +44 -24
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +270 -136
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative.h +10 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +144 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +2774 -70
- 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 +5851 -2555
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +44 -24
- 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 +44 -24
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +5851 -2555
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +44 -24
- 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 +44 -24
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +42 -31
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/Podfile +5 -2
- package/platforms/ios/build.xcconfig +3 -3
- package/platforms/ios/src/CanvasModule.h +0 -2
- package/platforms/ios/src/CanvasModule.mm +4 -4
- package/platforms/ios/src/NSOperationQueueWrapper.h +11 -0
- package/platforms/ios/src/NSOperationQueueWrapper.mm +74 -0
- package/platforms/ios/src/cpp/Caches.cpp +35 -0
- package/platforms/ios/src/cpp/Caches.h +190 -0
- package/platforms/ios/src/cpp/CanvasJSIModule.cpp +1593 -0
- package/platforms/ios/src/cpp/CanvasJSIModule.h +16 -34
- package/platforms/ios/src/cpp/Common.h +30 -0
- package/platforms/ios/src/cpp/ConcurrentMap.h +54 -0
- package/platforms/ios/src/cpp/Helpers.h +336 -38
- package/platforms/ios/src/cpp/ImageAssetImpl.cpp +802 -0
- package/platforms/ios/src/cpp/ImageAssetImpl.h +46 -12
- package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +189 -0
- package/platforms/ios/src/cpp/ImageBitmapImpl.h +42 -16
- package/platforms/ios/src/cpp/JSICallback.h +83 -5
- package/platforms/ios/src/cpp/JSIReadFileCallback.h +86 -6
- package/platforms/ios/src/cpp/JSIRuntime.cpp +21 -0
- package/platforms/ios/src/cpp/JSIRuntime.h +7 -0
- package/platforms/ios/src/cpp/ObjectWrapperImpl.h +31 -0
- package/platforms/ios/src/cpp/OneByteStringResource.cpp +55 -0
- package/platforms/ios/src/cpp/OneByteStringResource.h +36 -0
- package/platforms/ios/src/cpp/PerIsolateData.cpp +49 -0
- package/platforms/ios/src/cpp/PerIsolateData.h +54 -0
- package/platforms/ios/src/cpp/RafImpl.cpp +8 -0
- package/platforms/ios/src/cpp/RafImpl.h +11 -8
- package/platforms/ios/src/cpp/TextDecoderImpl.cpp +193 -0
- package/platforms/ios/src/cpp/TextDecoderImpl.h +23 -13
- package/platforms/ios/src/cpp/TextEncoderImpl.cpp +139 -0
- package/platforms/ios/src/cpp/TextEncoderImpl.h +21 -12
- package/platforms/ios/src/cpp/URLImpl.cpp +464 -0
- package/platforms/ios/src/cpp/URLImpl.h +121 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasGradient.cpp +71 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasGradient.h +29 -13
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.cpp +89 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.h +49 -12
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +2841 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +1331 -21
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.cpp +207 -0
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.h +27 -13
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.cpp +807 -0
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.h +173 -13
- package/platforms/ios/src/cpp/canvas2d/Path2D.cpp +499 -0
- package/platforms/ios/src/cpp/canvas2d/Path2D.h +422 -12
- package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.cpp +253 -0
- package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.h +51 -12
- package/platforms/ios/src/cpp/gl.h +57 -7
- package/platforms/ios/src/cpp/gl3stub.c +425 -0
- package/platforms/ios/src/cpp/gl3stub.h +665 -0
- package/platforms/ios/src/cpp/gles3jni.h +37 -0
- package/platforms/ios/src/cpp/include/robin_hood.h +2544 -0
- package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.cpp +91 -0
- package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.h +33 -13
- package/platforms/ios/src/cpp/webgl/WebGLBuffer.h +42 -7
- package/platforms/ios/src/cpp/webgl/WebGLFramebuffer.h +47 -11
- package/platforms/ios/src/cpp/webgl/WebGLProgram.h +41 -6
- package/platforms/ios/src/cpp/webgl/WebGLRenderbuffer.h +41 -7
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +6845 -0
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.h +3217 -388
- package/platforms/ios/src/cpp/webgl/{WebGLRenderingContextBase.mm → WebGLRenderingContextBase.cpp} +18 -17
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.h +16 -36
- package/platforms/ios/src/cpp/webgl/WebGLShader.h +41 -7
- package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.cpp +50 -0
- package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.h +67 -12
- package/platforms/ios/src/cpp/webgl/WebGLTexture.h +41 -7
- package/platforms/ios/src/cpp/webgl/WebGLUniformLocation.h +45 -9
- package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.cpp +126 -0
- package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.h +26 -12
- package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.cpp +35 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.h +26 -6
- package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.cpp +41 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.h +26 -6
- package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.cpp +306 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.h +47 -13
- package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.h +49 -6
- package/platforms/ios/src/cpp/webgl/extensions/EXT_shader_texture_lodImpl.h +37 -15
- package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.h +47 -6
- package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.h +49 -6
- package/platforms/ios/src/cpp/webgl/extensions/OES_fbo_render_mipmap.h +41 -16
- package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.h +44 -6
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_floatImpl.h +39 -16
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_float_linearImpl.h +37 -16
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.h +42 -6
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_float_linearImpl.h +40 -16
- package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.cpp +102 -0
- package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.h +69 -14
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.h +51 -8
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.h +49 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.h +49 -8
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.h +76 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.h +57 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.h +53 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.h +59 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.h +46 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.cpp +35 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.h +131 -14
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.cpp +32 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.h +61 -13
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp +4533 -0
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.h +1427 -342
- package/platforms/ios/src/cpp/webgl2/WebGLQuery.h +41 -4
- package/platforms/ios/src/cpp/webgl2/WebGLSampler.h +42 -3
- package/platforms/ios/src/cpp/webgl2/WebGLSyncImpl.h +45 -11
- package/platforms/ios/src/cpp/webgl2/WebGLTransformFeedback.h +43 -4
- package/platforms/ios/src/cpp/webgl2/WebGLVertexArrayObject.h +44 -4
- package/platforms/ios/src/module.modulemap +1 -0
- package/{pods → src-native/ios}/NativeScript.podspec +12 -25
- package/typings/objc!CanvasNative.d.ts +2038 -0
- package/typings/objc!CanvasNative.js +1 -0
- package/typings/objc!CanvasNative.js.map +1 -0
- package/utils.d.ts +3 -1
- package/utils.js +7 -20
- package/utils.js.map +1 -1
- package/angular/nativescript-canvas-angular.d.ts +0 -5
- package/platforms/ios/src/cpp/CanvasJSIModule.mm +0 -1105
- package/platforms/ios/src/cpp/ImageAssetImpl.mm +0 -417
- package/platforms/ios/src/cpp/ImageBitmapImpl.mm +0 -126
- package/platforms/ios/src/cpp/RafImpl.mm +0 -10
- package/platforms/ios/src/cpp/TextDecoderImpl.mm +0 -97
- package/platforms/ios/src/cpp/TextEncoderImpl.mm +0 -60
- package/platforms/ios/src/cpp/VecMutableBuffer.h +0 -46
- package/platforms/ios/src/cpp/canvas-cxx/src/lib.rs.cc +0 -6132
- package/platforms/ios/src/cpp/canvas-cxx/src/lib.rs.h +0 -2859
- package/platforms/ios/src/cpp/canvas2d/CanvasGradient.mm +0 -42
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.mm +0 -49
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.mm +0 -1975
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.mm +0 -68
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.mm +0 -149
- package/platforms/ios/src/cpp/canvas2d/Path2D.mm +0 -335
- package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.mm +0 -68
- package/platforms/ios/src/cpp/rust/cxx.cc +0 -793
- package/platforms/ios/src/cpp/rust/cxx.h +0 -1111
- package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.mm +0 -39
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.mm +0 -5958
- package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.mm +0 -40
- package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.mm +0 -108
- package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.mm +0 -28
- package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.mm +0 -42
- package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.mm +0 -295
- package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.mm +0 -40
- package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.mm +0 -37
- package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.mm +0 -28
- package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.mm +0 -31
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.mm +0 -28
- package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.mm +0 -127
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.mm +0 -45
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.mm +0 -45
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.mm +0 -31
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.mm +0 -70
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.mm +0 -47
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.mm +0 -46
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.mm +0 -49
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.mm +0 -30
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.mm +0 -177
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.mm +0 -64
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.mm +0 -4556
- package/pods/Headers/jsi/decorator.h +0 -770
- package/pods/Headers/jsi/instrumentation.h +0 -117
- package/pods/Headers/jsi/jsi-inl.h +0 -338
- package/pods/Headers/jsi/jsi.h +0 -1571
- package/pods/Headers/jsi/jsilib.h +0 -59
- package/pods/Headers/jsi/threadsafe.h +0 -79
- package/pods/Headers/v8runtime/HostProxy.h +0 -71
- package/pods/Headers/v8runtime/JSIV8ValueConverter.h +0 -74
- package/pods/Headers/v8runtime/V8PointerValue.h +0 -44
- package/pods/Headers/v8runtime/V8Runtime.h +0 -240
- package/pods/Headers/v8runtime/V8RuntimeConfig.h +0 -26
- package/pods/Headers/v8runtime/V8RuntimeFactory.h +0 -21
- /package/platforms/ios/src/cpp/{OnRafCallback.mm → OnRafCallback.cpp} +0 -0
- /package/{pods → src-native/ios}/Headers/include/APIDesign.md +0 -0
- /package/{pods → src-native/ios}/Headers/include/DEPS +0 -0
- /package/{pods → src-native/ios}/Headers/include/DIR_METADATA +0 -0
- /package/{pods → src-native/ios}/Headers/include/OWNERS +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/DEPS +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/OWNERS +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/README.md +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/allocation.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/common.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/cross-thread-persistent.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/custom-space.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/default-platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/ephemeron-pair.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/explicit-management.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/garbage-collected.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/heap-consistency.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/heap-state.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/heap-statistics.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/heap.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/api-constants.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/atomic-entry-flag.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/caged-heap-local-data.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/compiler-specific.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/finalizer-trait.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/gc-info.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/logging.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/name-trait.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/persistent-node.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/pointer-policies.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/write-barrier.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/liveness-broker.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/macros.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/member.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/name-provider.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/object-size-trait.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/persistent.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/prefinalizer.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/process-heap-statistics.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/sentinel-pointer.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/source-location.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/testing.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/trace-trait.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/type-traits.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/visitor.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/js_protocol-1.2.json +0 -0
- /package/{pods → src-native/ios}/Headers/include/js_protocol-1.3.json +0 -0
- /package/{pods → src-native/ios}/Headers/include/js_protocol.pdl +0 -0
- /package/{pods → src-native/ios}/Headers/include/libffi/arm64/ffi.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libffi/arm64/ffitarget.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libffi/x86_64/ffi.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libffi/x86_64/ffitarget.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libffi.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libplatform/DEPS +0 -0
- /package/{pods → src-native/ios}/Headers/include/libplatform/libplatform-export.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libplatform/libplatform.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libplatform/v8-tracing.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-array-buffer.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-callbacks.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-container.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-context.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-cppgc.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-data.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-date.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-debug.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-embedder-heap.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-embedder-state-scope.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-exception.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-extension.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-external.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-fast-api-calls.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-forward.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-function-callback.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-function.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-initialization.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-inspector-protocol.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-inspector.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-internal.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-isolate.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-json.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-local-handle.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-locker.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-maybe.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-memory-span.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-message.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-metrics.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-microtask-queue.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-microtask.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-object.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-persistent-handle.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-primitive-object.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-primitive.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-profiler.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-promise.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-proxy.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-regexp.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-script.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-snapshot.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-statistics.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-template.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-traced-handle.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-typed-array.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-unwinder-state.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-unwinder.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-util.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-value-serializer-version.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-value-serializer.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-value.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-version-string.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-version.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-wasm-trap-handler-posix.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-wasm-trap-handler-win.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-wasm.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-weak-callback-info.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8config.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/InspectorServer.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/JsV8InspectorClient.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/base/trace_event/common/trace_event_common.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/base64.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/address-region.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/atomic-utils.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/atomicops.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/base-export.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/bits.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/build_config.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/compiler-specific.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/export-template.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/flags.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/immediate-crash.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/lazy-instance.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/logging.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/macros.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/memory.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/once.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/optional.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/mutex.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/semaphore.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/v8-time.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/wrappers.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/safe_conversions.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/safe_conversions_impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/template-utils.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/v8-fallthrough.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/common/checks.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/common/globals.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/debug/debug-interface.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/debug/interface-types.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/init/v8.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/custom-preview.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/injected-script.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/inspected-context.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/CSS.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Console.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/DOM.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Debugger.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Forward.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/HeapProfiler.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Log.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Network.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Overlay.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Page.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Profiler.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Protocol.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Runtime.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Schema.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Security.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/remote-object-id.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/search-util.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/string-16.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/string-util.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-console-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-console-message.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-console.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-css-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger-id.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger-script.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-dom-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-inspector-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-inspector-session-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-log-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-network-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-page-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-regex.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-schema-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-stack-trace-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-string-conversions.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-value-utils.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/value-mirror.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/libplatform/default-platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/logging/tracing-flags.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/numbers/conversions.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/tracing/trace-event.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/utils/allocation.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/utils/vector.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/utils.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/v8-inspector-platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ArgConverter.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ArrayAdapter.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Caches.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ClassBuilder.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Common.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ConcurrentMap.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ConcurrentQueue.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Console.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Constants.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/DataWrapper.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/DictionaryAdapter.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ExtVector.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/FFICall.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/FastEnumerationAdapter.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/FunctionReference.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Helpers.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/InlineFunctions.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Interop.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/KnownUnknownClassPair.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Metadata.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/MetadataBuilder.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/MetadataInlines.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ModuleInternal.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/NSDataAdapter.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/NativeScriptException.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ObjectManager.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/OneByteStringResource.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Pointer.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/PromiseProxy.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Reference.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Runtime.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/RuntimeConfig.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/SetTimeout.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/SimpleAllocator.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/StringHasher.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/SymbolIterator.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/SymbolLoader.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/TNSDerivedClass.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/TSHelpers.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Tasks.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/UnmanagedType.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/WeakRef.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Worker.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/robin_hood.h +0 -0
|
@@ -6,18 +6,13 @@
|
|
|
6
6
|
#pragma process_pending_includes
|
|
7
7
|
|
|
8
8
|
#include <vector>
|
|
9
|
-
#include "rust/cxx.h"
|
|
10
9
|
|
|
11
|
-
#include "
|
|
10
|
+
#include "CanvasRenderingContext2DImpl.h"
|
|
12
11
|
#include "RafImpl.h"
|
|
13
|
-
|
|
14
|
-
#include "canvas-cxx/src/lib.rs.h"
|
|
15
|
-
#import "NativeScript/JSIRuntime.h"
|
|
16
|
-
#include "VecMutableBuffer.h"
|
|
17
12
|
#include <cmath>
|
|
18
13
|
#include "Helpers.h"
|
|
19
|
-
#include "
|
|
20
|
-
#include "
|
|
14
|
+
#include "WebGLRenderingContextBase.h"
|
|
15
|
+
#include "WebGLRenderingContext.h"
|
|
21
16
|
#include "WebGLQuery.h"
|
|
22
17
|
#include "WebGLSampler.h"
|
|
23
18
|
#include "WebGLSyncImpl.h"
|
|
@@ -26,406 +21,1496 @@
|
|
|
26
21
|
#include "gl.h"
|
|
27
22
|
|
|
28
23
|
|
|
29
|
-
|
|
30
|
-
using namespace org::nativescript::canvas;
|
|
31
|
-
|
|
32
|
-
class JSI_EXPORT WebGL2RenderingContext : public WebGLRenderingContext {
|
|
24
|
+
class WebGL2RenderingContext : public WebGLRenderingContext {
|
|
33
25
|
public:
|
|
34
26
|
|
|
35
|
-
WebGL2RenderingContext(
|
|
27
|
+
WebGL2RenderingContext(WebGLState *state);
|
|
28
|
+
|
|
29
|
+
WebGL2RenderingContext(WebGLState *state, WebGLRenderingVersion version);
|
|
30
|
+
|
|
31
|
+
static v8::CFunction fast_begin_query_;
|
|
32
|
+
static v8::CFunction fast_begin_transform_feedback_;
|
|
33
|
+
static v8::CFunction fast_bind_vertex_array_;
|
|
34
|
+
static v8::CFunction fast_bind_buffer_base_;
|
|
35
|
+
static v8::CFunction fast_bind_buffer_range_;
|
|
36
|
+
static v8::CFunction fast_bind_sampler_;
|
|
37
|
+
static v8::CFunction fast_bind_transform_feedback_;
|
|
38
|
+
static v8::CFunction fast_blit_framebuffer_;
|
|
39
|
+
static v8::CFunction fast_clear_buffer_fi_;
|
|
40
|
+
static v8::CFunction fast_clear_buffer_fv_;
|
|
41
|
+
static v8::CFunction fast_clear_buffer_fv_array_;
|
|
42
|
+
static v8::CFunction fast_clear_buffer_iv_;
|
|
43
|
+
static v8::CFunction fast_clear_buffer_iv_array_;
|
|
44
|
+
static v8::CFunction fast_clear_buffer_uiv_;
|
|
45
|
+
static v8::CFunction fast_clear_buffer_uiv_array_;
|
|
46
|
+
static v8::CFunction fast_draw_arrays_instanced_;
|
|
47
|
+
static v8::CFunction fast_draw_buffers_;
|
|
48
|
+
static v8::CFunction fast_draw_elements_instanced_;
|
|
49
|
+
static v8::CFunction fast_draw_range_elements_;
|
|
50
|
+
static v8::CFunction fast_resume_transform_feedback_;
|
|
51
|
+
static v8::CFunction fast_sampler_parameterf_;
|
|
52
|
+
static v8::CFunction fast_sampler_parameteri_;
|
|
53
|
+
static v8::CFunction fast_uniform_1ui_;
|
|
54
|
+
static v8::CFunction fast_uniform_1uiv_;
|
|
55
|
+
static v8::CFunction fast_uniform_2ui_;
|
|
56
|
+
static v8::CFunction fast_uniform_2uiv_;
|
|
57
|
+
static v8::CFunction fast_uniform_3ui_;
|
|
58
|
+
static v8::CFunction fast_uniform_3uiv_;
|
|
59
|
+
static v8::CFunction fast_uniform_4ui_;
|
|
60
|
+
static v8::CFunction fast_uniform_4uiv_;
|
|
61
|
+
static v8::CFunction fast_uniform_matrix_2x3fv_;
|
|
62
|
+
static v8::CFunction fast_uniform_matrix_2x3fv_array_;
|
|
63
|
+
static v8::CFunction fast_uniform_matrix_2x4fv_;
|
|
64
|
+
static v8::CFunction fast_uniform_matrix_2x4fv_array_;
|
|
65
|
+
static v8::CFunction fast_uniform_matrix_3x2fv_;
|
|
66
|
+
static v8::CFunction fast_uniform_matrix_3x2fv_array_;
|
|
67
|
+
static v8::CFunction fast_uniform_matrix_3x4fv_;
|
|
68
|
+
static v8::CFunction fast_uniform_matrix_3x4fv_array_;
|
|
69
|
+
static v8::CFunction fast_uniform_matrix_4x2fv_;
|
|
70
|
+
static v8::CFunction fast_uniform_matrix_4x2fv_array_;
|
|
71
|
+
static v8::CFunction fast_uniform_matrix_4x3fv_;
|
|
72
|
+
static v8::CFunction fast_uniform_matrix_4x3fv_array_;
|
|
73
|
+
static v8::CFunction fast_vertex_attrib_divisor_;
|
|
74
|
+
static v8::CFunction fast_vertex_attrib_i_4i_;
|
|
75
|
+
static v8::CFunction fast_vertex_attrib_i_4iv_;
|
|
76
|
+
static v8::CFunction fast_vertex_attrib_i_4iv_array_;
|
|
77
|
+
static v8::CFunction fast_vertex_attrib_i_4ui_;
|
|
78
|
+
static v8::CFunction fast_vertex_attrib_i_4uiv_;
|
|
79
|
+
static v8::CFunction fast_vertex_attrib_i_4uiv_array_;
|
|
80
|
+
static v8::CFunction fast_uniform_block_binding_;
|
|
81
|
+
|
|
82
|
+
static v8::CFunction fast_invalidate_framebuffer_;
|
|
83
|
+
static v8::CFunction fast_invalidate_sub_framebuffer_;
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
static v8::Local<v8::FunctionTemplate> GetCtor(v8::Isolate *isolate);
|
|
87
|
+
|
|
88
|
+
static v8::Local<v8::Object>
|
|
89
|
+
NewInstance(v8::Isolate *isolate, WebGL2RenderingContext *renderingContext) {
|
|
90
|
+
auto context = isolate->GetCurrentContext();
|
|
91
|
+
v8::EscapableHandleScope scope(isolate);
|
|
92
|
+
auto object = WebGL2RenderingContext::GetCtor(isolate)->GetFunction(
|
|
93
|
+
context).ToLocalChecked()->NewInstance(context).ToLocalChecked();
|
|
94
|
+
SetNativeType(object, NativeType::WebGLRenderingContextBase);
|
|
95
|
+
object->SetAlignedPointerInInternalField(0, renderingContext);
|
|
96
|
+
renderingContext->BindFinalizer(isolate, object);
|
|
97
|
+
return scope.Escape(object);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
static WebGL2RenderingContext *GetPointer(const v8::Local<v8::Object> &object);
|
|
101
|
+
|
|
102
|
+
static void SetConstants(v8::Isolate *isolate, const v8::Local<v8::ObjectTemplate> &tmpl);
|
|
103
|
+
|
|
104
|
+
static void
|
|
105
|
+
SetProps(v8::Isolate *isolate, const v8::Local<v8::ObjectTemplate> &webgl2RenderingContextTpl);
|
|
106
|
+
|
|
107
|
+
static void SetMethods(v8::Isolate *isolate,
|
|
108
|
+
const v8::Local<v8::ObjectTemplate> &tmpl);
|
|
109
|
+
|
|
110
|
+
static void BeginQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
111
|
+
|
|
112
|
+
static void FastBeginQuery(v8::Local<v8::Object> receiver_obj, uint32_t target,
|
|
113
|
+
v8::Local<v8::Object> query_obj) {
|
|
114
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
115
|
+
if (ptr == nullptr) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
auto type = GetNativeType(query_obj);
|
|
120
|
+
if (type == NativeType::WebGLQuery) {
|
|
121
|
+
auto query = WebGLQuery::GetPointer(query_obj);
|
|
122
|
+
|
|
123
|
+
if (query != nullptr) {
|
|
124
|
+
canvas_native_webgl2_begin_query(
|
|
125
|
+
target,
|
|
126
|
+
query->GetQuery(),
|
|
127
|
+
ptr->GetState()
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
static void BeginTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
134
|
+
|
|
135
|
+
static void FastBeginTransformFeedback(v8::Local<v8::Object> receiver_obj, uint32_t value) {
|
|
136
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
137
|
+
if (ptr == nullptr) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
canvas_native_webgl2_begin_transform_feedback(
|
|
142
|
+
value,
|
|
143
|
+
ptr->GetState()
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
static void BindBufferBase(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
148
|
+
|
|
149
|
+
static void
|
|
150
|
+
FastBindBufferBase(v8::Local<v8::Object> receiver_obj, uint32_t target, uint32_t index,
|
|
151
|
+
v8::Local<v8::Object> buffer_obj) {
|
|
152
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
153
|
+
if (ptr == nullptr) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
auto type = GetNativeType(buffer_obj);
|
|
158
|
+
|
|
159
|
+
if (type == NativeType::WebGLBuffer) {
|
|
160
|
+
auto buffer = WebGLBuffer::GetPointer(buffer_obj);
|
|
161
|
+
|
|
162
|
+
canvas_native_webgl2_bind_buffer_base(
|
|
163
|
+
target,
|
|
164
|
+
index,
|
|
165
|
+
buffer->GetBuffer(),
|
|
166
|
+
ptr->GetState()
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
static void BindBufferRange(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
172
|
+
|
|
173
|
+
static void
|
|
174
|
+
FastBindBufferRange(v8::Local<v8::Object> receiver_obj, uint32_t target, uint32_t index,
|
|
175
|
+
v8::Local<v8::Object> buffer_obj, int32_t offset, int32_t size) {
|
|
176
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
177
|
+
if (ptr == nullptr) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
auto type = GetNativeType(buffer_obj);
|
|
183
|
+
if (type == NativeType::WebGLBuffer) {
|
|
184
|
+
auto buffer = WebGLBuffer::GetPointer(buffer_obj);
|
|
185
|
+
canvas_native_webgl2_bind_buffer_range(
|
|
186
|
+
target,
|
|
187
|
+
index,
|
|
188
|
+
buffer->GetBuffer(),
|
|
189
|
+
static_cast<ssize_t>(offset),
|
|
190
|
+
static_cast<ssize_t>(size),
|
|
191
|
+
ptr->GetState()
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
static void BindSampler(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
197
|
+
|
|
198
|
+
static void FastBindSampler(v8::Local<v8::Object> receiver_obj, uint32_t unit,
|
|
199
|
+
v8::Local<v8::Object> sampler_obj) {
|
|
200
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
201
|
+
if (ptr == nullptr) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
auto type = GetNativeType(sampler_obj);
|
|
206
|
+
if (type == NativeType::WebGLSampler) {
|
|
207
|
+
auto sampler = WebGLSampler::GetPointer(sampler_obj);
|
|
208
|
+
|
|
209
|
+
canvas_native_webgl2_bind_sampler(
|
|
210
|
+
unit,
|
|
211
|
+
sampler->GetSampler(),
|
|
212
|
+
ptr->GetState()
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
static void BindTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
218
|
+
|
|
219
|
+
static void FastBindTransformFeedback(v8::Local<v8::Object> receiver_obj, uint32_t target,
|
|
220
|
+
v8::Local<v8::Object> transformer_obj) {
|
|
221
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
222
|
+
if (ptr == nullptr) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
auto type = GetNativeType(transformer_obj);
|
|
228
|
+
|
|
229
|
+
if (type == NativeType::WebGLTransformFeedback) {
|
|
230
|
+
auto transformFeedback = WebGLTransformFeedback::GetPointer(transformer_obj);
|
|
231
|
+
|
|
232
|
+
canvas_native_webgl2_bind_transform_feedback(
|
|
233
|
+
target,
|
|
234
|
+
transformFeedback->GetFeedback(),
|
|
235
|
+
ptr->GetState()
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
static void BindVertexArray(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
241
|
+
|
|
242
|
+
static void
|
|
243
|
+
BindVertexArrayImpl(WebGL2RenderingContext *ptr, uint32_t vertex_array) {
|
|
244
|
+
canvas_native_webgl2_bind_vertex_array(
|
|
245
|
+
vertex_array,
|
|
246
|
+
ptr->GetState()
|
|
247
|
+
);
|
|
248
|
+
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
static void FastBindVertexArray(v8::Local<v8::Object> receiver_obj, uint32_t vertex_array) {
|
|
252
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
253
|
+
if (ptr == nullptr) {
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
BindVertexArrayImpl(
|
|
258
|
+
ptr,
|
|
259
|
+
vertex_array
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
static void BlitFramebuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
264
|
+
|
|
265
|
+
static void
|
|
266
|
+
FastBlitFramebuffer(v8::Local<v8::Object> receiver_obj, int32_t srcX0, int32_t srcY0,
|
|
267
|
+
int32_t srcX1, int32_t srcY1, int32_t dstX0, int32_t dstY0, int32_t dstX1,
|
|
268
|
+
int32_t dstY1, uint32_t mask, uint32_t filter) {
|
|
269
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
270
|
+
if (ptr == nullptr) {
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
canvas_native_webgl2_blit_framebuffer(
|
|
276
|
+
srcX0,
|
|
277
|
+
srcY0,
|
|
278
|
+
srcX1,
|
|
279
|
+
srcY1,
|
|
280
|
+
dstX0,
|
|
281
|
+
dstY0,
|
|
282
|
+
dstX1,
|
|
283
|
+
dstY1,
|
|
284
|
+
mask,
|
|
285
|
+
filter,
|
|
286
|
+
ptr->GetState()
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
static void ClearBufferfi(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
291
|
+
|
|
292
|
+
static void
|
|
293
|
+
FastClearBufferfi(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
|
|
294
|
+
double depth, int32_t stencil) {
|
|
295
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
296
|
+
if (ptr == nullptr) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
canvas_native_webgl2_clear_bufferfi(
|
|
302
|
+
buffer,
|
|
303
|
+
drawbuffer,
|
|
304
|
+
static_cast<float>(depth),
|
|
305
|
+
stencil,
|
|
306
|
+
ptr->GetState()
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
static void ClearBufferfv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
311
|
+
|
|
312
|
+
static void
|
|
313
|
+
FastClearBufferfv(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
|
|
314
|
+
const v8::FastApiTypedArray<float> &values) {
|
|
315
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
316
|
+
if (ptr == nullptr) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
auto size = values.length();
|
|
321
|
+
float *data;
|
|
322
|
+
values.getStorageIfAligned(&data);
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
canvas_native_webgl2_clear_bufferfv(
|
|
326
|
+
buffer,
|
|
327
|
+
drawbuffer,
|
|
328
|
+
data,
|
|
329
|
+
size,
|
|
330
|
+
ptr->GetState()
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
static void
|
|
335
|
+
FastClearBufferfvArray(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
|
|
336
|
+
v8::Local<v8::Array> values) {
|
|
337
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
338
|
+
if (ptr == nullptr) {
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
auto len = values->Length();
|
|
343
|
+
std::vector<float> buf;
|
|
344
|
+
buf.reserve(len);
|
|
345
|
+
|
|
346
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
|
|
347
|
+
values, buf.data(), len);
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
if (copied) {
|
|
351
|
+
canvas_native_webgl2_clear_bufferfv(
|
|
352
|
+
buffer,
|
|
353
|
+
drawbuffer,
|
|
354
|
+
buf.data(),
|
|
355
|
+
buf.size(),
|
|
356
|
+
ptr->GetState()
|
|
357
|
+
);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
static void ClearBufferiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
362
|
+
|
|
363
|
+
static void
|
|
364
|
+
FastClearBufferiv(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
|
|
365
|
+
const v8::FastApiTypedArray<int32_t> &values) {
|
|
366
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
367
|
+
if (ptr == nullptr) {
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
auto size = values.length();
|
|
372
|
+
int32_t *data;
|
|
373
|
+
values.getStorageIfAligned(&data);
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
canvas_native_webgl2_clear_bufferiv(
|
|
377
|
+
buffer,
|
|
378
|
+
drawbuffer,
|
|
379
|
+
data,
|
|
380
|
+
size,
|
|
381
|
+
ptr->GetState()
|
|
382
|
+
);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
static void
|
|
386
|
+
FastClearBufferivArray(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
|
|
387
|
+
v8::Local<v8::Array> values) {
|
|
388
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
389
|
+
if (ptr == nullptr) {
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
auto len = values->Length();
|
|
394
|
+
std::vector<int32_t> buf;
|
|
395
|
+
buf.reserve(len);
|
|
396
|
+
|
|
397
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<int32_t>::Build().GetId(), int32_t>(
|
|
398
|
+
values, buf.data(), len);
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
if (copied) {
|
|
402
|
+
canvas_native_webgl2_clear_bufferiv(
|
|
403
|
+
buffer,
|
|
404
|
+
drawbuffer,
|
|
405
|
+
buf.data(),
|
|
406
|
+
buf.size(),
|
|
407
|
+
ptr->GetState()
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
static void ClearBufferuiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
static void
|
|
417
|
+
FastClearBufferuiv(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
|
|
418
|
+
const v8::FastApiTypedArray<uint32_t> &values) {
|
|
419
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
420
|
+
if (ptr == nullptr) {
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
auto size = values.length();
|
|
425
|
+
uint32_t *data;
|
|
426
|
+
values.getStorageIfAligned(&data);
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
canvas_native_webgl2_clear_bufferuiv(
|
|
430
|
+
buffer,
|
|
431
|
+
drawbuffer,
|
|
432
|
+
data,
|
|
433
|
+
size,
|
|
434
|
+
ptr->GetState()
|
|
435
|
+
);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
static void
|
|
439
|
+
FastClearBufferuivArray(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
|
|
440
|
+
v8::Local<v8::Array> values) {
|
|
441
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
442
|
+
if (ptr == nullptr) {
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
auto len = values->Length();
|
|
447
|
+
std::vector<uint32_t> buf;
|
|
448
|
+
buf.reserve(len);
|
|
449
|
+
|
|
450
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<uint32_t>::Build().GetId(), uint32_t>(
|
|
451
|
+
values, buf.data(), len);
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
if (copied) {
|
|
455
|
+
canvas_native_webgl2_clear_bufferuiv(
|
|
456
|
+
buffer,
|
|
457
|
+
drawbuffer,
|
|
458
|
+
buf.data(),
|
|
459
|
+
buf.size(),
|
|
460
|
+
ptr->GetState()
|
|
461
|
+
);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
static void ClientWaitSync(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
466
|
+
|
|
467
|
+
static void CompressedTexSubImage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
468
|
+
|
|
469
|
+
static void CopyBufferSubData(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
470
|
+
|
|
471
|
+
static void CopyTexSubImage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
472
|
+
|
|
473
|
+
static void CreateQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
474
|
+
|
|
475
|
+
static void CreateSampler(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
476
|
+
|
|
477
|
+
static void CreateTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
478
|
+
|
|
479
|
+
static void CreateVertexArray(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
480
|
+
|
|
481
|
+
static void DeleteQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
482
|
+
|
|
483
|
+
static void DeleteSampler(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
484
|
+
|
|
485
|
+
static void DeleteSync(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
486
|
+
|
|
487
|
+
static void DeleteTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
488
|
+
|
|
489
|
+
static void DeleteVertexArray(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
490
|
+
|
|
491
|
+
static void DrawArraysInstanced(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
492
|
+
|
|
493
|
+
static void
|
|
494
|
+
FastDrawArraysInstanced(v8::Local<v8::Object> receiver_obj, uint32_t mode, int32_t first,
|
|
495
|
+
int32_t count, int32_t instanceCount) {
|
|
496
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
497
|
+
if (ptr == nullptr) {
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
canvas_native_webgl2_draw_arrays_instanced(
|
|
503
|
+
mode,
|
|
504
|
+
first,
|
|
505
|
+
count,
|
|
506
|
+
instanceCount,
|
|
507
|
+
ptr->GetState()
|
|
508
|
+
);
|
|
509
|
+
|
|
510
|
+
ptr->UpdateInvalidateState();
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
static void DrawBuffers(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
514
|
+
|
|
515
|
+
static void FastDrawBuffers(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Array> buffers) {
|
|
516
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
517
|
+
if (ptr == nullptr) {
|
|
518
|
+
return;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
auto len = buffers->Length();
|
|
522
|
+
std::vector<uint32_t> buf;
|
|
523
|
+
buf.reserve(len);
|
|
524
|
+
|
|
525
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<uint32_t>::Build().GetId(), uint32_t>(
|
|
526
|
+
buffers, buf.data(), len);
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
if (copied) {
|
|
530
|
+
canvas_native_webgl2_draw_buffers(
|
|
531
|
+
buf.data(), buf.size(),
|
|
532
|
+
ptr->GetState());
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
static void DrawElementsInstanced(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
538
|
+
|
|
539
|
+
static void
|
|
540
|
+
FastDrawElementsInstanced(v8::Local<v8::Object> receiver_obj, uint32_t mode, int32_t count,
|
|
541
|
+
uint32_t type, int32_t offset, int32_t instanceCount) {
|
|
542
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
543
|
+
if (ptr == nullptr) {
|
|
544
|
+
return;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
canvas_native_webgl2_draw_elements_instanced(
|
|
549
|
+
mode,
|
|
550
|
+
count,
|
|
551
|
+
type,
|
|
552
|
+
static_cast<ssize_t>(offset),
|
|
553
|
+
instanceCount,
|
|
554
|
+
ptr->GetState()
|
|
555
|
+
);
|
|
556
|
+
|
|
557
|
+
ptr->UpdateInvalidateState();
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
static void DrawRangeElements(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
561
|
+
|
|
562
|
+
static void
|
|
563
|
+
FastDrawRangeElements(v8::Local<v8::Object> receiver_obj, uint32_t mode, uint32_t start,
|
|
564
|
+
uint32_t end, int32_t count, uint32_t type, int32_t offset) {
|
|
565
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
566
|
+
if (ptr == nullptr) {
|
|
567
|
+
return;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
canvas_native_webgl2_draw_range_elements(
|
|
572
|
+
mode,
|
|
573
|
+
start,
|
|
574
|
+
end,
|
|
575
|
+
count,
|
|
576
|
+
type,
|
|
577
|
+
static_cast<ssize_t>(offset),
|
|
578
|
+
ptr->GetState()
|
|
579
|
+
);
|
|
580
|
+
|
|
581
|
+
ptr->UpdateInvalidateState();
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
static void EndQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
585
|
+
|
|
586
|
+
static void EndTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
587
|
+
|
|
588
|
+
static void FenceSync(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
589
|
+
|
|
590
|
+
static void FramebufferTextureLayer(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
591
|
+
|
|
592
|
+
static void GetActiveUniformBlockName(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
593
|
+
|
|
594
|
+
static void GetActiveUniformBlockParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
595
|
+
|
|
596
|
+
static void GetActiveUniforms(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
597
|
+
|
|
598
|
+
static void GetBufferSubData(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
599
|
+
|
|
600
|
+
static void GetFragDataLocation(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
601
|
+
|
|
602
|
+
static void GetIndexedParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
603
|
+
|
|
604
|
+
static void GetInternalformatParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
605
|
+
|
|
606
|
+
static void GetParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
607
|
+
|
|
608
|
+
static void GetQueryParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
609
|
+
|
|
610
|
+
static void GetQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
611
|
+
|
|
612
|
+
static void GetSamplerParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
613
|
+
|
|
614
|
+
static void GetSyncParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
615
|
+
|
|
616
|
+
static void GetTransformFeedbackVarying(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
617
|
+
|
|
618
|
+
static void GetUniformBlockIndex(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
619
|
+
|
|
620
|
+
static void GetUniformIndices(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
621
|
+
|
|
622
|
+
static void InvalidateFramebuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
623
|
+
|
|
624
|
+
static void
|
|
625
|
+
FastInvalidateFramebuffer(v8::Local<v8::Object> receiver_obj, uint32_t target,
|
|
626
|
+
v8::Local<v8::Array> attachments) {
|
|
627
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
628
|
+
if (ptr == nullptr) {
|
|
629
|
+
return;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
auto len = attachments->Length();
|
|
633
|
+
std::vector<uint32_t> buf;
|
|
634
|
+
buf.reserve(len);
|
|
36
635
|
|
|
37
|
-
|
|
636
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<uint32_t>::Build().GetId(), uint32_t>(
|
|
637
|
+
attachments, buf.data(), len);
|
|
38
638
|
|
|
39
|
-
|
|
639
|
+
if (copied) {
|
|
640
|
+
canvas_native_webgl2_invalidate_framebuffer(
|
|
641
|
+
target, buf.data(), buf.size(),
|
|
642
|
+
ptr->GetState());
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
static void InvalidateSubFramebuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
647
|
+
|
|
648
|
+
static void FastInvalidateSubFramebuffer(v8::Local<v8::Object> receiver_obj, uint32_t target,
|
|
649
|
+
v8::Local<v8::Array> attachments, int32_t x, int32_t y,
|
|
650
|
+
int32_t width, int32_t height) {
|
|
651
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
652
|
+
if (ptr == nullptr) {
|
|
653
|
+
return;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
auto len = attachments->Length();
|
|
657
|
+
std::vector<uint32_t> buf;
|
|
658
|
+
buf.reserve(len);
|
|
659
|
+
|
|
660
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<uint32_t>::Build().GetId(), uint32_t>(
|
|
661
|
+
attachments, buf.data(), len);
|
|
662
|
+
|
|
663
|
+
if (copied) {
|
|
664
|
+
|
|
665
|
+
canvas_native_webgl2_invalidate_sub_framebuffer(
|
|
666
|
+
target,
|
|
667
|
+
buf.data(), buf.size(),
|
|
668
|
+
x,
|
|
669
|
+
y,
|
|
670
|
+
width,
|
|
671
|
+
height,
|
|
672
|
+
ptr->GetState());
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
static void IsQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
677
|
+
|
|
678
|
+
static void IsSampler(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
679
|
+
|
|
680
|
+
static void IsSync(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
681
|
+
|
|
682
|
+
static void IsTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
683
|
+
|
|
684
|
+
static void IsVertexArray(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
685
|
+
|
|
686
|
+
static void PauseTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
687
|
+
|
|
688
|
+
static void ReadBuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
689
|
+
|
|
690
|
+
static void RenderbufferStorageMultisample(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
691
|
+
|
|
692
|
+
static void ResumeTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
693
|
+
|
|
694
|
+
static void FastResumeTransformFeedback(v8::Local<v8::Object> receiver_obj) {
|
|
695
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
696
|
+
if (ptr == nullptr) {
|
|
697
|
+
return;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
canvas_native_webgl2_resume_transform_feedback(
|
|
701
|
+
ptr->GetState());
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
static void SamplerParameterf(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
705
|
+
|
|
706
|
+
static void
|
|
707
|
+
FastSamplerParameterf(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> sampler_obj,
|
|
708
|
+
uint32_t pname, double param) {
|
|
709
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
710
|
+
if (ptr == nullptr) {
|
|
711
|
+
return;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
auto type = GetNativeType(sampler_obj);
|
|
715
|
+
if (type == NativeType::WebGLSampler) {
|
|
716
|
+
auto sampler = WebGLSampler::GetPointer(sampler_obj);
|
|
717
|
+
if (sampler != nullptr) {
|
|
718
|
+
canvas_native_webgl2_sampler_parameterf(
|
|
719
|
+
sampler->GetSampler(),
|
|
720
|
+
pname,
|
|
721
|
+
static_cast<float>(param),
|
|
722
|
+
ptr->GetState());
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
static void SamplerParameteri(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
static void
|
|
732
|
+
FastSamplerParameteri(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> sampler_obj,
|
|
733
|
+
uint32_t pname, int32_t param) {
|
|
734
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
735
|
+
if (ptr == nullptr) {
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
auto type = GetNativeType(sampler_obj);
|
|
740
|
+
if (type == NativeType::WebGLSampler) {
|
|
741
|
+
auto sampler = WebGLSampler::GetPointer(sampler_obj);
|
|
742
|
+
if (sampler != nullptr) {
|
|
743
|
+
canvas_native_webgl2_sampler_parameteri(
|
|
744
|
+
sampler->GetSampler(),
|
|
745
|
+
pname,
|
|
746
|
+
param,
|
|
747
|
+
ptr->GetState());
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
static void TexImage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
754
|
+
|
|
755
|
+
static void TexStorage2D(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
756
|
+
|
|
757
|
+
static void TexStorage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
758
|
+
|
|
759
|
+
static void TexSubImage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
760
|
+
|
|
761
|
+
static void TransformFeedbackVaryings(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
762
|
+
|
|
763
|
+
static void Uniform1ui(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
static void
|
|
767
|
+
FastUniform1ui(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
768
|
+
uint32_t v0) {
|
|
769
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
770
|
+
if (ptr == nullptr) {
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
auto type = GetNativeType(location_obj);
|
|
776
|
+
|
|
777
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
778
|
+
|
|
779
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
780
|
+
|
|
781
|
+
if (location != nullptr) {
|
|
782
|
+
canvas_native_webgl2_uniform1ui(
|
|
783
|
+
location->GetUniformLocation(),
|
|
784
|
+
v0,
|
|
785
|
+
ptr->GetState()
|
|
786
|
+
);
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
static void Uniform1uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
793
|
+
|
|
794
|
+
static void
|
|
795
|
+
FastUniform1uiv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
796
|
+
const v8::FastApiTypedArray<uint32_t> &value) {
|
|
797
|
+
WebGLRenderingContext *ptr = GetPointer(receiver_obj);
|
|
798
|
+
if (ptr == nullptr) {
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
803
|
+
|
|
804
|
+
if (location != nullptr) {
|
|
805
|
+
auto size = value.length();
|
|
806
|
+
uint32_t *data;
|
|
807
|
+
value.getStorageIfAligned(&data);
|
|
808
|
+
|
|
809
|
+
canvas_native_webgl2_uniform1uiv(
|
|
810
|
+
location->GetUniformLocation(),
|
|
811
|
+
data, size,
|
|
812
|
+
ptr->GetState());
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
static void Uniform2ui(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
817
|
+
|
|
818
|
+
static void
|
|
819
|
+
FastUniform2ui(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
820
|
+
uint32_t v0, uint32_t v1) {
|
|
821
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
822
|
+
if (ptr == nullptr) {
|
|
823
|
+
return;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
auto type = GetNativeType(location_obj);
|
|
828
|
+
|
|
829
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
830
|
+
|
|
831
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
832
|
+
|
|
833
|
+
if (location != nullptr) {
|
|
834
|
+
canvas_native_webgl2_uniform2ui(
|
|
835
|
+
location->GetUniformLocation(),
|
|
836
|
+
v0, v1,
|
|
837
|
+
ptr->GetState()
|
|
838
|
+
);
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
static void Uniform2uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
845
|
+
|
|
846
|
+
static void
|
|
847
|
+
FastUniform2uiv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
848
|
+
const v8::FastApiTypedArray<uint32_t> &value) {
|
|
849
|
+
WebGLRenderingContext *ptr = GetPointer(receiver_obj);
|
|
850
|
+
if (ptr == nullptr) {
|
|
851
|
+
return;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
855
|
+
|
|
856
|
+
if (location != nullptr) {
|
|
857
|
+
auto size = value.length();
|
|
858
|
+
uint32_t *data;
|
|
859
|
+
value.getStorageIfAligned(&data);
|
|
860
|
+
|
|
861
|
+
canvas_native_webgl2_uniform2uiv(
|
|
862
|
+
location->GetUniformLocation(),
|
|
863
|
+
data, size,
|
|
864
|
+
ptr->GetState());
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
static void Uniform3ui(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
869
|
+
|
|
870
|
+
static void
|
|
871
|
+
FastUniform3ui(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
872
|
+
uint32_t v0, uint32_t v1, uint32_t v2) {
|
|
873
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
874
|
+
if (ptr == nullptr) {
|
|
875
|
+
return;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
auto type = GetNativeType(location_obj);
|
|
880
|
+
|
|
881
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
882
|
+
|
|
883
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
884
|
+
|
|
885
|
+
if (location != nullptr) {
|
|
886
|
+
canvas_native_webgl2_uniform3ui(
|
|
887
|
+
location->GetUniformLocation(),
|
|
888
|
+
v0, v1, v2,
|
|
889
|
+
ptr->GetState()
|
|
890
|
+
);
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
static void Uniform3uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
40
897
|
|
|
41
|
-
|
|
898
|
+
static void
|
|
899
|
+
FastUniform3uiv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
900
|
+
const v8::FastApiTypedArray<uint32_t> &value) {
|
|
901
|
+
WebGLRenderingContext *ptr = GetPointer(receiver_obj);
|
|
902
|
+
if (ptr == nullptr) {
|
|
903
|
+
return;
|
|
904
|
+
}
|
|
42
905
|
|
|
43
|
-
|
|
44
|
-
if (methodName == "READ_BUFFER") { return {0x0C02}; }
|
|
906
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
45
907
|
|
|
46
|
-
if (
|
|
908
|
+
if (location != nullptr) {
|
|
909
|
+
auto size = value.length();
|
|
910
|
+
uint32_t *data;
|
|
911
|
+
value.getStorageIfAligned(&data);
|
|
47
912
|
|
|
48
|
-
|
|
913
|
+
canvas_native_webgl2_uniform3uiv(
|
|
914
|
+
location->GetUniformLocation(),
|
|
915
|
+
data, size,
|
|
916
|
+
ptr->GetState());
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
static void Uniform4ui(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
921
|
+
|
|
922
|
+
static void
|
|
923
|
+
FastUniform4ui(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
924
|
+
uint32_t v0, uint32_t v1, uint32_t v2, uint32_t v3) {
|
|
925
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
926
|
+
if (ptr == nullptr) {
|
|
927
|
+
return;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
auto type = GetNativeType(location_obj);
|
|
932
|
+
|
|
933
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
934
|
+
|
|
935
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
936
|
+
|
|
937
|
+
if (location != nullptr) {
|
|
938
|
+
canvas_native_webgl2_uniform4ui(
|
|
939
|
+
location->GetUniformLocation(),
|
|
940
|
+
v0, v1, v2, v3,
|
|
941
|
+
ptr->GetState()
|
|
942
|
+
);
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
static void Uniform4uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
949
|
+
|
|
950
|
+
|
|
951
|
+
static void
|
|
952
|
+
FastUniform4uiv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
953
|
+
const v8::FastApiTypedArray<uint32_t> &value) {
|
|
954
|
+
WebGLRenderingContext *ptr = GetPointer(receiver_obj);
|
|
955
|
+
if (ptr == nullptr) {
|
|
956
|
+
return;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
960
|
+
|
|
961
|
+
if (location != nullptr) {
|
|
962
|
+
auto size = value.length();
|
|
963
|
+
uint32_t *data;
|
|
964
|
+
value.getStorageIfAligned(&data);
|
|
965
|
+
|
|
966
|
+
canvas_native_webgl2_uniform4uiv(
|
|
967
|
+
location->GetUniformLocation(),
|
|
968
|
+
data, size,
|
|
969
|
+
ptr->GetState());
|
|
970
|
+
}
|
|
971
|
+
}
|
|
49
972
|
|
|
50
|
-
|
|
973
|
+
static void UniformBlockBinding(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
51
974
|
|
|
52
|
-
|
|
975
|
+
static void
|
|
976
|
+
FastUniformBlockBinding(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> program_obj,
|
|
977
|
+
uint32_t uniformBlockIndex, uint32_t uniformBlockBinding) {
|
|
978
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
979
|
+
if (ptr == nullptr) {
|
|
980
|
+
return;
|
|
981
|
+
}
|
|
53
982
|
|
|
54
|
-
if (methodName == "PACK_SKIP_ROWS") { return {0x0D03}; }
|
|
55
983
|
|
|
56
|
-
|
|
984
|
+
auto type = GetNativeType(program_obj);
|
|
985
|
+
if (type == NativeType::WebGLProgram) {
|
|
57
986
|
|
|
58
|
-
|
|
987
|
+
auto program = WebGLProgram::GetPointer(program_obj);
|
|
59
988
|
|
|
60
|
-
|
|
989
|
+
if (program != nullptr) {
|
|
990
|
+
canvas_native_webgl2_uniform_block_binding(
|
|
991
|
+
program->GetProgram(),
|
|
992
|
+
uniformBlockIndex,
|
|
993
|
+
uniformBlockBinding,
|
|
994
|
+
ptr->GetState()
|
|
995
|
+
);
|
|
996
|
+
}
|
|
61
997
|
|
|
62
|
-
|
|
998
|
+
}
|
|
63
999
|
|
|
64
|
-
|
|
1000
|
+
}
|
|
65
1001
|
|
|
66
|
-
|
|
1002
|
+
static void UniformMatrix2x3fv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1003
|
+
|
|
1004
|
+
static void
|
|
1005
|
+
FastUniformMatrix2x3fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1006
|
+
bool transpose, const v8::FastApiTypedArray<float> &data_value) {
|
|
1007
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1008
|
+
if (ptr == nullptr) {
|
|
1009
|
+
return;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
auto type = GetNativeType(location_obj);
|
|
1013
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1014
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1015
|
+
auto size = data_value.length();
|
|
1016
|
+
float *data;
|
|
1017
|
+
data_value.getStorageIfAligned(&data);
|
|
1018
|
+
|
|
1019
|
+
canvas_native_webgl2_uniform_matrix2x3fv(
|
|
1020
|
+
location->GetUniformLocation(),
|
|
1021
|
+
transpose,
|
|
1022
|
+
data, size,
|
|
1023
|
+
ptr->GetState()
|
|
1024
|
+
);
|
|
1025
|
+
}
|
|
67
1026
|
|
|
68
|
-
|
|
1027
|
+
}
|
|
69
1028
|
|
|
70
|
-
|
|
1029
|
+
static void
|
|
1030
|
+
FastUniformMatrix2x3fvArray(v8::Local<v8::Object> receiver_obj,
|
|
1031
|
+
v8::Local<v8::Object> location_obj,
|
|
1032
|
+
bool transpose, v8::Local<v8::Array> data_value) {
|
|
1033
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1034
|
+
if (ptr == nullptr) {
|
|
1035
|
+
return;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
auto type = GetNativeType(location_obj);
|
|
1039
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1040
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1041
|
+
|
|
1042
|
+
auto len = data_value->Length();
|
|
1043
|
+
std::vector<float> buf;
|
|
1044
|
+
buf.reserve(len);
|
|
1045
|
+
|
|
1046
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
|
|
1047
|
+
data_value, buf.data(), len);
|
|
1048
|
+
|
|
1049
|
+
if (copied) {
|
|
1050
|
+
canvas_native_webgl2_uniform_matrix2x3fv(
|
|
1051
|
+
location->GetUniformLocation(),
|
|
1052
|
+
transpose,
|
|
1053
|
+
buf.data(), buf.size(),
|
|
1054
|
+
ptr->GetState()
|
|
1055
|
+
);
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
71
1058
|
|
|
72
|
-
|
|
1059
|
+
}
|
|
73
1060
|
|
|
74
|
-
|
|
1061
|
+
static void UniformMatrix2x4fv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
75
1062
|
|
|
76
|
-
if (methodName == "MAX_ARRAY_TEXTURE_LAYERS") { return {0x88FF}; }
|
|
77
1063
|
|
|
78
|
-
|
|
1064
|
+
static void
|
|
1065
|
+
FastUniformMatrix2x4fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1066
|
+
bool transpose, const v8::FastApiTypedArray<float> &data_value) {
|
|
1067
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1068
|
+
if (ptr == nullptr) {
|
|
1069
|
+
return;
|
|
1070
|
+
}
|
|
79
1071
|
|
|
80
|
-
|
|
1072
|
+
auto type = GetNativeType(location_obj);
|
|
1073
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1074
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1075
|
+
auto size = data_value.length();
|
|
1076
|
+
float *data;
|
|
1077
|
+
data_value.getStorageIfAligned(&data);
|
|
81
1078
|
|
|
82
|
-
|
|
1079
|
+
canvas_native_webgl2_uniform_matrix2x4fv(
|
|
1080
|
+
location->GetUniformLocation(),
|
|
1081
|
+
transpose,
|
|
1082
|
+
data, size,
|
|
1083
|
+
ptr->GetState()
|
|
1084
|
+
);
|
|
1085
|
+
}
|
|
83
1086
|
|
|
84
|
-
|
|
1087
|
+
}
|
|
85
1088
|
|
|
86
|
-
|
|
1089
|
+
static void
|
|
1090
|
+
FastUniformMatrix2x4fvArray(v8::Local<v8::Object> receiver_obj,
|
|
1091
|
+
v8::Local<v8::Object> location_obj,
|
|
1092
|
+
bool transpose, v8::Local<v8::Array> data_value) {
|
|
1093
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1094
|
+
if (ptr == nullptr) {
|
|
1095
|
+
return;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
auto type = GetNativeType(location_obj);
|
|
1099
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1100
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1101
|
+
|
|
1102
|
+
auto len = data_value->Length();
|
|
1103
|
+
std::vector<float> buf;
|
|
1104
|
+
buf.reserve(len);
|
|
1105
|
+
|
|
1106
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
|
|
1107
|
+
data_value, buf.data(), len);
|
|
1108
|
+
|
|
1109
|
+
if (copied) {
|
|
1110
|
+
canvas_native_webgl2_uniform_matrix2x4fv(
|
|
1111
|
+
location->GetUniformLocation(),
|
|
1112
|
+
transpose,
|
|
1113
|
+
buf.data(), buf.size(),
|
|
1114
|
+
ptr->GetState()
|
|
1115
|
+
);
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
87
1118
|
|
|
88
|
-
|
|
89
|
-
if (methodName == "MAX_VERTEX_OUTPUT_COMPONENTS") { return {0x9122}; }
|
|
90
|
-
if (methodName == "MAX_FRAGMENT_INPUT_COMPONENTS") { return {0x9125}; }
|
|
91
|
-
if (methodName == "MAX_SERVER_WAIT_TIMEOUT") { return {0x9111}; }
|
|
92
|
-
if (methodName == "MAX_ELEMENT_INDEX") { return {0x8D6B}; }
|
|
1119
|
+
}
|
|
93
1120
|
|
|
94
|
-
|
|
95
|
-
if (methodName == "RGB8") { return {0x8051}; }
|
|
96
|
-
if (methodName == "RGBA8") { return {0x8058}; }
|
|
97
|
-
if (methodName == "RGB10_A2") { return {0x8059}; }
|
|
98
|
-
if (methodName == "TEXTURE_3D") { return {0x806F}; }
|
|
1121
|
+
static void UniformMatrix3x2fv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
99
1122
|
|
|
100
|
-
if (methodName == "TEXTURE_WRAP_R") { return {0x8072}; }
|
|
101
|
-
if (methodName == "TEXTURE_MIN_LOD") { return {0x813A}; }
|
|
102
|
-
if (methodName == "TEXTURE_MAX_LOD") { return {0x813B}; }
|
|
103
|
-
if (methodName == "TEXTURE_BASE_LEVEL") { return {0x813C}; }
|
|
104
|
-
if (methodName == "TEXTURE_MAX_LEVEL") { return {0x813D}; }
|
|
105
1123
|
|
|
1124
|
+
static void
|
|
1125
|
+
FastUniformMatrix3x2fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1126
|
+
bool transpose, const v8::FastApiTypedArray<float> &data_value) {
|
|
1127
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1128
|
+
if (ptr == nullptr) {
|
|
1129
|
+
return;
|
|
1130
|
+
}
|
|
106
1131
|
|
|
107
|
-
|
|
108
|
-
if (
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
1132
|
+
auto type = GetNativeType(location_obj);
|
|
1133
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1134
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1135
|
+
auto size = data_value.length();
|
|
1136
|
+
float *data;
|
|
1137
|
+
data_value.getStorageIfAligned(&data);
|
|
112
1138
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
1139
|
+
canvas_native_webgl2_uniform_matrix3x2fv(
|
|
1140
|
+
location->GetUniformLocation(),
|
|
1141
|
+
transpose,
|
|
1142
|
+
data, size,
|
|
1143
|
+
ptr->GetState()
|
|
1144
|
+
);
|
|
1145
|
+
}
|
|
118
1146
|
|
|
119
|
-
|
|
120
|
-
if (methodName == "TEXTURE_BINDING_2D_ARRAY") { return {0x8C1D}; }
|
|
121
|
-
if (methodName == "R11F_G11F_B10F") { return {0x8C3A}; }
|
|
122
|
-
if (methodName == "RGB9_E5") { return {0x8C3D}; }
|
|
123
|
-
if (methodName == "RGBA32UI") { return {0x8D70}; }
|
|
1147
|
+
}
|
|
124
1148
|
|
|
1149
|
+
static void
|
|
1150
|
+
FastUniformMatrix3x2fvArray(v8::Local<v8::Object> receiver_obj,
|
|
1151
|
+
v8::Local<v8::Object> location_obj,
|
|
1152
|
+
bool transpose, v8::Local<v8::Array> data_value) {
|
|
1153
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1154
|
+
if (ptr == nullptr) {
|
|
1155
|
+
return;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
auto type = GetNativeType(location_obj);
|
|
1159
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1160
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1161
|
+
|
|
1162
|
+
auto len = data_value->Length();
|
|
1163
|
+
std::vector<float> buf;
|
|
1164
|
+
buf.reserve(len);
|
|
1165
|
+
|
|
1166
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
|
|
1167
|
+
data_value, buf.data(), len);
|
|
1168
|
+
|
|
1169
|
+
if (copied) {
|
|
1170
|
+
canvas_native_webgl2_uniform_matrix3x2fv(
|
|
1171
|
+
location->GetUniformLocation(),
|
|
1172
|
+
transpose,
|
|
1173
|
+
buf.data(), buf.size(),
|
|
1174
|
+
ptr->GetState()
|
|
1175
|
+
);
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
125
1178
|
|
|
126
|
-
|
|
127
|
-
if (methodName == "RGBA16UI") { return {0x8D76}; }
|
|
128
|
-
if (methodName == "RGB16UI") { return {0x8D77}; }
|
|
129
|
-
if (methodName == "RGBA8UI") { return {0x8D7C}; }
|
|
130
|
-
if (methodName == "RGB8UI") { return {0x8D7D}; }
|
|
1179
|
+
}
|
|
131
1180
|
|
|
1181
|
+
static void UniformMatrix3x4fv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
132
1182
|
|
|
133
|
-
if (methodName == "RGBA32I") { return {0x8D82}; }
|
|
134
|
-
if (methodName == "RGB32I") { return {0x8D83}; }
|
|
135
|
-
if (methodName == "RGBA16I") { return {0x8D88}; }
|
|
136
|
-
if (methodName == "RGB16I") { return {0x8D89}; }
|
|
137
|
-
if (methodName == "RGBA8I") { return {0x8D8E}; }
|
|
138
1183
|
|
|
1184
|
+
static void
|
|
1185
|
+
FastUniformMatrix3x4fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1186
|
+
bool transpose, const v8::FastApiTypedArray<float> &data_value) {
|
|
1187
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1188
|
+
if (ptr == nullptr) {
|
|
1189
|
+
return;
|
|
1190
|
+
}
|
|
139
1191
|
|
|
140
|
-
|
|
141
|
-
if (
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
1192
|
+
auto type = GetNativeType(location_obj);
|
|
1193
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1194
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1195
|
+
auto size = data_value.length();
|
|
1196
|
+
float *data;
|
|
1197
|
+
data_value.getStorageIfAligned(&data);
|
|
145
1198
|
|
|
1199
|
+
canvas_native_webgl2_uniform_matrix3x4fv(
|
|
1200
|
+
location->GetUniformLocation(),
|
|
1201
|
+
transpose,
|
|
1202
|
+
data, size,
|
|
1203
|
+
ptr->GetState()
|
|
1204
|
+
);
|
|
1205
|
+
}
|
|
146
1206
|
|
|
147
|
-
|
|
148
|
-
if (methodName == "R16F") { return {0x822D}; }
|
|
149
|
-
if (methodName == "R32F") { return {0x822E}; }
|
|
150
|
-
if (methodName == "RG16F") { return {0x822F}; }
|
|
151
|
-
if (methodName == "RG32F") { return {0x8230}; }
|
|
1207
|
+
}
|
|
152
1208
|
|
|
1209
|
+
static void
|
|
1210
|
+
FastUniformMatrix3x4fvArray(v8::Local<v8::Object> receiver_obj,
|
|
1211
|
+
v8::Local<v8::Object> location_obj,
|
|
1212
|
+
bool transpose, v8::Local<v8::Array> data_value) {
|
|
1213
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1214
|
+
if (ptr == nullptr) {
|
|
1215
|
+
return;
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
auto type = GetNativeType(location_obj);
|
|
1219
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1220
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1221
|
+
|
|
1222
|
+
auto len = data_value->Length();
|
|
1223
|
+
std::vector<float> buf;
|
|
1224
|
+
buf.reserve(len);
|
|
1225
|
+
|
|
1226
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
|
|
1227
|
+
data_value, buf.data(), len);
|
|
1228
|
+
|
|
1229
|
+
if (copied) {
|
|
1230
|
+
canvas_native_webgl2_uniform_matrix3x4fv(
|
|
1231
|
+
location->GetUniformLocation(),
|
|
1232
|
+
transpose,
|
|
1233
|
+
buf.data(), buf.size(),
|
|
1234
|
+
ptr->GetState()
|
|
1235
|
+
);
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
153
1238
|
|
|
154
|
-
|
|
155
|
-
if (methodName == "R8UI") { return {0x8232}; }
|
|
156
|
-
if (methodName == "R16I") { return {0x8233}; }
|
|
157
|
-
if (methodName == "R16UI") { return {0x8234}; }
|
|
158
|
-
if (methodName == "R32I") { return {0x8235}; }
|
|
1239
|
+
}
|
|
159
1240
|
|
|
160
1241
|
|
|
161
|
-
|
|
162
|
-
if (methodName == "RG8I") { return {0x8237}; }
|
|
163
|
-
if (methodName == "RG8UI") { return {0x8238}; }
|
|
164
|
-
if (methodName == "RG16I") { return {0x8239}; }
|
|
165
|
-
if (methodName == "RG16UI") { return {0x823A}; }
|
|
166
|
-
|
|
167
|
-
if (methodName == "RG32I") { return {0x823B}; }
|
|
168
|
-
if (methodName == "RG32UI") { return {0x823C}; }
|
|
169
|
-
if (methodName == "R8_SNORM") { return {0x8F94}; }
|
|
170
|
-
if (methodName == "RG8_SNORM") { return {0x8F95}; }
|
|
171
|
-
if (methodName == "RGB8_SNORM") { return {0x8F96}; }
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
if (methodName == "RGBA8_SNORM") { return {0x8F97}; }
|
|
175
|
-
if (methodName == "RGB10_A2UI") { return {0x906F}; }
|
|
176
|
-
if (methodName == "TEXTURE_IMMUTABLE_FORMAT") { return {0x912F}; }
|
|
177
|
-
if (methodName == "TEXTURE_IMMUTABLE_LEVELS") { return {0x82DF}; }
|
|
178
|
-
if (methodName == "UNSIGNED_INT_2_10_10_10_REV") { return {0x8368}; }
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
if (methodName == "UNSIGNED_INT_10F_11F_11F_REV") { return {0x8C3B}; }
|
|
182
|
-
if (methodName == "UNSIGNED_INT_5_9_9_9_REV") { return {0x8C3E}; }
|
|
183
|
-
if (methodName == "FLOAT_32_UNSIGNED_INT_24_8_REV") { return {0x8DAD}; }
|
|
184
|
-
if (methodName == "UNSIGNED_INT_24_8") { return {0x84FA}; }
|
|
185
|
-
if (methodName == "HALF_FLOAT") { return {0x140B}; }
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
if (methodName == "RG") { return {0x8227}; }
|
|
189
|
-
if (methodName == "RG_INTEGER") { return {0x8228}; }
|
|
190
|
-
if (methodName == "INT_2_10_10_10_REV") { return {0x8D9F}; }
|
|
191
|
-
if (methodName == "QUERY_RESULT_AVAILABLE") { return {0x8865}; }
|
|
192
|
-
if (methodName == "QUERY_RESULT") { return {0x8866}; }
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
if (methodName == "CURRENT_QUERY") { return {0x8867}; }
|
|
196
|
-
if (methodName == "ANY_SAMPLES_PASSED") { return {0x8C2F}; }
|
|
197
|
-
if (methodName == "ANY_SAMPLES_PASSED_CONSERVATIVE") { return {0x8D6A}; }
|
|
198
|
-
if (methodName == "MAX_DRAW_BUFFERS") { return {0x8824}; }
|
|
199
|
-
|
|
200
|
-
if (methodName == "DRAW_BUFFER0") { return {0x8825}; }
|
|
201
|
-
if (methodName == "DRAW_BUFFER1") { return {0x8826}; }
|
|
202
|
-
if (methodName == "DRAW_BUFFER2") { return {0x8827}; }
|
|
203
|
-
if (methodName == "DRAW_BUFFER3") { return {0x8828}; }
|
|
204
|
-
if (methodName == "DRAW_BUFFER4") { return {0x8829}; }
|
|
205
|
-
if (methodName == "DRAW_BUFFER5") { return {0x882A}; }
|
|
206
|
-
if (methodName == "DRAW_BUFFER6") { return {0x882B}; }
|
|
207
|
-
if (methodName == "DRAW_BUFFER7") { return {0x882C}; }
|
|
208
|
-
if (methodName == "DRAW_BUFFER8") { return {0x882D}; }
|
|
209
|
-
if (methodName == "DRAW_BUFFER9") { return {0x882E}; }
|
|
210
|
-
if (methodName == "DRAW_BUFFER10") { return {0x882F}; }
|
|
211
|
-
|
|
212
|
-
/* Getting GL parameter information */
|
|
213
|
-
|
|
214
|
-
/* Textures */
|
|
215
|
-
|
|
216
|
-
if (methodName == "DRAW_BUFFER11") { return {0x8830}; }
|
|
217
|
-
if (methodName == "DRAW_BUFFER12") { return {0x8831}; }
|
|
218
|
-
if (methodName == "DRAW_BUFFER13") { return {0x8832}; }
|
|
219
|
-
if (methodName == "DRAW_BUFFER14") { return {0x8833}; }
|
|
220
|
-
if (methodName == "DRAW_BUFFER15") { return {0x8834}; }
|
|
221
|
-
|
|
222
|
-
if (methodName == "MAX_COLOR_ATTACHMENTS") { return {0x8CDF}; }
|
|
223
|
-
if (methodName == "COLOR_ATTACHMENT1") { return {0x8CE1}; }
|
|
224
|
-
if (methodName == "COLOR_ATTACHMENT2") { return {0x8CE2}; }
|
|
225
|
-
if (methodName == "COLOR_ATTACHMENT3") { return {0x8CE3}; }
|
|
226
|
-
if (methodName == "COLOR_ATTACHMENT4") { return {0x8CE4}; }
|
|
227
|
-
if (methodName == "COLOR_ATTACHMENT5") { return {0x8CE5}; }
|
|
228
|
-
if (methodName == "COLOR_ATTACHMENT6") { return {0x8CE6}; }
|
|
229
|
-
if (methodName == "COLOR_ATTACHMENT7") { return {0x8CE7}; }
|
|
230
|
-
if (methodName == "COLOR_ATTACHMENT8") { return {0x8CE8}; }
|
|
231
|
-
if (methodName == "COLOR_ATTACHMENT9") { return {0x8CE9}; }
|
|
232
|
-
if (methodName == "COLOR_ATTACHMENT10") { return {0x8CEA}; }
|
|
233
|
-
if (methodName == "COLOR_ATTACHMENT11") { return {0x8CEB}; }
|
|
234
|
-
if (methodName == "COLOR_ATTACHMENT12") { return {0x8CEC}; }
|
|
235
|
-
if (methodName == "COLOR_ATTACHMENT13") { return {0x8CED}; }
|
|
236
|
-
if (methodName == "COLOR_ATTACHMENT14") { return {0x8CEE}; }
|
|
237
|
-
if (methodName == "COLOR_ATTACHMENT15") { return {0x8CEF}; }
|
|
238
|
-
|
|
239
|
-
if (methodName == "SAMPLER_3D") { return {0x8B5F}; }
|
|
240
|
-
if (methodName == "SAMPLER_2D_SHADOW") { return {0x8B62}; }
|
|
241
|
-
if (methodName == "SAMPLER_2D_ARRAY") { return {0x8DC1}; }
|
|
242
|
-
if (methodName == "SAMPLER_2D_ARRAY_SHADOW") { return {0x8DC4}; }
|
|
243
|
-
if (methodName == "SAMPLER_CUBE_SHADOW") { return {0x8DC5}; }
|
|
244
|
-
|
|
245
|
-
if (methodName == "INT_SAMPLER_2D") { return {0x8DCA}; }
|
|
246
|
-
if (methodName == "INT_SAMPLER_3D") { return {0x8DCB}; }
|
|
247
|
-
if (methodName == "INT_SAMPLER_CUBE") { return {0x8DCC}; }
|
|
248
|
-
if (methodName == "INT_SAMPLER_2D_ARRAY") { return {0x8DCF}; }
|
|
249
|
-
if (methodName == "UNSIGNED_INT_SAMPLER_2D") { return {0x8DD2}; }
|
|
250
|
-
|
|
251
|
-
if (methodName == "UNSIGNED_INT_SAMPLER_3D") { return {0x8DD3}; }
|
|
252
|
-
if (methodName == "UNSIGNED_INT_SAMPLER_CUBE") { return {0x8DD4}; }
|
|
253
|
-
if (methodName == "UNSIGNED_INT_SAMPLER_2D_ARRAY") { return {0x8DD7}; }
|
|
254
|
-
if (methodName == "MAX_SAMPLES") { return {0x8D57}; }
|
|
255
|
-
if (methodName == "SAMPLER_BINDING") { return {0x8919}; }
|
|
256
|
-
|
|
257
|
-
if (methodName == "PIXEL_PACK_BUFFER") { return {0x88EB}; }
|
|
258
|
-
if (methodName == "PIXEL_UNPACK_BUFFER") { return {0x88EC}; }
|
|
259
|
-
if (methodName == "PIXEL_PACK_BUFFER_BINDING") { return {0x88ED}; }
|
|
260
|
-
if (methodName == "PIXEL_UNPACK_BUFFER_BINDING") { return {0x88EF}; }
|
|
261
|
-
if (methodName == "COPY_READ_BUFFER") { return {0x8F36}; }
|
|
262
|
-
|
|
263
|
-
if (methodName == "COPY_WRITE_BUFFER") { return {0x8F37}; }
|
|
264
|
-
if (methodName == "COPY_READ_BUFFER_BINDING") { return {0x8F36}; }
|
|
265
|
-
if (methodName == "COPY_WRITE_BUFFER_BINDING") { return {0x8F37}; }
|
|
266
|
-
if (methodName == "FLOAT_MAT2x3") { return {0x8B65}; }
|
|
267
|
-
if (methodName == "FLOAT_MAT2x4") { return {0x8B66}; }
|
|
268
|
-
|
|
269
|
-
if (methodName == "FLOAT_MAT3x2") { return {0x8B67}; }
|
|
270
|
-
if (methodName == "FLOAT_MAT3x4") { return {0x8B68}; }
|
|
271
|
-
if (methodName == "FLOAT_MAT4x2") { return {0x8B69}; }
|
|
272
|
-
if (methodName == "FLOAT_MAT4x3") { return {0x8B6A}; }
|
|
273
|
-
if (methodName == "UNSIGNED_INT_VEC2") { return {0x8DC6}; }
|
|
274
|
-
|
|
275
|
-
if (methodName == "UNSIGNED_INT_VEC3") { return {0x8DC7}; }
|
|
276
|
-
if (methodName == "UNSIGNED_INT_VEC4") { return {0x8DC8}; }
|
|
277
|
-
if (methodName == "UNSIGNED_NORMALIZED") { return {0x8C17}; }
|
|
278
|
-
if (methodName == "SIGNED_NORMALIZED") { return {0x8F9C}; }
|
|
279
|
-
|
|
280
|
-
/* Vertex attributes */
|
|
281
|
-
|
|
282
|
-
if (methodName == "VERTEX_ATTRIB_ARRAY_INTEGER") { return {0x88FD}; }
|
|
283
|
-
if (methodName == "VERTEX_ATTRIB_ARRAY_DIVISOR") { return {0x88FE}; }
|
|
284
|
-
if (methodName == "TRANSFORM_FEEDBACK_BUFFER_MODE") { return {0x8C7F}; }
|
|
285
|
-
if (methodName == "MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS") { return {0x8C80}; }
|
|
286
|
-
if (methodName == "TRANSFORM_FEEDBACK_VARYINGS") { return {0x8C83}; }
|
|
287
|
-
|
|
288
|
-
if (methodName == "TRANSFORM_FEEDBACK_BUFFER_START") { return {0x8C84}; }
|
|
289
|
-
if (methodName == "TRANSFORM_FEEDBACK_BUFFER_SIZE") { return {0x8C85}; }
|
|
290
|
-
if (methodName == "TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN") { return {0x8C88}; }
|
|
291
|
-
if (methodName == "MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS") { return {0x8C8A}; }
|
|
292
|
-
|
|
293
|
-
/* Textures */
|
|
294
|
-
|
|
295
|
-
/* Pixel types */
|
|
296
|
-
|
|
297
|
-
if (methodName == "MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS") { return {0x8C8B}; }
|
|
298
|
-
if (methodName == "INTERLEAVED_ATTRIBS") { return {0x8C8C}; }
|
|
299
|
-
if (methodName == "SEPARATE_ATTRIBS") { return {0x8C8D}; }
|
|
300
|
-
if (methodName == "TRANSFORM_FEEDBACK_BUFFER") { return {0x8C8E}; }
|
|
301
|
-
if (methodName == "TRANSFORM_FEEDBACK_BUFFER_BINDING") { return {0x8C8F}; }
|
|
302
|
-
|
|
303
|
-
if (methodName == "TRANSFORM_FEEDBACK") { return {0x8E22}; }
|
|
304
|
-
if (methodName == "TRANSFORM_FEEDBACK_PAUSED") { return {0x8E23}; }
|
|
305
|
-
if (methodName == "TRANSFORM_FEEDBACK_ACTIVE") { return {0x8E24}; }
|
|
306
|
-
if (methodName == "TRANSFORM_FEEDBACK_BINDING") { return {0x8E25}; }
|
|
307
|
-
|
|
308
|
-
/* Pixel types */
|
|
309
|
-
|
|
310
|
-
/* Queries */
|
|
311
|
-
|
|
312
|
-
if (methodName == "FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING") { return {0x8210}; }
|
|
313
|
-
if (methodName == "FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE") { return {0x8211}; }
|
|
314
|
-
if (methodName == "FRAMEBUFFER_ATTACHMENT_RED_SIZE") { return {0x8212}; }
|
|
315
|
-
if (methodName == "FRAMEBUFFER_ATTACHMENT_GREEN_SIZE") { return {0x8213}; }
|
|
316
|
-
if (methodName == "FRAMEBUFFER_ATTACHMENT_BLUE_SIZE") { return {0x8214}; }
|
|
317
|
-
|
|
318
|
-
/* Queries */
|
|
319
|
-
|
|
320
|
-
/* Draw buffers */
|
|
321
|
-
|
|
322
|
-
if (methodName == "FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE") { return {0x8215}; }
|
|
323
|
-
if (methodName == "FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE") { return {0x8216}; }
|
|
324
|
-
if (methodName == "FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE") { return {0x8217}; }
|
|
325
|
-
if (methodName == "FRAMEBUFFER_DEFAULT") { return {0x8218}; }
|
|
326
|
-
if (methodName == "DEPTH_STENCIL_ATTACHMENT") { return {0x821A}; }
|
|
327
|
-
|
|
328
|
-
if (methodName == "DEPTH_STENCIL") { return {0x84F9}; }
|
|
329
|
-
if (methodName == "DEPTH24_STENCIL8") { return {0x88F0}; }
|
|
330
|
-
if (methodName == "DRAW_FRAMEBUFFER_BINDING") { return {0x8CA6}; }
|
|
331
|
-
if (methodName == "READ_FRAMEBUFFER") { return {0x8CA8}; }
|
|
332
|
-
if (methodName == "DRAW_FRAMEBUFFER") { return {0x8CA9}; }
|
|
333
|
-
|
|
334
|
-
if (methodName == "READ_FRAMEBUFFER_BINDING") { return {0x8CAA}; }
|
|
335
|
-
if (methodName == "RENDERBUFFER_SAMPLES") { return {0x8CAB}; }
|
|
336
|
-
if (methodName == "FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER") { return {0x8CD4}; }
|
|
337
|
-
if (methodName == "FRAMEBUFFER_INCOMPLETE_MULTISAMPLE") { return {0x8D56}; }
|
|
338
|
-
if (methodName == "UNIFORM_BUFFER") { return {0x8A11}; }
|
|
339
|
-
|
|
340
|
-
if (methodName == "UNIFORM_BUFFER_BINDING") { return {0x8A28}; }
|
|
341
|
-
if (methodName == "UNIFORM_BUFFER_START") { return {0x8A29}; }
|
|
342
|
-
if (methodName == "UNIFORM_BUFFER_SIZE") { return {0x8A2A}; }
|
|
343
|
-
if (methodName == "MAX_VERTEX_UNIFORM_BLOCKS") { return {0x8A2B}; }
|
|
344
|
-
if (methodName == "MAX_FRAGMENT_UNIFORM_BLOCKS") { return {0x8A2D}; }
|
|
345
|
-
|
|
346
|
-
if (methodName == "MAX_COMBINED_UNIFORM_BLOCKS") { return {0x8A2E}; }
|
|
347
|
-
if (methodName == "MAX_UNIFORM_BUFFER_BINDINGS") { return {0x8A2F}; }
|
|
348
|
-
if (methodName == "MAX_UNIFORM_BLOCK_SIZE") { return {0x8A30}; }
|
|
349
|
-
if (methodName == "MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS") { return {0x8A31}; }
|
|
350
|
-
if (methodName == "MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS") { return {0x8A33}; }
|
|
351
|
-
|
|
352
|
-
if (methodName == "UNIFORM_BUFFER_OFFSET_ALIGNMENT") { return {0x8A34}; }
|
|
353
|
-
if (methodName == "ACTIVE_UNIFORM_BLOCKS") { return {0x8A36}; }
|
|
354
|
-
if (methodName == "UNIFORM_TYPE") { return {0x8A37}; }
|
|
355
|
-
if (methodName == "UNIFORM_SIZE") { return {0x8A38}; }
|
|
356
|
-
if (methodName == "UNIFORM_BLOCK_INDEX") { return {0x8A3A}; }
|
|
357
|
-
|
|
358
|
-
if (methodName == "UNIFORM_OFFSET") { return {0x8A3B}; }
|
|
359
|
-
if (methodName == "UNIFORM_ARRAY_STRIDE") { return {0x8A3C}; }
|
|
360
|
-
if (methodName == "UNIFORM_MATRIX_STRIDE") { return {0x8A3D}; }
|
|
1242
|
+
static void UniformMatrix4x2fv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
361
1243
|
|
|
362
|
-
|
|
1244
|
+
static void
|
|
1245
|
+
FastUniformMatrix4x2fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1246
|
+
bool transpose, const v8::FastApiTypedArray<float> &data_value) {
|
|
1247
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1248
|
+
if (ptr == nullptr) {
|
|
1249
|
+
return;
|
|
1250
|
+
}
|
|
363
1251
|
|
|
364
|
-
|
|
1252
|
+
auto type = GetNativeType(location_obj);
|
|
1253
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1254
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1255
|
+
auto size = data_value.length();
|
|
1256
|
+
float *data;
|
|
1257
|
+
data_value.getStorageIfAligned(&data);
|
|
365
1258
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
1259
|
+
canvas_native_webgl2_uniform_matrix4x2fv(
|
|
1260
|
+
location->GetUniformLocation(),
|
|
1261
|
+
transpose,
|
|
1262
|
+
data, size,
|
|
1263
|
+
ptr->GetState()
|
|
1264
|
+
);
|
|
1265
|
+
}
|
|
371
1266
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
static void
|
|
1270
|
+
FastUniformMatrix4x2fvArray(v8::Local<v8::Object> receiver_obj,
|
|
1271
|
+
v8::Local<v8::Object> location_obj,
|
|
1272
|
+
bool transpose, v8::Local<v8::Array> data_value) {
|
|
1273
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1274
|
+
if (ptr == nullptr) {
|
|
1275
|
+
return;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
auto type = GetNativeType(location_obj);
|
|
1279
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1280
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1281
|
+
|
|
1282
|
+
auto len = data_value->Length();
|
|
1283
|
+
std::vector<float> buf;
|
|
1284
|
+
buf.reserve(len);
|
|
1285
|
+
|
|
1286
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
|
|
1287
|
+
data_value, buf.data(), len);
|
|
1288
|
+
|
|
1289
|
+
if (copied) {
|
|
1290
|
+
canvas_native_webgl2_uniform_matrix4x2fv(
|
|
1291
|
+
location->GetUniformLocation(),
|
|
1292
|
+
transpose,
|
|
1293
|
+
buf.data(), buf.size(),
|
|
1294
|
+
ptr->GetState()
|
|
1295
|
+
);
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
}
|
|
377
1300
|
|
|
378
|
-
|
|
379
|
-
if (methodName == "SYNC_FENCE") { return {0x9116}; }
|
|
380
|
-
if (methodName == "SYNC_GPU_COMMANDS_COMPLETE") { return {0x9117}; }
|
|
381
|
-
if (methodName == "UNSIGNALED") { return {0x9118}; }
|
|
382
|
-
if (methodName == "SIGNALED") { return {0x9119}; }
|
|
1301
|
+
static void UniformMatrix4x3fv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
383
1302
|
|
|
384
|
-
/* Samplers */
|
|
385
1303
|
|
|
386
|
-
|
|
1304
|
+
static void
|
|
1305
|
+
FastUniformMatrix4x3fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1306
|
+
bool transpose, const v8::FastApiTypedArray<float> &data_value) {
|
|
1307
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1308
|
+
if (ptr == nullptr) {
|
|
1309
|
+
return;
|
|
1310
|
+
}
|
|
387
1311
|
|
|
388
|
-
|
|
389
|
-
if (
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
1312
|
+
auto type = GetNativeType(location_obj);
|
|
1313
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1314
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1315
|
+
auto size = data_value.length();
|
|
1316
|
+
float *data;
|
|
1317
|
+
data_value.getStorageIfAligned(&data);
|
|
393
1318
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
1319
|
+
canvas_native_webgl2_uniform_matrix4x3fv(
|
|
1320
|
+
location->GetUniformLocation(),
|
|
1321
|
+
transpose,
|
|
1322
|
+
data, size,
|
|
1323
|
+
ptr->GetState()
|
|
1324
|
+
);
|
|
1325
|
+
}
|
|
397
1326
|
|
|
398
|
-
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
static void
|
|
1330
|
+
FastUniformMatrix4x3fvArray(v8::Local<v8::Object> receiver_obj,
|
|
1331
|
+
v8::Local<v8::Object> location_obj,
|
|
1332
|
+
bool transpose, v8::Local<v8::Array> data_value) {
|
|
1333
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1334
|
+
if (ptr == nullptr) {
|
|
1335
|
+
return;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
auto type = GetNativeType(location_obj);
|
|
1339
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1340
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1341
|
+
|
|
1342
|
+
auto len = data_value->Length();
|
|
1343
|
+
std::vector<float> buf;
|
|
1344
|
+
buf.reserve(len);
|
|
1345
|
+
|
|
1346
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
|
|
1347
|
+
data_value, buf.data(), len);
|
|
1348
|
+
|
|
1349
|
+
if (copied) {
|
|
1350
|
+
canvas_native_webgl2_uniform_matrix4x3fv(
|
|
1351
|
+
location->GetUniformLocation(),
|
|
1352
|
+
transpose,
|
|
1353
|
+
buf.data(), buf.size(),
|
|
1354
|
+
ptr->GetState()
|
|
1355
|
+
);
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
}
|
|
399
1360
|
|
|
400
|
-
|
|
1361
|
+
static void VertexAttribDivisor(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
401
1362
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
if (
|
|
406
|
-
|
|
1363
|
+
static void
|
|
1364
|
+
FastVertexAttribDivisor(v8::Local<v8::Object> receiver_obj, uint32_t index, uint32_t divisor) {
|
|
1365
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1366
|
+
if (ptr == nullptr) {
|
|
1367
|
+
return;
|
|
1368
|
+
}
|
|
407
1369
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
if (methodName == "DEPTH32F_STENCIL8") { return {0x8CAD}; }
|
|
1370
|
+
canvas_native_webgl2_vertex_attrib_divisor(
|
|
1371
|
+
index,
|
|
1372
|
+
divisor,
|
|
1373
|
+
ptr->GetState()
|
|
1374
|
+
);
|
|
414
1375
|
|
|
415
|
-
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
static void VertexAttribI4i(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1379
|
+
|
|
1380
|
+
static void
|
|
1381
|
+
FastVertexAttribI4i(v8::Local<v8::Object> receiver_obj, int32_t index, int32_t v0, int32_t v1,
|
|
1382
|
+
int32_t v2, int32_t v3) {
|
|
1383
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1384
|
+
if (ptr == nullptr) {
|
|
1385
|
+
return;
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
|
|
1389
|
+
canvas_native_webgl2_vertex_attrib_i4i(
|
|
1390
|
+
index,
|
|
1391
|
+
v0,
|
|
1392
|
+
v1,
|
|
1393
|
+
v2,
|
|
1394
|
+
v3,
|
|
1395
|
+
ptr->GetState()
|
|
1396
|
+
);
|
|
1397
|
+
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
static void VertexAttribI4iv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1401
|
+
|
|
1402
|
+
static void FastVertexAttribI4iv(v8::Local<v8::Object> receiver_obj, uint32_t index,
|
|
1403
|
+
const v8::FastApiTypedArray<int32_t> &data_value) {
|
|
1404
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1405
|
+
if (ptr == nullptr) {
|
|
1406
|
+
return;
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
auto size = data_value.length();
|
|
1410
|
+
int32_t *data;
|
|
1411
|
+
data_value.getStorageIfAligned(&data);
|
|
1412
|
+
|
|
1413
|
+
canvas_native_webgl2_vertex_attrib_i4iv(
|
|
1414
|
+
index,
|
|
1415
|
+
data, size,
|
|
1416
|
+
ptr->GetState()
|
|
1417
|
+
);
|
|
1418
|
+
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
static void FastVertexAttribI4ivArray(v8::Local<v8::Object> receiver_obj, uint32_t index,
|
|
1422
|
+
v8::Local<v8::Array> data_value) {
|
|
1423
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1424
|
+
if (ptr == nullptr) {
|
|
1425
|
+
return;
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
auto len = data_value->Length();
|
|
1429
|
+
std::vector<int32_t> buf;
|
|
1430
|
+
buf.reserve(len);
|
|
1431
|
+
|
|
1432
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<int32_t>::Build().GetId(), int32_t>(
|
|
1433
|
+
data_value, buf.data(), len);
|
|
1434
|
+
|
|
1435
|
+
|
|
1436
|
+
if (copied) {
|
|
1437
|
+
canvas_native_webgl2_vertex_attrib_i4iv(
|
|
1438
|
+
index,
|
|
1439
|
+
buf.data(), buf.size(),
|
|
1440
|
+
ptr->GetState()
|
|
1441
|
+
);
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
static void VertexAttribI4ui(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1447
|
+
|
|
1448
|
+
static void
|
|
1449
|
+
FastVertexAttribI4ui(v8::Local<v8::Object> receiver_obj, uint32_t index, uint32_t v0,
|
|
1450
|
+
uint32_t v1,
|
|
1451
|
+
uint32_t v2, uint32_t v3) {
|
|
1452
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1453
|
+
if (ptr == nullptr) {
|
|
1454
|
+
return;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
|
|
1458
|
+
canvas_native_webgl2_vertex_attrib_i4ui(
|
|
1459
|
+
index,
|
|
1460
|
+
v0,
|
|
1461
|
+
v1,
|
|
1462
|
+
v2,
|
|
1463
|
+
v3,
|
|
1464
|
+
ptr->GetState()
|
|
1465
|
+
);
|
|
1466
|
+
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
static void VertexAttribI4uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1470
|
+
|
|
1471
|
+
|
|
1472
|
+
static void FastVertexAttribI4uiv(v8::Local<v8::Object> receiver_obj, uint32_t index,
|
|
1473
|
+
const v8::FastApiTypedArray<uint32_t> &data_value) {
|
|
1474
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1475
|
+
if (ptr == nullptr) {
|
|
1476
|
+
return;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
auto size = data_value.length();
|
|
1480
|
+
uint32_t *data;
|
|
1481
|
+
data_value.getStorageIfAligned(&data);
|
|
1482
|
+
|
|
1483
|
+
canvas_native_webgl2_vertex_attrib_i4uiv(
|
|
1484
|
+
index,
|
|
1485
|
+
data, size,
|
|
1486
|
+
ptr->GetState()
|
|
1487
|
+
);
|
|
1488
|
+
|
|
1489
|
+
}
|
|
416
1490
|
|
|
417
|
-
|
|
418
|
-
|
|
1491
|
+
static void FastVertexAttribI4uivArray(v8::Local<v8::Object> receiver_obj, uint32_t index,
|
|
1492
|
+
v8::Local<v8::Array> data_value) {
|
|
1493
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1494
|
+
if (ptr == nullptr) {
|
|
1495
|
+
return;
|
|
1496
|
+
}
|
|
419
1497
|
|
|
420
|
-
|
|
1498
|
+
auto len = data_value->Length();
|
|
1499
|
+
std::vector<uint32_t> buf;
|
|
1500
|
+
buf.reserve(len);
|
|
421
1501
|
|
|
422
|
-
|
|
1502
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<uint32_t>::Build().GetId(), uint32_t>(
|
|
1503
|
+
data_value, buf.data(), len);
|
|
423
1504
|
|
|
424
|
-
if (methodName == "MAX_CLIENT_WAIT_TIMEOUT_WEBGL") { return {0x9247}; }
|
|
425
1505
|
|
|
426
|
-
|
|
1506
|
+
if (copied) {
|
|
1507
|
+
canvas_native_webgl2_vertex_attrib_i4uiv(
|
|
1508
|
+
index,
|
|
1509
|
+
buf.data(), buf.size(),
|
|
1510
|
+
ptr->GetState()
|
|
1511
|
+
);
|
|
1512
|
+
}
|
|
427
1513
|
|
|
428
|
-
return jsi::Value::undefined();
|
|
429
1514
|
}
|
|
430
1515
|
|
|
431
1516
|
};
|