@nativescript/canvas 2.0.0-alpha.9 → 2.0.0-beta.0
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 +705 -452
- package/Canvas/common.js.map +1 -1
- package/Canvas/index.android.d.ts +10 -1
- package/Canvas/index.android.js +155 -52
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.d.ts +8 -0
- package/Canvas/index.ios.d.ts +7 -4
- package/Canvas/index.ios.js +159 -106
- 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 +9 -5
- package/Canvas2D/CanvasRenderingContext2D/index.js +174 -245
- 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 +132 -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 +2808 -68
- 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 +5847 -2633
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +43 -25
- 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 +43 -25
- 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 +264 -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 +2808 -68
- 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 +5847 -2633
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +43 -25
- 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 +43 -25
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +5847 -2633
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +43 -25
- 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 +43 -25
- 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 +2809 -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 +136 -0
- package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.h +88 -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 +110 -0
- package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.h +149 -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 +38 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.h +157 -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 +4564 -0
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.h +1790 -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 -6156
- package/platforms/ios/src/cpp/canvas-cxx/src/lib.rs.h +0 -2867
- 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 -1972
- 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 -4543
- 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,1859 @@
|
|
|
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::CFunction fast_copy_tex_sub_image_3d_;
|
|
87
|
+
static v8::CFunction fast_copy_buffer_sub_data_;
|
|
88
|
+
|
|
89
|
+
static v8::CFunction fast_delete_query_;
|
|
90
|
+
static v8::CFunction fast_delete_sampler_;
|
|
91
|
+
static v8::CFunction fast_delete_sync_;
|
|
92
|
+
static v8::CFunction fast_delete_transform_feedback_;
|
|
93
|
+
static v8::CFunction fast_delete_vertex_array_;
|
|
94
|
+
|
|
95
|
+
static v8::CFunction fast_end_query_;
|
|
96
|
+
static v8::CFunction fast_end_transform_feedback_;
|
|
97
|
+
static v8::CFunction fast_framebuffer_texture_layer_;
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
static v8::CFunction fast_pause_transform_feedback_;
|
|
101
|
+
static v8::CFunction fast_read_buffer_;
|
|
102
|
+
static v8::CFunction fast_renderbuffer_storage_multisample_;
|
|
103
|
+
|
|
104
|
+
static v8::CFunction fast_is_query_;
|
|
105
|
+
static v8::CFunction fast_is_sampler_;
|
|
106
|
+
static v8::CFunction fast_is_sync_;
|
|
107
|
+
static v8::CFunction fast_is_transform_feedback_;
|
|
108
|
+
static v8::CFunction fast_is_vertex_array_;
|
|
109
|
+
|
|
110
|
+
static v8::Local<v8::FunctionTemplate> GetCtor(v8::Isolate *isolate);
|
|
111
|
+
|
|
112
|
+
static v8::Local<v8::Object>
|
|
113
|
+
NewInstance(v8::Isolate *isolate, WebGL2RenderingContext *renderingContext) {
|
|
114
|
+
auto context = isolate->GetCurrentContext();
|
|
115
|
+
v8::EscapableHandleScope scope(isolate);
|
|
116
|
+
auto object = WebGL2RenderingContext::GetCtor(isolate)->GetFunction(
|
|
117
|
+
context).ToLocalChecked()->NewInstance(context).ToLocalChecked();
|
|
118
|
+
SetNativeType(object, NativeType::WebGLRenderingContextBase);
|
|
119
|
+
object->SetAlignedPointerInInternalField(0, renderingContext);
|
|
120
|
+
renderingContext->BindFinalizer(isolate, object);
|
|
121
|
+
return scope.Escape(object);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
static WebGL2RenderingContext *GetPointer(const v8::Local<v8::Object> &object);
|
|
125
|
+
|
|
126
|
+
static void SetConstants(v8::Isolate *isolate, const v8::Local<v8::ObjectTemplate> &tmpl);
|
|
127
|
+
|
|
128
|
+
static void
|
|
129
|
+
SetProps(v8::Isolate *isolate, const v8::Local<v8::ObjectTemplate> &webgl2RenderingContextTpl);
|
|
130
|
+
|
|
131
|
+
static void SetMethods(v8::Isolate *isolate,
|
|
132
|
+
const v8::Local<v8::ObjectTemplate> &tmpl);
|
|
133
|
+
|
|
134
|
+
static void BeginQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
135
|
+
|
|
136
|
+
static void FastBeginQuery(v8::Local<v8::Object> receiver_obj, uint32_t target,
|
|
137
|
+
v8::Local<v8::Object> query_obj) {
|
|
138
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
139
|
+
if (ptr == nullptr) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
auto type = GetNativeType(query_obj);
|
|
144
|
+
if (type == NativeType::WebGLQuery) {
|
|
145
|
+
auto query = WebGLQuery::GetPointer(query_obj);
|
|
146
|
+
|
|
147
|
+
if (query != nullptr) {
|
|
148
|
+
canvas_native_webgl2_begin_query(
|
|
149
|
+
target,
|
|
150
|
+
query->GetQuery(),
|
|
151
|
+
ptr->GetState()
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
static void BeginTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
158
|
+
|
|
159
|
+
static void FastBeginTransformFeedback(v8::Local<v8::Object> receiver_obj, uint32_t value) {
|
|
160
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
161
|
+
if (ptr == nullptr) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
canvas_native_webgl2_begin_transform_feedback(
|
|
166
|
+
value,
|
|
167
|
+
ptr->GetState()
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
static void BindBufferBase(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
172
|
+
|
|
173
|
+
static void
|
|
174
|
+
FastBindBufferBase(v8::Local<v8::Object> receiver_obj, uint32_t target, uint32_t index,
|
|
175
|
+
v8::Local<v8::Object> buffer_obj) {
|
|
176
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
177
|
+
if (ptr == nullptr) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
auto type = GetNativeType(buffer_obj);
|
|
182
|
+
|
|
183
|
+
if (type == NativeType::WebGLBuffer) {
|
|
184
|
+
auto buffer = WebGLBuffer::GetPointer(buffer_obj);
|
|
185
|
+
|
|
186
|
+
canvas_native_webgl2_bind_buffer_base(
|
|
187
|
+
target,
|
|
188
|
+
index,
|
|
189
|
+
buffer->GetBuffer(),
|
|
190
|
+
ptr->GetState()
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
static void BindBufferRange(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
196
|
+
|
|
197
|
+
static void
|
|
198
|
+
FastBindBufferRange(v8::Local<v8::Object> receiver_obj, uint32_t target, uint32_t index,
|
|
199
|
+
v8::Local<v8::Object> buffer_obj, int32_t offset, int32_t size) {
|
|
200
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
201
|
+
if (ptr == nullptr) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
auto type = GetNativeType(buffer_obj);
|
|
207
|
+
if (type == NativeType::WebGLBuffer) {
|
|
208
|
+
auto buffer = WebGLBuffer::GetPointer(buffer_obj);
|
|
209
|
+
canvas_native_webgl2_bind_buffer_range(
|
|
210
|
+
target,
|
|
211
|
+
index,
|
|
212
|
+
buffer->GetBuffer(),
|
|
213
|
+
static_cast<ssize_t>(offset),
|
|
214
|
+
static_cast<ssize_t>(size),
|
|
215
|
+
ptr->GetState()
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
static void BindSampler(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
221
|
+
|
|
222
|
+
static void FastBindSampler(v8::Local<v8::Object> receiver_obj, uint32_t unit,
|
|
223
|
+
v8::Local<v8::Object> sampler_obj) {
|
|
224
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
225
|
+
if (ptr == nullptr) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
auto type = GetNativeType(sampler_obj);
|
|
230
|
+
if (type == NativeType::WebGLSampler) {
|
|
231
|
+
auto sampler = WebGLSampler::GetPointer(sampler_obj);
|
|
232
|
+
|
|
233
|
+
canvas_native_webgl2_bind_sampler(
|
|
234
|
+
unit,
|
|
235
|
+
sampler->GetSampler(),
|
|
236
|
+
ptr->GetState()
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
static void BindTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
242
|
+
|
|
243
|
+
static void FastBindTransformFeedback(v8::Local<v8::Object> receiver_obj, uint32_t target,
|
|
244
|
+
v8::Local<v8::Object> transformer_obj) {
|
|
245
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
246
|
+
if (ptr == nullptr) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
auto type = GetNativeType(transformer_obj);
|
|
252
|
+
|
|
253
|
+
if (type == NativeType::WebGLTransformFeedback) {
|
|
254
|
+
auto transformFeedback = WebGLTransformFeedback::GetPointer(transformer_obj);
|
|
255
|
+
|
|
256
|
+
canvas_native_webgl2_bind_transform_feedback(
|
|
257
|
+
target,
|
|
258
|
+
transformFeedback->GetFeedback(),
|
|
259
|
+
ptr->GetState()
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
static void BindVertexArray(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
265
|
+
|
|
266
|
+
static void
|
|
267
|
+
BindVertexArrayImpl(WebGL2RenderingContext *ptr, uint32_t vertex_array) {
|
|
268
|
+
canvas_native_webgl2_bind_vertex_array(
|
|
269
|
+
vertex_array,
|
|
270
|
+
ptr->GetState()
|
|
271
|
+
);
|
|
272
|
+
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
static void FastBindVertexArray(v8::Local<v8::Object> receiver_obj, uint32_t vertex_array) {
|
|
276
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
277
|
+
if (ptr == nullptr) {
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
BindVertexArrayImpl(
|
|
282
|
+
ptr,
|
|
283
|
+
vertex_array
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
static void BlitFramebuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
288
|
+
|
|
289
|
+
static void
|
|
290
|
+
FastBlitFramebuffer(v8::Local<v8::Object> receiver_obj, int32_t srcX0, int32_t srcY0,
|
|
291
|
+
int32_t srcX1, int32_t srcY1, int32_t dstX0, int32_t dstY0, int32_t dstX1,
|
|
292
|
+
int32_t dstY1, uint32_t mask, uint32_t filter) {
|
|
293
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
294
|
+
if (ptr == nullptr) {
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
canvas_native_webgl2_blit_framebuffer(
|
|
300
|
+
srcX0,
|
|
301
|
+
srcY0,
|
|
302
|
+
srcX1,
|
|
303
|
+
srcY1,
|
|
304
|
+
dstX0,
|
|
305
|
+
dstY0,
|
|
306
|
+
dstX1,
|
|
307
|
+
dstY1,
|
|
308
|
+
mask,
|
|
309
|
+
filter,
|
|
310
|
+
ptr->GetState()
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
static void ClearBufferfi(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
315
|
+
|
|
316
|
+
static void
|
|
317
|
+
FastClearBufferfi(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
|
|
318
|
+
double depth, int32_t stencil) {
|
|
319
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
320
|
+
if (ptr == nullptr) {
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
36
323
|
|
|
37
|
-
WebGL2RenderingContext(rust::Box<WebGLState> state, WebGLRenderingVersion version);
|
|
38
324
|
|
|
39
|
-
|
|
325
|
+
canvas_native_webgl2_clear_bufferfi(
|
|
326
|
+
buffer,
|
|
327
|
+
drawbuffer,
|
|
328
|
+
static_cast<float>(depth),
|
|
329
|
+
stencil,
|
|
330
|
+
ptr->GetState()
|
|
331
|
+
);
|
|
332
|
+
}
|
|
40
333
|
|
|
41
|
-
|
|
334
|
+
static void ClearBufferfv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
42
335
|
|
|
43
|
-
static
|
|
44
|
-
|
|
336
|
+
static void
|
|
337
|
+
FastClearBufferfv(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
|
|
338
|
+
const v8::FastApiTypedArray<float> &values) {
|
|
339
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
340
|
+
if (ptr == nullptr) {
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
45
343
|
|
|
46
|
-
|
|
344
|
+
auto size = values.length();
|
|
345
|
+
float *data;
|
|
346
|
+
values.getStorageIfAligned(&data);
|
|
47
347
|
|
|
48
|
-
if (methodName == "UNPACK_SKIP_ROWS") { return {0x0CF3}; }
|
|
49
348
|
|
|
50
|
-
|
|
349
|
+
canvas_native_webgl2_clear_bufferfv(
|
|
350
|
+
buffer,
|
|
351
|
+
drawbuffer,
|
|
352
|
+
data,
|
|
353
|
+
size,
|
|
354
|
+
ptr->GetState()
|
|
355
|
+
);
|
|
356
|
+
}
|
|
51
357
|
|
|
52
|
-
|
|
358
|
+
static void
|
|
359
|
+
FastClearBufferfvArray(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
|
|
360
|
+
v8::Local<v8::Array> values) {
|
|
361
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
362
|
+
if (ptr == nullptr) {
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
auto len = values->Length();
|
|
367
|
+
std::vector<float> buf;
|
|
368
|
+
buf.reserve(len);
|
|
369
|
+
|
|
370
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
|
|
371
|
+
values, buf.data(), len);
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
if (copied) {
|
|
375
|
+
canvas_native_webgl2_clear_bufferfv(
|
|
376
|
+
buffer,
|
|
377
|
+
drawbuffer,
|
|
378
|
+
buf.data(),
|
|
379
|
+
buf.size(),
|
|
380
|
+
ptr->GetState()
|
|
381
|
+
);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
53
384
|
|
|
54
|
-
|
|
385
|
+
static void ClearBufferiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
55
386
|
|
|
56
|
-
|
|
387
|
+
static void
|
|
388
|
+
FastClearBufferiv(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
|
|
389
|
+
const v8::FastApiTypedArray<int32_t> &values) {
|
|
390
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
391
|
+
if (ptr == nullptr) {
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
57
394
|
|
|
58
|
-
|
|
395
|
+
auto size = values.length();
|
|
396
|
+
int32_t *data;
|
|
397
|
+
values.getStorageIfAligned(&data);
|
|
59
398
|
|
|
60
|
-
if (methodName == "UNPACK_SKIP_IMAGES") { return {0x806D}; }
|
|
61
399
|
|
|
62
|
-
|
|
400
|
+
canvas_native_webgl2_clear_bufferiv(
|
|
401
|
+
buffer,
|
|
402
|
+
drawbuffer,
|
|
403
|
+
data,
|
|
404
|
+
size,
|
|
405
|
+
ptr->GetState()
|
|
406
|
+
);
|
|
407
|
+
}
|
|
63
408
|
|
|
64
|
-
|
|
409
|
+
static void
|
|
410
|
+
FastClearBufferivArray(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
|
|
411
|
+
v8::Local<v8::Array> values) {
|
|
412
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
413
|
+
if (ptr == nullptr) {
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
auto len = values->Length();
|
|
418
|
+
std::vector<int32_t> buf;
|
|
419
|
+
buf.reserve(len);
|
|
420
|
+
|
|
421
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<int32_t>::Build().GetId(), int32_t>(
|
|
422
|
+
values, buf.data(), len);
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
if (copied) {
|
|
426
|
+
canvas_native_webgl2_clear_bufferiv(
|
|
427
|
+
buffer,
|
|
428
|
+
drawbuffer,
|
|
429
|
+
buf.data(),
|
|
430
|
+
buf.size(),
|
|
431
|
+
ptr->GetState()
|
|
432
|
+
);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
65
435
|
|
|
66
|
-
if (methodName == "MAX_ELEMENTS_VERTICES") { return {0x80E8}; }
|
|
67
436
|
|
|
68
|
-
|
|
437
|
+
static void ClearBufferuiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
69
438
|
|
|
70
|
-
if (methodName == "MAX_TEXTURE_LOD_BIAS") { return {0x84FD}; }
|
|
71
439
|
|
|
72
|
-
|
|
440
|
+
static void
|
|
441
|
+
FastClearBufferuiv(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
|
|
442
|
+
const v8::FastApiTypedArray<uint32_t> &values) {
|
|
443
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
444
|
+
if (ptr == nullptr) {
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
73
447
|
|
|
74
|
-
|
|
448
|
+
auto size = values.length();
|
|
449
|
+
uint32_t *data;
|
|
450
|
+
values.getStorageIfAligned(&data);
|
|
75
451
|
|
|
76
|
-
if (methodName == "MAX_ARRAY_TEXTURE_LAYERS") { return {0x88FF}; }
|
|
77
452
|
|
|
78
|
-
|
|
453
|
+
canvas_native_webgl2_clear_bufferuiv(
|
|
454
|
+
buffer,
|
|
455
|
+
drawbuffer,
|
|
456
|
+
data,
|
|
457
|
+
size,
|
|
458
|
+
ptr->GetState()
|
|
459
|
+
);
|
|
460
|
+
}
|
|
79
461
|
|
|
80
|
-
|
|
462
|
+
static void
|
|
463
|
+
FastClearBufferuivArray(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
|
|
464
|
+
v8::Local<v8::Array> values) {
|
|
465
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
466
|
+
if (ptr == nullptr) {
|
|
467
|
+
return;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
auto len = values->Length();
|
|
471
|
+
std::vector<uint32_t> buf;
|
|
472
|
+
buf.reserve(len);
|
|
473
|
+
|
|
474
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<uint32_t>::Build().GetId(), uint32_t>(
|
|
475
|
+
values, buf.data(), len);
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
if (copied) {
|
|
479
|
+
canvas_native_webgl2_clear_bufferuiv(
|
|
480
|
+
buffer,
|
|
481
|
+
drawbuffer,
|
|
482
|
+
buf.data(),
|
|
483
|
+
buf.size(),
|
|
484
|
+
ptr->GetState()
|
|
485
|
+
);
|
|
486
|
+
}
|
|
487
|
+
}
|
|
81
488
|
|
|
82
|
-
|
|
489
|
+
static void ClientWaitSync(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
83
490
|
|
|
84
|
-
|
|
491
|
+
static void CompressedTexSubImage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
85
492
|
|
|
86
|
-
|
|
493
|
+
static void CopyBufferSubData(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
87
494
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if (
|
|
495
|
+
static void FastCopyBufferSubData(v8::Local<v8::Object> receiver_obj, uint32_t readTarget,
|
|
496
|
+
uint32_t writeTarget, int32_t readOffset, int32_t writeOffset,
|
|
497
|
+
uint32_t size) {
|
|
498
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
499
|
+
if (ptr == nullptr) {
|
|
500
|
+
return;
|
|
501
|
+
}
|
|
93
502
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
503
|
+
canvas_native_webgl2_copy_buffer_sub_data(
|
|
504
|
+
readTarget,
|
|
505
|
+
writeTarget,
|
|
506
|
+
static_cast<ssize_t>(readOffset),
|
|
507
|
+
static_cast<ssize_t>(writeOffset),
|
|
508
|
+
static_cast<ssize_t>(size),
|
|
509
|
+
ptr->GetState()
|
|
510
|
+
);
|
|
511
|
+
}
|
|
99
512
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
513
|
+
static void CopyTexSubImage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
514
|
+
|
|
515
|
+
static void
|
|
516
|
+
FastCopyTexSubImage3D(v8::Local<v8::Object> receiver_obj, uint32_t target, int32_t level,
|
|
517
|
+
int32_t xoffset, int32_t yoffset, int32_t zoffset, int32_t x, int32_t y,
|
|
518
|
+
int32_t width, int32_t height) {
|
|
519
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
520
|
+
if (ptr == nullptr) {
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
canvas_native_webgl2_copy_tex_sub_image3d(
|
|
526
|
+
target,
|
|
527
|
+
level,
|
|
528
|
+
xoffset,
|
|
529
|
+
yoffset,
|
|
530
|
+
zoffset,
|
|
531
|
+
x,
|
|
532
|
+
y,
|
|
533
|
+
width,
|
|
534
|
+
height,
|
|
535
|
+
ptr->GetState()
|
|
536
|
+
);
|
|
537
|
+
}
|
|
105
538
|
|
|
539
|
+
static void CreateQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
106
540
|
|
|
107
|
-
|
|
108
|
-
if (methodName == "TEXTURE_COMPARE_FUNC") { return {0x884D}; }
|
|
109
|
-
if (methodName == "SRGB") { return {0x8C40}; }
|
|
110
|
-
if (methodName == "SRGB8") { return {0x8C41}; }
|
|
111
|
-
if (methodName == "SRGB8_ALPHA8") { return {0x8C43}; }
|
|
541
|
+
static void CreateSampler(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
112
542
|
|
|
113
|
-
|
|
114
|
-
if (methodName == "RGBA32F") { return {0x8814}; }
|
|
115
|
-
if (methodName == "RGB32F") { return {0x8815}; }
|
|
116
|
-
if (methodName == "RGBA16F") { return {0x881A}; }
|
|
117
|
-
if (methodName == "RGB16F") { return {0x881B}; }
|
|
543
|
+
static void CreateTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
118
544
|
|
|
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}; }
|
|
545
|
+
static void CreateVertexArray(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
124
546
|
|
|
547
|
+
static void DeleteQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
125
548
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
if (
|
|
130
|
-
|
|
549
|
+
static void
|
|
550
|
+
FastDeleteQuery(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> query_obj) {
|
|
551
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
552
|
+
if (ptr == nullptr) {
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
131
555
|
|
|
556
|
+
auto type = GetNativeType(query_obj);
|
|
557
|
+
if (type == NativeType::WebGLQuery) {
|
|
558
|
+
auto query = WebGLQuery::GetPointer(query_obj);
|
|
132
559
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
560
|
+
if (query != nullptr) {
|
|
561
|
+
canvas_native_webgl2_delete_query_with_query(
|
|
562
|
+
query->GetQuery(),
|
|
563
|
+
ptr->GetState()
|
|
564
|
+
);
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
}
|
|
138
568
|
|
|
569
|
+
static void DeleteSampler(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
139
570
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
if (
|
|
144
|
-
|
|
571
|
+
static void
|
|
572
|
+
FastDeleteSampler(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> sampler_obj) {
|
|
573
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
574
|
+
if (ptr == nullptr) {
|
|
575
|
+
return;
|
|
576
|
+
}
|
|
145
577
|
|
|
578
|
+
auto type = GetNativeType(sampler_obj);
|
|
146
579
|
|
|
147
|
-
if (
|
|
148
|
-
|
|
149
|
-
if (methodName == "R32F") { return {0x822E}; }
|
|
150
|
-
if (methodName == "RG16F") { return {0x822F}; }
|
|
151
|
-
if (methodName == "RG32F") { return {0x8230}; }
|
|
580
|
+
if (type == NativeType::WebGLSampler) {
|
|
581
|
+
auto sampler = WebGLSampler::GetPointer(sampler_obj);
|
|
152
582
|
|
|
583
|
+
if (sampler != nullptr) {
|
|
584
|
+
canvas_native_webgl2_delete_sampler_with_sampler(
|
|
585
|
+
sampler->GetSampler(),
|
|
586
|
+
ptr->GetState()
|
|
587
|
+
);
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
153
591
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
if (
|
|
592
|
+
static void DeleteSync(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
593
|
+
|
|
594
|
+
static void FastDeleteSync(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> sync_obj) {
|
|
595
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
596
|
+
if (ptr == nullptr) {
|
|
597
|
+
return;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
auto type = GetNativeType(sync_obj);
|
|
601
|
+
if (type == NativeType::WebGLSync) {
|
|
602
|
+
auto sync = WebGLSyncImpl::GetPointer(sync_obj);
|
|
603
|
+
|
|
604
|
+
if (sync != nullptr) {
|
|
605
|
+
canvas_native_webgl2_delete_sync_with_sync(
|
|
606
|
+
sync->GetSync(),
|
|
607
|
+
ptr->GetState()
|
|
608
|
+
);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
159
612
|
|
|
613
|
+
static void DeleteTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
160
614
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
if (
|
|
165
|
-
|
|
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}; }
|
|
615
|
+
static void FastDeleteTransformFeedback(v8::Local<v8::Object> receiver_obj,
|
|
616
|
+
v8::Local<v8::Object> transform_feedback_obj) {
|
|
617
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
618
|
+
if (ptr == nullptr) {
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
361
621
|
|
|
362
|
-
/* Draw buffers */
|
|
363
622
|
|
|
364
|
-
|
|
623
|
+
auto type = GetNativeType(transform_feedback_obj);
|
|
624
|
+
if (type == NativeType::WebGLTransformFeedback) {
|
|
625
|
+
auto transformFeedback = WebGLTransformFeedback::GetPointer(
|
|
626
|
+
transform_feedback_obj);
|
|
365
627
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
628
|
+
if (transformFeedback != nullptr) {
|
|
629
|
+
canvas_native_webgl2_delete_transform_feedback(
|
|
630
|
+
transformFeedback->GetFeedback(),
|
|
631
|
+
ptr->GetState()
|
|
632
|
+
);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
}
|
|
371
636
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
637
|
+
static void DeleteVertexArray(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
638
|
+
|
|
639
|
+
static void FastDeleteVertexArray(v8::Local<v8::Object> receiver_obj,
|
|
640
|
+
v8::Local<v8::Object> vertex_array_obj) {
|
|
641
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
642
|
+
if (ptr == nullptr) {
|
|
643
|
+
return;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
auto type = GetNativeType(vertex_array_obj);
|
|
647
|
+
if (type == NativeType::WebGLVertexArrayObject) {
|
|
648
|
+
|
|
649
|
+
auto vertexArray = WebGLVertexArrayObject::GetPointer(vertex_array_obj);
|
|
650
|
+
if (vertexArray != nullptr) {
|
|
651
|
+
canvas_native_webgl2_delete_vertex_array_with_vertex_array(
|
|
652
|
+
vertexArray->GetVertexArrayObject(),
|
|
653
|
+
ptr->GetState()
|
|
654
|
+
);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
}
|
|
377
658
|
|
|
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}; }
|
|
659
|
+
static void DrawArraysInstanced(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
383
660
|
|
|
384
|
-
|
|
661
|
+
static void
|
|
662
|
+
FastDrawArraysInstanced(v8::Local<v8::Object> receiver_obj, uint32_t mode, int32_t first,
|
|
663
|
+
int32_t count, int32_t instanceCount) {
|
|
664
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
665
|
+
if (ptr == nullptr) {
|
|
666
|
+
return;
|
|
667
|
+
}
|
|
385
668
|
|
|
386
|
-
/* Buffers */
|
|
387
669
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
670
|
+
canvas_native_webgl2_draw_arrays_instanced(
|
|
671
|
+
mode,
|
|
672
|
+
first,
|
|
673
|
+
count,
|
|
674
|
+
instanceCount,
|
|
675
|
+
ptr->GetState()
|
|
676
|
+
);
|
|
393
677
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
if (methodName == "STENCIL") { return {0x1802}; }
|
|
678
|
+
ptr->UpdateInvalidateState();
|
|
679
|
+
}
|
|
397
680
|
|
|
398
|
-
|
|
681
|
+
static void DrawBuffers(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
399
682
|
|
|
400
|
-
|
|
683
|
+
static void FastDrawBuffers(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Array> buffers) {
|
|
684
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
685
|
+
if (ptr == nullptr) {
|
|
686
|
+
return;
|
|
687
|
+
}
|
|
401
688
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
if (methodName == "STREAM_READ") { return {0x88E1}; }
|
|
406
|
-
if (methodName == "STREAM_COPY") { return {0x88E2}; }
|
|
689
|
+
auto len = buffers->Length();
|
|
690
|
+
std::vector<uint32_t> buf;
|
|
691
|
+
buf.reserve(len);
|
|
407
692
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
if (methodName == "DYNAMIC_READ") { return {0x88E9}; }
|
|
411
|
-
if (methodName == "DYNAMIC_COPY") { return {0x88EA}; }
|
|
412
|
-
if (methodName == "DEPTH_COMPONENT32F") { return {0x8CAC}; }
|
|
413
|
-
if (methodName == "DEPTH32F_STENCIL8") { return {0x8CAD}; }
|
|
693
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<uint32_t>::Build().GetId(), uint32_t>(
|
|
694
|
+
buffers, buf.data(), len);
|
|
414
695
|
|
|
415
|
-
/* Data types */
|
|
416
696
|
|
|
417
|
-
if (
|
|
418
|
-
|
|
697
|
+
if (copied) {
|
|
698
|
+
canvas_native_webgl2_draw_buffers(
|
|
699
|
+
buf.data(), buf.size(),
|
|
700
|
+
ptr->GetState());
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
static void DrawElementsInstanced(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
706
|
+
|
|
707
|
+
static void
|
|
708
|
+
FastDrawElementsInstanced(v8::Local<v8::Object> receiver_obj, uint32_t mode, int32_t count,
|
|
709
|
+
uint32_t type, int32_t offset, int32_t instanceCount) {
|
|
710
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
711
|
+
if (ptr == nullptr) {
|
|
712
|
+
return;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
canvas_native_webgl2_draw_elements_instanced(
|
|
717
|
+
mode,
|
|
718
|
+
count,
|
|
719
|
+
type,
|
|
720
|
+
static_cast<ssize_t>(offset),
|
|
721
|
+
instanceCount,
|
|
722
|
+
ptr->GetState()
|
|
723
|
+
);
|
|
724
|
+
|
|
725
|
+
ptr->UpdateInvalidateState();
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
static void DrawRangeElements(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
729
|
+
|
|
730
|
+
static void
|
|
731
|
+
FastDrawRangeElements(v8::Local<v8::Object> receiver_obj, uint32_t mode, uint32_t start,
|
|
732
|
+
uint32_t end, int32_t count, uint32_t type, int32_t offset) {
|
|
733
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
734
|
+
if (ptr == nullptr) {
|
|
735
|
+
return;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
canvas_native_webgl2_draw_range_elements(
|
|
740
|
+
mode,
|
|
741
|
+
start,
|
|
742
|
+
end,
|
|
743
|
+
count,
|
|
744
|
+
type,
|
|
745
|
+
static_cast<ssize_t>(offset),
|
|
746
|
+
ptr->GetState()
|
|
747
|
+
);
|
|
748
|
+
|
|
749
|
+
ptr->UpdateInvalidateState();
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
static void EndQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
753
|
+
|
|
754
|
+
static void FastEndQuery(v8::Local<v8::Object> receiver_obj, uint32_t target) {
|
|
755
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
756
|
+
if (ptr == nullptr) {
|
|
757
|
+
return;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
canvas_native_webgl2_end_query(target,
|
|
761
|
+
ptr->GetState());
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
static void EndTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
765
|
+
|
|
766
|
+
static void FastEndTransformFeedback(v8::Local<v8::Object> receiver_obj) {
|
|
767
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
768
|
+
if (ptr == nullptr) {
|
|
769
|
+
return;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
canvas_native_webgl2_end_transform_feedback(
|
|
773
|
+
ptr->GetState());
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
static void FenceSync(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
777
|
+
|
|
778
|
+
static void FramebufferTextureLayer(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
779
|
+
|
|
780
|
+
static void FastFramebufferTextureLayer(v8::Local<v8::Object> receiver_obj,
|
|
781
|
+
v8::Local<v8::Object> texture_obj, uint32_t target,
|
|
782
|
+
uint32_t attachment, int32_t level, int32_t layer) {
|
|
783
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
784
|
+
if (ptr == nullptr) {
|
|
785
|
+
return;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
auto type = GetNativeType(texture_obj);
|
|
790
|
+
if (type == NativeType::WebGLTexture) {
|
|
791
|
+
auto texture = WebGLTexture::GetPointer(texture_obj);
|
|
792
|
+
if (texture != nullptr) {
|
|
793
|
+
canvas_native_webgl2_framebuffer_texture_layer(
|
|
794
|
+
target,
|
|
795
|
+
attachment,
|
|
796
|
+
texture->GetTexture(),
|
|
797
|
+
level,
|
|
798
|
+
layer,
|
|
799
|
+
ptr->GetState()
|
|
800
|
+
);
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
static void GetActiveUniformBlockName(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
807
|
+
|
|
808
|
+
static void GetActiveUniformBlockParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
809
|
+
|
|
810
|
+
static void GetActiveUniforms(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
811
|
+
|
|
812
|
+
static void GetBufferSubData(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
813
|
+
|
|
814
|
+
static void GetFragDataLocation(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
815
|
+
|
|
816
|
+
static void GetIndexedParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
817
|
+
|
|
818
|
+
static void GetInternalformatParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
819
|
+
|
|
820
|
+
static void GetParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
821
|
+
|
|
822
|
+
static void GetQueryParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
823
|
+
|
|
824
|
+
static void GetQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
825
|
+
|
|
826
|
+
static void GetSamplerParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
827
|
+
|
|
828
|
+
static void GetSyncParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
829
|
+
|
|
830
|
+
static void GetTransformFeedbackVarying(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
831
|
+
|
|
832
|
+
static void GetUniformBlockIndex(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
833
|
+
|
|
834
|
+
static void GetUniformIndices(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
835
|
+
|
|
836
|
+
static void InvalidateFramebuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
837
|
+
|
|
838
|
+
static void
|
|
839
|
+
FastInvalidateFramebuffer(v8::Local<v8::Object> receiver_obj, uint32_t target,
|
|
840
|
+
v8::Local<v8::Array> attachments) {
|
|
841
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
842
|
+
if (ptr == nullptr) {
|
|
843
|
+
return;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
auto len = attachments->Length();
|
|
847
|
+
std::vector<uint32_t> buf;
|
|
848
|
+
buf.reserve(len);
|
|
849
|
+
|
|
850
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<uint32_t>::Build().GetId(), uint32_t>(
|
|
851
|
+
attachments, buf.data(), len);
|
|
852
|
+
|
|
853
|
+
if (copied) {
|
|
854
|
+
canvas_native_webgl2_invalidate_framebuffer(
|
|
855
|
+
target, buf.data(), buf.size(),
|
|
856
|
+
ptr->GetState());
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
static void InvalidateSubFramebuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
861
|
+
|
|
862
|
+
static void FastInvalidateSubFramebuffer(v8::Local<v8::Object> receiver_obj, uint32_t target,
|
|
863
|
+
v8::Local<v8::Array> attachments, int32_t x, int32_t y,
|
|
864
|
+
int32_t width, int32_t height) {
|
|
865
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
866
|
+
if (ptr == nullptr) {
|
|
867
|
+
return;
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
auto len = attachments->Length();
|
|
871
|
+
std::vector<uint32_t> buf;
|
|
872
|
+
buf.reserve(len);
|
|
873
|
+
|
|
874
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<uint32_t>::Build().GetId(), uint32_t>(
|
|
875
|
+
attachments, buf.data(), len);
|
|
876
|
+
|
|
877
|
+
if (copied) {
|
|
878
|
+
|
|
879
|
+
canvas_native_webgl2_invalidate_sub_framebuffer(
|
|
880
|
+
target,
|
|
881
|
+
buf.data(), buf.size(),
|
|
882
|
+
x,
|
|
883
|
+
y,
|
|
884
|
+
width,
|
|
885
|
+
height,
|
|
886
|
+
ptr->GetState());
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
static void IsQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
891
|
+
|
|
892
|
+
static bool FastIsQuery(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> query_obj) {
|
|
893
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
894
|
+
if (ptr == nullptr) {
|
|
895
|
+
return false;
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
auto type = GetNativeType(query_obj);
|
|
900
|
+
if (type == NativeType::WebGLQuery) {
|
|
901
|
+
auto query = WebGLQuery::GetPointer(query_obj);
|
|
902
|
+
if (query != nullptr) {
|
|
903
|
+
auto ret = canvas_native_webgl2_is_query(
|
|
904
|
+
query->GetQuery(),
|
|
905
|
+
ptr->GetState());
|
|
906
|
+
return ret;
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
// todo check return
|
|
910
|
+
return false;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
static void IsSampler(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
914
|
+
|
|
915
|
+
static bool
|
|
916
|
+
FastIsSampler(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> sample_obj) {
|
|
917
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
918
|
+
if (ptr == nullptr) {
|
|
919
|
+
return false;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
|
|
923
|
+
auto type = GetNativeType(sample_obj);
|
|
924
|
+
if (type == NativeType::WebGLSampler) {
|
|
925
|
+
auto query = WebGLSampler::GetPointer(sample_obj);
|
|
926
|
+
if (query != nullptr) {
|
|
927
|
+
auto ret = canvas_native_webgl2_is_sampler(
|
|
928
|
+
query->GetSampler(),
|
|
929
|
+
ptr->GetState());
|
|
930
|
+
return ret;
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
// todo check return
|
|
934
|
+
return false;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
static void IsSync(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
938
|
+
|
|
939
|
+
static bool FastIsSync(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> sync_obj) {
|
|
940
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
941
|
+
if (ptr == nullptr) {
|
|
942
|
+
return false;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
|
|
946
|
+
auto type = GetNativeType(sync_obj);
|
|
947
|
+
if (type == NativeType::WebGLSync) {
|
|
948
|
+
auto query = WebGLSyncImpl::GetPointer(sync_obj);
|
|
949
|
+
if (query != nullptr) {
|
|
950
|
+
auto ret = canvas_native_webgl2_is_sync(
|
|
951
|
+
query->GetSync(),
|
|
952
|
+
ptr->GetState());
|
|
953
|
+
|
|
954
|
+
return ret;
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
// todo check return
|
|
958
|
+
return false;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
static void IsTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
962
|
+
|
|
963
|
+
static bool FastIsTransformFeedback(v8::Local<v8::Object> receiver_obj,
|
|
964
|
+
v8::Local<v8::Object> feedback_obj) {
|
|
965
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
966
|
+
if (ptr == nullptr) {
|
|
967
|
+
return false;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
|
|
971
|
+
auto type = GetNativeType(feedback_obj);
|
|
972
|
+
if (type == NativeType::WebGLTransformFeedback) {
|
|
973
|
+
auto query = WebGLTransformFeedback::GetPointer(feedback_obj);
|
|
974
|
+
if (query != nullptr) {
|
|
975
|
+
auto ret = canvas_native_webgl2_is_transform_feedback(
|
|
976
|
+
query->GetFeedback(),
|
|
977
|
+
ptr->GetState());
|
|
978
|
+
return ret;
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
// todo check return
|
|
982
|
+
return false;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
static void IsVertexArray(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
986
|
+
|
|
987
|
+
static bool
|
|
988
|
+
FastIsVertexArray(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> vertex_obj) {
|
|
989
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
990
|
+
if (ptr == nullptr) {
|
|
991
|
+
return false;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
auto type = GetNativeType(vertex_obj);
|
|
996
|
+
if (type == NativeType::WebGLVertexArrayObject) {
|
|
997
|
+
auto query = WebGLVertexArrayObject::GetPointer(vertex_obj);
|
|
998
|
+
if (query != nullptr) {
|
|
999
|
+
auto ret = canvas_native_webgl2_is_vertex_array(
|
|
1000
|
+
query->GetVertexArrayObject(),
|
|
1001
|
+
ptr->GetState());
|
|
1002
|
+
return ret;
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
// todo check return
|
|
1006
|
+
return false;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
static void PauseTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1010
|
+
|
|
1011
|
+
static void FastPauseTransformFeedback(v8::Local<v8::Object> receiver_obj) {
|
|
1012
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1013
|
+
if (ptr == nullptr) {
|
|
1014
|
+
return;
|
|
1015
|
+
}
|
|
1016
|
+
canvas_native_webgl2_pause_transform_feedback(
|
|
1017
|
+
ptr->GetState());
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
static void ReadBuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1021
|
+
|
|
1022
|
+
static void FastReadBuffer(v8::Local<v8::Object> receiver_obj, uint32_t src) {
|
|
1023
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1024
|
+
if (ptr == nullptr) {
|
|
1025
|
+
return;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
canvas_native_webgl2_read_buffer(
|
|
1029
|
+
src,
|
|
1030
|
+
ptr->GetState()
|
|
1031
|
+
);
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
static void RenderbufferStorageMultisample(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1035
|
+
|
|
1036
|
+
static void
|
|
1037
|
+
FastRenderbufferStorageMultisample(v8::Local<v8::Object> receiver_obj, uint32_t target,
|
|
1038
|
+
int32_t samples, uint32_t internalFormat, int32_t width,
|
|
1039
|
+
int32_t height) {
|
|
1040
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1041
|
+
if (ptr == nullptr) {
|
|
1042
|
+
return;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
canvas_native_webgl2_renderbuffer_storage_multisample(
|
|
1046
|
+
target,
|
|
1047
|
+
samples,
|
|
1048
|
+
internalFormat,
|
|
1049
|
+
width,
|
|
1050
|
+
height,
|
|
1051
|
+
ptr->GetState()
|
|
1052
|
+
);
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
static void ResumeTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1056
|
+
|
|
1057
|
+
static void FastResumeTransformFeedback(v8::Local<v8::Object> receiver_obj) {
|
|
1058
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1059
|
+
if (ptr == nullptr) {
|
|
1060
|
+
return;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
canvas_native_webgl2_resume_transform_feedback(
|
|
1064
|
+
ptr->GetState());
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
static void SamplerParameterf(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1068
|
+
|
|
1069
|
+
static void
|
|
1070
|
+
FastSamplerParameterf(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> sampler_obj,
|
|
1071
|
+
uint32_t pname, double param) {
|
|
1072
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1073
|
+
if (ptr == nullptr) {
|
|
1074
|
+
return;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
auto type = GetNativeType(sampler_obj);
|
|
1078
|
+
if (type == NativeType::WebGLSampler) {
|
|
1079
|
+
auto sampler = WebGLSampler::GetPointer(sampler_obj);
|
|
1080
|
+
if (sampler != nullptr) {
|
|
1081
|
+
canvas_native_webgl2_sampler_parameterf(
|
|
1082
|
+
sampler->GetSampler(),
|
|
1083
|
+
pname,
|
|
1084
|
+
static_cast<float>(param),
|
|
1085
|
+
ptr->GetState());
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
static void SamplerParameteri(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1092
|
+
|
|
1093
|
+
|
|
1094
|
+
static void
|
|
1095
|
+
FastSamplerParameteri(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> sampler_obj,
|
|
1096
|
+
uint32_t pname, int32_t param) {
|
|
1097
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1098
|
+
if (ptr == nullptr) {
|
|
1099
|
+
return;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
auto type = GetNativeType(sampler_obj);
|
|
1103
|
+
if (type == NativeType::WebGLSampler) {
|
|
1104
|
+
auto sampler = WebGLSampler::GetPointer(sampler_obj);
|
|
1105
|
+
if (sampler != nullptr) {
|
|
1106
|
+
canvas_native_webgl2_sampler_parameteri(
|
|
1107
|
+
sampler->GetSampler(),
|
|
1108
|
+
pname,
|
|
1109
|
+
param,
|
|
1110
|
+
ptr->GetState());
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
static void TexImage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1117
|
+
|
|
1118
|
+
static void TexStorage2D(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1119
|
+
|
|
1120
|
+
static void TexStorage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1121
|
+
|
|
1122
|
+
static void TexSubImage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1123
|
+
|
|
1124
|
+
static void TransformFeedbackVaryings(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1125
|
+
|
|
1126
|
+
static void Uniform1ui(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
static void
|
|
1130
|
+
FastUniform1ui(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1131
|
+
uint32_t v0) {
|
|
1132
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1133
|
+
if (ptr == nullptr) {
|
|
1134
|
+
return;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
|
|
1138
|
+
auto type = GetNativeType(location_obj);
|
|
1139
|
+
|
|
1140
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1141
|
+
|
|
1142
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1143
|
+
|
|
1144
|
+
if (location != nullptr) {
|
|
1145
|
+
canvas_native_webgl2_uniform1ui(
|
|
1146
|
+
location->GetUniformLocation(),
|
|
1147
|
+
v0,
|
|
1148
|
+
ptr->GetState()
|
|
1149
|
+
);
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
static void Uniform1uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1156
|
+
|
|
1157
|
+
static void
|
|
1158
|
+
FastUniform1uiv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1159
|
+
const v8::FastApiTypedArray<uint32_t> &value) {
|
|
1160
|
+
WebGLRenderingContext *ptr = GetPointer(receiver_obj);
|
|
1161
|
+
if (ptr == nullptr) {
|
|
1162
|
+
return;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1166
|
+
|
|
1167
|
+
if (location != nullptr) {
|
|
1168
|
+
auto size = value.length();
|
|
1169
|
+
uint32_t *data;
|
|
1170
|
+
value.getStorageIfAligned(&data);
|
|
1171
|
+
|
|
1172
|
+
canvas_native_webgl2_uniform1uiv(
|
|
1173
|
+
location->GetUniformLocation(),
|
|
1174
|
+
data, size,
|
|
1175
|
+
ptr->GetState());
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
static void Uniform2ui(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1180
|
+
|
|
1181
|
+
static void
|
|
1182
|
+
FastUniform2ui(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1183
|
+
uint32_t v0, uint32_t v1) {
|
|
1184
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1185
|
+
if (ptr == nullptr) {
|
|
1186
|
+
return;
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
auto type = GetNativeType(location_obj);
|
|
1191
|
+
|
|
1192
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1193
|
+
|
|
1194
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1195
|
+
|
|
1196
|
+
if (location != nullptr) {
|
|
1197
|
+
canvas_native_webgl2_uniform2ui(
|
|
1198
|
+
location->GetUniformLocation(),
|
|
1199
|
+
v0, v1,
|
|
1200
|
+
ptr->GetState()
|
|
1201
|
+
);
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
static void Uniform2uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1208
|
+
|
|
1209
|
+
static void
|
|
1210
|
+
FastUniform2uiv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1211
|
+
const v8::FastApiTypedArray<uint32_t> &value) {
|
|
1212
|
+
WebGLRenderingContext *ptr = GetPointer(receiver_obj);
|
|
1213
|
+
if (ptr == nullptr) {
|
|
1214
|
+
return;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1218
|
+
|
|
1219
|
+
if (location != nullptr) {
|
|
1220
|
+
auto size = value.length();
|
|
1221
|
+
uint32_t *data;
|
|
1222
|
+
value.getStorageIfAligned(&data);
|
|
1223
|
+
|
|
1224
|
+
canvas_native_webgl2_uniform2uiv(
|
|
1225
|
+
location->GetUniformLocation(),
|
|
1226
|
+
data, size,
|
|
1227
|
+
ptr->GetState());
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
static void Uniform3ui(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1232
|
+
|
|
1233
|
+
static void
|
|
1234
|
+
FastUniform3ui(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1235
|
+
uint32_t v0, uint32_t v1, uint32_t v2) {
|
|
1236
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1237
|
+
if (ptr == nullptr) {
|
|
1238
|
+
return;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
|
|
1242
|
+
auto type = GetNativeType(location_obj);
|
|
1243
|
+
|
|
1244
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1245
|
+
|
|
1246
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1247
|
+
|
|
1248
|
+
if (location != nullptr) {
|
|
1249
|
+
canvas_native_webgl2_uniform3ui(
|
|
1250
|
+
location->GetUniformLocation(),
|
|
1251
|
+
v0, v1, v2,
|
|
1252
|
+
ptr->GetState()
|
|
1253
|
+
);
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
static void Uniform3uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1260
|
+
|
|
1261
|
+
static void
|
|
1262
|
+
FastUniform3uiv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1263
|
+
const v8::FastApiTypedArray<uint32_t> &value) {
|
|
1264
|
+
WebGLRenderingContext *ptr = GetPointer(receiver_obj);
|
|
1265
|
+
if (ptr == nullptr) {
|
|
1266
|
+
return;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1270
|
+
|
|
1271
|
+
if (location != nullptr) {
|
|
1272
|
+
auto size = value.length();
|
|
1273
|
+
uint32_t *data;
|
|
1274
|
+
value.getStorageIfAligned(&data);
|
|
1275
|
+
|
|
1276
|
+
canvas_native_webgl2_uniform3uiv(
|
|
1277
|
+
location->GetUniformLocation(),
|
|
1278
|
+
data, size,
|
|
1279
|
+
ptr->GetState());
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
static void Uniform4ui(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1284
|
+
|
|
1285
|
+
static void
|
|
1286
|
+
FastUniform4ui(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1287
|
+
uint32_t v0, uint32_t v1, uint32_t v2, uint32_t v3) {
|
|
1288
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1289
|
+
if (ptr == nullptr) {
|
|
1290
|
+
return;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
auto type = GetNativeType(location_obj);
|
|
1295
|
+
|
|
1296
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1297
|
+
|
|
1298
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1299
|
+
|
|
1300
|
+
if (location != nullptr) {
|
|
1301
|
+
canvas_native_webgl2_uniform4ui(
|
|
1302
|
+
location->GetUniformLocation(),
|
|
1303
|
+
v0, v1, v2, v3,
|
|
1304
|
+
ptr->GetState()
|
|
1305
|
+
);
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
static void Uniform4uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1312
|
+
|
|
1313
|
+
|
|
1314
|
+
static void
|
|
1315
|
+
FastUniform4uiv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1316
|
+
const v8::FastApiTypedArray<uint32_t> &value) {
|
|
1317
|
+
WebGLRenderingContext *ptr = GetPointer(receiver_obj);
|
|
1318
|
+
if (ptr == nullptr) {
|
|
1319
|
+
return;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1323
|
+
|
|
1324
|
+
if (location != nullptr) {
|
|
1325
|
+
auto size = value.length();
|
|
1326
|
+
uint32_t *data;
|
|
1327
|
+
value.getStorageIfAligned(&data);
|
|
1328
|
+
|
|
1329
|
+
canvas_native_webgl2_uniform4uiv(
|
|
1330
|
+
location->GetUniformLocation(),
|
|
1331
|
+
data, size,
|
|
1332
|
+
ptr->GetState());
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
static void UniformBlockBinding(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1337
|
+
|
|
1338
|
+
static void
|
|
1339
|
+
FastUniformBlockBinding(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> program_obj,
|
|
1340
|
+
uint32_t uniformBlockIndex, uint32_t uniformBlockBinding) {
|
|
1341
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1342
|
+
if (ptr == nullptr) {
|
|
1343
|
+
return;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
|
|
1347
|
+
auto type = GetNativeType(program_obj);
|
|
1348
|
+
if (type == NativeType::WebGLProgram) {
|
|
1349
|
+
|
|
1350
|
+
auto program = WebGLProgram::GetPointer(program_obj);
|
|
1351
|
+
|
|
1352
|
+
if (program != nullptr) {
|
|
1353
|
+
canvas_native_webgl2_uniform_block_binding(
|
|
1354
|
+
program->GetProgram(),
|
|
1355
|
+
uniformBlockIndex,
|
|
1356
|
+
uniformBlockBinding,
|
|
1357
|
+
ptr->GetState()
|
|
1358
|
+
);
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
static void UniformMatrix2x3fv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1366
|
+
|
|
1367
|
+
static void
|
|
1368
|
+
FastUniformMatrix2x3fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1369
|
+
bool transpose, const v8::FastApiTypedArray<float> &data_value) {
|
|
1370
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1371
|
+
if (ptr == nullptr) {
|
|
1372
|
+
return;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
auto type = GetNativeType(location_obj);
|
|
1376
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1377
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1378
|
+
auto size = data_value.length();
|
|
1379
|
+
float *data;
|
|
1380
|
+
data_value.getStorageIfAligned(&data);
|
|
1381
|
+
|
|
1382
|
+
canvas_native_webgl2_uniform_matrix2x3fv(
|
|
1383
|
+
location->GetUniformLocation(),
|
|
1384
|
+
transpose,
|
|
1385
|
+
data, size,
|
|
1386
|
+
ptr->GetState()
|
|
1387
|
+
);
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
static void
|
|
1393
|
+
FastUniformMatrix2x3fvArray(v8::Local<v8::Object> receiver_obj,
|
|
1394
|
+
v8::Local<v8::Object> location_obj,
|
|
1395
|
+
bool transpose, v8::Local<v8::Array> data_value) {
|
|
1396
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1397
|
+
if (ptr == nullptr) {
|
|
1398
|
+
return;
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
auto type = GetNativeType(location_obj);
|
|
1402
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1403
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1404
|
+
|
|
1405
|
+
auto len = data_value->Length();
|
|
1406
|
+
std::vector<float> buf;
|
|
1407
|
+
buf.reserve(len);
|
|
1408
|
+
|
|
1409
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
|
|
1410
|
+
data_value, buf.data(), len);
|
|
1411
|
+
|
|
1412
|
+
if (copied) {
|
|
1413
|
+
canvas_native_webgl2_uniform_matrix2x3fv(
|
|
1414
|
+
location->GetUniformLocation(),
|
|
1415
|
+
transpose,
|
|
1416
|
+
buf.data(), buf.size(),
|
|
1417
|
+
ptr->GetState()
|
|
1418
|
+
);
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
static void UniformMatrix2x4fv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
static void
|
|
1428
|
+
FastUniformMatrix2x4fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1429
|
+
bool transpose, const v8::FastApiTypedArray<float> &data_value) {
|
|
1430
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1431
|
+
if (ptr == nullptr) {
|
|
1432
|
+
return;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
auto type = GetNativeType(location_obj);
|
|
1436
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1437
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1438
|
+
auto size = data_value.length();
|
|
1439
|
+
float *data;
|
|
1440
|
+
data_value.getStorageIfAligned(&data);
|
|
1441
|
+
|
|
1442
|
+
canvas_native_webgl2_uniform_matrix2x4fv(
|
|
1443
|
+
location->GetUniformLocation(),
|
|
1444
|
+
transpose,
|
|
1445
|
+
data, size,
|
|
1446
|
+
ptr->GetState()
|
|
1447
|
+
);
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
static void
|
|
1453
|
+
FastUniformMatrix2x4fvArray(v8::Local<v8::Object> receiver_obj,
|
|
1454
|
+
v8::Local<v8::Object> location_obj,
|
|
1455
|
+
bool transpose, v8::Local<v8::Array> data_value) {
|
|
1456
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1457
|
+
if (ptr == nullptr) {
|
|
1458
|
+
return;
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
auto type = GetNativeType(location_obj);
|
|
1462
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1463
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1464
|
+
|
|
1465
|
+
auto len = data_value->Length();
|
|
1466
|
+
std::vector<float> buf;
|
|
1467
|
+
buf.reserve(len);
|
|
1468
|
+
|
|
1469
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
|
|
1470
|
+
data_value, buf.data(), len);
|
|
1471
|
+
|
|
1472
|
+
if (copied) {
|
|
1473
|
+
canvas_native_webgl2_uniform_matrix2x4fv(
|
|
1474
|
+
location->GetUniformLocation(),
|
|
1475
|
+
transpose,
|
|
1476
|
+
buf.data(), buf.size(),
|
|
1477
|
+
ptr->GetState()
|
|
1478
|
+
);
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
static void UniformMatrix3x2fv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1485
|
+
|
|
1486
|
+
|
|
1487
|
+
static void
|
|
1488
|
+
FastUniformMatrix3x2fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1489
|
+
bool transpose, const v8::FastApiTypedArray<float> &data_value) {
|
|
1490
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1491
|
+
if (ptr == nullptr) {
|
|
1492
|
+
return;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
auto type = GetNativeType(location_obj);
|
|
1496
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1497
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1498
|
+
auto size = data_value.length();
|
|
1499
|
+
float *data;
|
|
1500
|
+
data_value.getStorageIfAligned(&data);
|
|
1501
|
+
|
|
1502
|
+
canvas_native_webgl2_uniform_matrix3x2fv(
|
|
1503
|
+
location->GetUniformLocation(),
|
|
1504
|
+
transpose,
|
|
1505
|
+
data, size,
|
|
1506
|
+
ptr->GetState()
|
|
1507
|
+
);
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
static void
|
|
1513
|
+
FastUniformMatrix3x2fvArray(v8::Local<v8::Object> receiver_obj,
|
|
1514
|
+
v8::Local<v8::Object> location_obj,
|
|
1515
|
+
bool transpose, v8::Local<v8::Array> data_value) {
|
|
1516
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1517
|
+
if (ptr == nullptr) {
|
|
1518
|
+
return;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
auto type = GetNativeType(location_obj);
|
|
1522
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1523
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1524
|
+
|
|
1525
|
+
auto len = data_value->Length();
|
|
1526
|
+
std::vector<float> buf;
|
|
1527
|
+
buf.reserve(len);
|
|
1528
|
+
|
|
1529
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
|
|
1530
|
+
data_value, buf.data(), len);
|
|
1531
|
+
|
|
1532
|
+
if (copied) {
|
|
1533
|
+
canvas_native_webgl2_uniform_matrix3x2fv(
|
|
1534
|
+
location->GetUniformLocation(),
|
|
1535
|
+
transpose,
|
|
1536
|
+
buf.data(), buf.size(),
|
|
1537
|
+
ptr->GetState()
|
|
1538
|
+
);
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
static void UniformMatrix3x4fv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1545
|
+
|
|
1546
|
+
|
|
1547
|
+
static void
|
|
1548
|
+
FastUniformMatrix3x4fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1549
|
+
bool transpose, const v8::FastApiTypedArray<float> &data_value) {
|
|
1550
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1551
|
+
if (ptr == nullptr) {
|
|
1552
|
+
return;
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
auto type = GetNativeType(location_obj);
|
|
1556
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1557
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1558
|
+
auto size = data_value.length();
|
|
1559
|
+
float *data;
|
|
1560
|
+
data_value.getStorageIfAligned(&data);
|
|
1561
|
+
|
|
1562
|
+
canvas_native_webgl2_uniform_matrix3x4fv(
|
|
1563
|
+
location->GetUniformLocation(),
|
|
1564
|
+
transpose,
|
|
1565
|
+
data, size,
|
|
1566
|
+
ptr->GetState()
|
|
1567
|
+
);
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
static void
|
|
1573
|
+
FastUniformMatrix3x4fvArray(v8::Local<v8::Object> receiver_obj,
|
|
1574
|
+
v8::Local<v8::Object> location_obj,
|
|
1575
|
+
bool transpose, v8::Local<v8::Array> data_value) {
|
|
1576
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1577
|
+
if (ptr == nullptr) {
|
|
1578
|
+
return;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
auto type = GetNativeType(location_obj);
|
|
1582
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1583
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1584
|
+
|
|
1585
|
+
auto len = data_value->Length();
|
|
1586
|
+
std::vector<float> buf;
|
|
1587
|
+
buf.reserve(len);
|
|
1588
|
+
|
|
1589
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
|
|
1590
|
+
data_value, buf.data(), len);
|
|
1591
|
+
|
|
1592
|
+
if (copied) {
|
|
1593
|
+
canvas_native_webgl2_uniform_matrix3x4fv(
|
|
1594
|
+
location->GetUniformLocation(),
|
|
1595
|
+
transpose,
|
|
1596
|
+
buf.data(), buf.size(),
|
|
1597
|
+
ptr->GetState()
|
|
1598
|
+
);
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
|
|
1605
|
+
static void UniformMatrix4x2fv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1606
|
+
|
|
1607
|
+
static void
|
|
1608
|
+
FastUniformMatrix4x2fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1609
|
+
bool transpose, const v8::FastApiTypedArray<float> &data_value) {
|
|
1610
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1611
|
+
if (ptr == nullptr) {
|
|
1612
|
+
return;
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
auto type = GetNativeType(location_obj);
|
|
1616
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1617
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1618
|
+
auto size = data_value.length();
|
|
1619
|
+
float *data;
|
|
1620
|
+
data_value.getStorageIfAligned(&data);
|
|
1621
|
+
|
|
1622
|
+
canvas_native_webgl2_uniform_matrix4x2fv(
|
|
1623
|
+
location->GetUniformLocation(),
|
|
1624
|
+
transpose,
|
|
1625
|
+
data, size,
|
|
1626
|
+
ptr->GetState()
|
|
1627
|
+
);
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
static void
|
|
1633
|
+
FastUniformMatrix4x2fvArray(v8::Local<v8::Object> receiver_obj,
|
|
1634
|
+
v8::Local<v8::Object> location_obj,
|
|
1635
|
+
bool transpose, v8::Local<v8::Array> data_value) {
|
|
1636
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1637
|
+
if (ptr == nullptr) {
|
|
1638
|
+
return;
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
auto type = GetNativeType(location_obj);
|
|
1642
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1643
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1644
|
+
|
|
1645
|
+
auto len = data_value->Length();
|
|
1646
|
+
std::vector<float> buf;
|
|
1647
|
+
buf.reserve(len);
|
|
1648
|
+
|
|
1649
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
|
|
1650
|
+
data_value, buf.data(), len);
|
|
1651
|
+
|
|
1652
|
+
if (copied) {
|
|
1653
|
+
canvas_native_webgl2_uniform_matrix4x2fv(
|
|
1654
|
+
location->GetUniformLocation(),
|
|
1655
|
+
transpose,
|
|
1656
|
+
buf.data(), buf.size(),
|
|
1657
|
+
ptr->GetState()
|
|
1658
|
+
);
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
static void UniformMatrix4x3fv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
static void
|
|
1668
|
+
FastUniformMatrix4x3fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
|
|
1669
|
+
bool transpose, const v8::FastApiTypedArray<float> &data_value) {
|
|
1670
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1671
|
+
if (ptr == nullptr) {
|
|
1672
|
+
return;
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
auto type = GetNativeType(location_obj);
|
|
1676
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1677
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1678
|
+
auto size = data_value.length();
|
|
1679
|
+
float *data;
|
|
1680
|
+
data_value.getStorageIfAligned(&data);
|
|
1681
|
+
|
|
1682
|
+
canvas_native_webgl2_uniform_matrix4x3fv(
|
|
1683
|
+
location->GetUniformLocation(),
|
|
1684
|
+
transpose,
|
|
1685
|
+
data, size,
|
|
1686
|
+
ptr->GetState()
|
|
1687
|
+
);
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
static void
|
|
1693
|
+
FastUniformMatrix4x3fvArray(v8::Local<v8::Object> receiver_obj,
|
|
1694
|
+
v8::Local<v8::Object> location_obj,
|
|
1695
|
+
bool transpose, v8::Local<v8::Array> data_value) {
|
|
1696
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1697
|
+
if (ptr == nullptr) {
|
|
1698
|
+
return;
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
auto type = GetNativeType(location_obj);
|
|
1702
|
+
if (type == NativeType::WebGLUniformLocation) {
|
|
1703
|
+
auto location = WebGLUniformLocation::GetPointer(location_obj);
|
|
1704
|
+
|
|
1705
|
+
auto len = data_value->Length();
|
|
1706
|
+
std::vector<float> buf;
|
|
1707
|
+
buf.reserve(len);
|
|
1708
|
+
|
|
1709
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
|
|
1710
|
+
data_value, buf.data(), len);
|
|
1711
|
+
|
|
1712
|
+
if (copied) {
|
|
1713
|
+
canvas_native_webgl2_uniform_matrix4x3fv(
|
|
1714
|
+
location->GetUniformLocation(),
|
|
1715
|
+
transpose,
|
|
1716
|
+
buf.data(), buf.size(),
|
|
1717
|
+
ptr->GetState()
|
|
1718
|
+
);
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
static void VertexAttribDivisor(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1725
|
+
|
|
1726
|
+
static void
|
|
1727
|
+
FastVertexAttribDivisor(v8::Local<v8::Object> receiver_obj, uint32_t index, uint32_t divisor) {
|
|
1728
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1729
|
+
if (ptr == nullptr) {
|
|
1730
|
+
return;
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
canvas_native_webgl2_vertex_attrib_divisor(
|
|
1734
|
+
index,
|
|
1735
|
+
divisor,
|
|
1736
|
+
ptr->GetState()
|
|
1737
|
+
);
|
|
1738
|
+
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
static void VertexAttribI4i(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1742
|
+
|
|
1743
|
+
static void
|
|
1744
|
+
FastVertexAttribI4i(v8::Local<v8::Object> receiver_obj, int32_t index, int32_t v0, int32_t v1,
|
|
1745
|
+
int32_t v2, int32_t v3) {
|
|
1746
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1747
|
+
if (ptr == nullptr) {
|
|
1748
|
+
return;
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
|
|
1752
|
+
canvas_native_webgl2_vertex_attrib_i4i(
|
|
1753
|
+
index,
|
|
1754
|
+
v0,
|
|
1755
|
+
v1,
|
|
1756
|
+
v2,
|
|
1757
|
+
v3,
|
|
1758
|
+
ptr->GetState()
|
|
1759
|
+
);
|
|
1760
|
+
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
static void VertexAttribI4iv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1764
|
+
|
|
1765
|
+
static void FastVertexAttribI4iv(v8::Local<v8::Object> receiver_obj, uint32_t index,
|
|
1766
|
+
const v8::FastApiTypedArray<int32_t> &data_value) {
|
|
1767
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1768
|
+
if (ptr == nullptr) {
|
|
1769
|
+
return;
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
auto size = data_value.length();
|
|
1773
|
+
int32_t *data;
|
|
1774
|
+
data_value.getStorageIfAligned(&data);
|
|
1775
|
+
|
|
1776
|
+
canvas_native_webgl2_vertex_attrib_i4iv(
|
|
1777
|
+
index,
|
|
1778
|
+
data, size,
|
|
1779
|
+
ptr->GetState()
|
|
1780
|
+
);
|
|
1781
|
+
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1784
|
+
static void FastVertexAttribI4ivArray(v8::Local<v8::Object> receiver_obj, uint32_t index,
|
|
1785
|
+
v8::Local<v8::Array> data_value) {
|
|
1786
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1787
|
+
if (ptr == nullptr) {
|
|
1788
|
+
return;
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
auto len = data_value->Length();
|
|
1792
|
+
std::vector<int32_t> buf;
|
|
1793
|
+
buf.reserve(len);
|
|
1794
|
+
|
|
1795
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<int32_t>::Build().GetId(), int32_t>(
|
|
1796
|
+
data_value, buf.data(), len);
|
|
1797
|
+
|
|
1798
|
+
|
|
1799
|
+
if (copied) {
|
|
1800
|
+
canvas_native_webgl2_vertex_attrib_i4iv(
|
|
1801
|
+
index,
|
|
1802
|
+
buf.data(), buf.size(),
|
|
1803
|
+
ptr->GetState()
|
|
1804
|
+
);
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
static void VertexAttribI4ui(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1810
|
+
|
|
1811
|
+
static void
|
|
1812
|
+
FastVertexAttribI4ui(v8::Local<v8::Object> receiver_obj, uint32_t index, uint32_t v0,
|
|
1813
|
+
uint32_t v1,
|
|
1814
|
+
uint32_t v2, uint32_t v3) {
|
|
1815
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1816
|
+
if (ptr == nullptr) {
|
|
1817
|
+
return;
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
|
|
1821
|
+
canvas_native_webgl2_vertex_attrib_i4ui(
|
|
1822
|
+
index,
|
|
1823
|
+
v0,
|
|
1824
|
+
v1,
|
|
1825
|
+
v2,
|
|
1826
|
+
v3,
|
|
1827
|
+
ptr->GetState()
|
|
1828
|
+
);
|
|
1829
|
+
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
static void VertexAttribI4uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
1833
|
+
|
|
1834
|
+
|
|
1835
|
+
static void FastVertexAttribI4uiv(v8::Local<v8::Object> receiver_obj, uint32_t index,
|
|
1836
|
+
const v8::FastApiTypedArray<uint32_t> &data_value) {
|
|
1837
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1838
|
+
if (ptr == nullptr) {
|
|
1839
|
+
return;
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
auto size = data_value.length();
|
|
1843
|
+
uint32_t *data;
|
|
1844
|
+
data_value.getStorageIfAligned(&data);
|
|
1845
|
+
|
|
1846
|
+
canvas_native_webgl2_vertex_attrib_i4uiv(
|
|
1847
|
+
index,
|
|
1848
|
+
data, size,
|
|
1849
|
+
ptr->GetState()
|
|
1850
|
+
);
|
|
1851
|
+
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
static void FastVertexAttribI4uivArray(v8::Local<v8::Object> receiver_obj, uint32_t index,
|
|
1855
|
+
v8::Local<v8::Array> data_value) {
|
|
1856
|
+
WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
|
|
1857
|
+
if (ptr == nullptr) {
|
|
1858
|
+
return;
|
|
1859
|
+
}
|
|
419
1860
|
|
|
420
|
-
|
|
1861
|
+
auto len = data_value->Length();
|
|
1862
|
+
std::vector<uint32_t> buf;
|
|
1863
|
+
buf.reserve(len);
|
|
421
1864
|
|
|
422
|
-
|
|
1865
|
+
auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<uint32_t>::Build().GetId(), uint32_t>(
|
|
1866
|
+
data_value, buf.data(), len);
|
|
423
1867
|
|
|
424
|
-
if (methodName == "MAX_CLIENT_WAIT_TIMEOUT_WEBGL") { return {0x9247}; }
|
|
425
1868
|
|
|
426
|
-
|
|
1869
|
+
if (copied) {
|
|
1870
|
+
canvas_native_webgl2_vertex_attrib_i4uiv(
|
|
1871
|
+
index,
|
|
1872
|
+
buf.data(), buf.size(),
|
|
1873
|
+
ptr->GetState()
|
|
1874
|
+
);
|
|
1875
|
+
}
|
|
427
1876
|
|
|
428
|
-
return jsi::Value::undefined();
|
|
429
1877
|
}
|
|
430
1878
|
|
|
431
1879
|
};
|