@nativescript/canvas 2.0.0-alpha.5 → 2.0.0-alpha.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (542) hide show
  1. package/Canvas/common.d.ts +213 -25
  2. package/Canvas/common.js +702 -452
  3. package/Canvas/common.js.map +1 -1
  4. package/Canvas/index.android.d.ts +12 -1
  5. package/Canvas/index.android.js +162 -49
  6. package/Canvas/index.android.js.map +1 -1
  7. package/Canvas/index.d.ts +13 -0
  8. package/Canvas/index.ios.d.ts +9 -4
  9. package/Canvas/index.ios.js +166 -103
  10. package/Canvas/index.ios.js.map +1 -1
  11. package/Canvas2D/CanvasGradient/index.d.ts +1 -3
  12. package/Canvas2D/CanvasGradient/index.js +1 -10
  13. package/Canvas2D/CanvasGradient/index.js.map +1 -1
  14. package/Canvas2D/CanvasPattern/index.d.ts +1 -3
  15. package/Canvas2D/CanvasPattern/index.js +1 -10
  16. package/Canvas2D/CanvasPattern/index.js.map +1 -1
  17. package/Canvas2D/CanvasRenderingContext2D/index.d.ts +7 -3
  18. package/Canvas2D/CanvasRenderingContext2D/index.js +132 -233
  19. package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
  20. package/Canvas2D/DOMMatrix/index.js +3 -3
  21. package/Canvas2D/DOMMatrix/index.js.map +1 -1
  22. package/Canvas2D/ImageData/index.js +6 -6
  23. package/Canvas2D/ImageData/index.js.map +1 -1
  24. package/Canvas2D/Path2D/index.d.ts +0 -2
  25. package/Canvas2D/Path2D/index.js +32 -42
  26. package/Canvas2D/Path2D/index.js.map +1 -1
  27. package/Dom/Paint.js +2 -3
  28. package/Dom/Paint.js.map +1 -1
  29. package/Dom/shapes/Circle.js +1 -2
  30. package/Dom/shapes/Circle.js.map +1 -1
  31. package/Dom/shapes/Points.js +1 -2
  32. package/Dom/shapes/Points.js.map +1 -1
  33. package/ImageAsset/index.d.ts +2 -2
  34. package/ImageAsset/index.js +33 -37
  35. package/ImageAsset/index.js.map +1 -1
  36. package/ImageBitmap/index.d.ts +0 -2
  37. package/ImageBitmap/index.js +47 -33
  38. package/ImageBitmap/index.js.map +1 -1
  39. package/LICENSE +201 -0
  40. package/SVG/SVG.js +1 -1
  41. package/SVG/SVG.js.map +1 -1
  42. package/TextDecoder/index.d.ts +0 -2
  43. package/TextDecoder/index.js +3 -12
  44. package/TextDecoder/index.js.map +1 -1
  45. package/TextEncoder/index.d.ts +0 -2
  46. package/TextEncoder/index.js +4 -13
  47. package/TextEncoder/index.js.map +1 -1
  48. package/WebGL/WebGLExtensions/index.d.ts +4 -12
  49. package/WebGL/WebGLExtensions/index.js +27 -77
  50. package/WebGL/WebGLExtensions/index.js.map +1 -1
  51. package/WebGL/WebGLProgram.d.ts +0 -1
  52. package/WebGL/WebGLProgram.js +0 -3
  53. package/WebGL/WebGLProgram.js.map +1 -1
  54. package/WebGL/WebGLRenderingContext/common.d.ts +1 -3
  55. package/WebGL/WebGLRenderingContext/common.js +3 -13
  56. package/WebGL/WebGLRenderingContext/common.js.map +1 -1
  57. package/WebGL/WebGLRenderingContext/index.d.ts +19 -17
  58. package/WebGL/WebGLRenderingContext/index.js +354 -728
  59. package/WebGL/WebGLRenderingContext/index.js.map +1 -1
  60. package/WebGL2/WebGL2RenderingContext/common.d.ts +2 -2
  61. package/WebGL2/WebGL2RenderingContext/common.js +2 -2
  62. package/WebGL2/WebGL2RenderingContext/common.js.map +1 -1
  63. package/WebGL2/WebGL2RenderingContext/index.d.ts +1 -1
  64. package/WebGL2/WebGL2RenderingContext/index.js +116 -285
  65. package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
  66. package/angular/esm2020/index.mjs +4 -4
  67. package/angular/fesm2015/nativescript-canvas-angular.mjs +4 -4
  68. package/angular/fesm2020/nativescript-canvas-angular.mjs +4 -4
  69. package/angular/package.json +2 -2
  70. package/index.js.map +1 -1
  71. package/package.json +3 -2
  72. package/platforms/android/canvas-release.aar +0 -0
  73. package/platforms/android/include.gradle +15 -0
  74. package/platforms/ios/CanvasNative.xcframework/Info.plist +5 -5
  75. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
  76. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +135 -68
  77. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative.h +10 -0
  78. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +144 -0
  79. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +2774 -70
  80. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist +0 -0
  81. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  82. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +5851 -2555
  83. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +44 -24
  84. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  85. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +44 -24
  86. package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
  87. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
  88. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +270 -136
  89. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative.h +10 -0
  90. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +144 -0
  91. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +2774 -70
  92. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist +0 -0
  93. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  94. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  95. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +5851 -2555
  96. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +44 -24
  97. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  98. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +44 -24
  99. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +5851 -2555
  100. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +44 -24
  101. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  102. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +44 -24
  103. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +42 -31
  104. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
  105. package/platforms/ios/Podfile +5 -2
  106. package/platforms/ios/build.xcconfig +3 -3
  107. package/platforms/ios/src/CanvasModule.h +0 -2
  108. package/platforms/ios/src/CanvasModule.mm +4 -4
  109. package/platforms/ios/src/NSOperationQueueWrapper.h +11 -0
  110. package/platforms/ios/src/NSOperationQueueWrapper.mm +74 -0
  111. package/platforms/ios/src/cpp/Caches.cpp +35 -0
  112. package/platforms/ios/src/cpp/Caches.h +190 -0
  113. package/platforms/ios/src/cpp/CanvasJSIModule.cpp +1593 -0
  114. package/platforms/ios/src/cpp/CanvasJSIModule.h +16 -34
  115. package/platforms/ios/src/cpp/Common.h +30 -0
  116. package/platforms/ios/src/cpp/ConcurrentMap.h +54 -0
  117. package/platforms/ios/src/cpp/Helpers.h +336 -38
  118. package/platforms/ios/src/cpp/ImageAssetImpl.cpp +802 -0
  119. package/platforms/ios/src/cpp/ImageAssetImpl.h +46 -12
  120. package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +189 -0
  121. package/platforms/ios/src/cpp/ImageBitmapImpl.h +42 -16
  122. package/platforms/ios/src/cpp/JSICallback.h +83 -5
  123. package/platforms/ios/src/cpp/JSIReadFileCallback.h +86 -6
  124. package/platforms/ios/src/cpp/JSIRuntime.cpp +21 -0
  125. package/platforms/ios/src/cpp/JSIRuntime.h +7 -0
  126. package/platforms/ios/src/cpp/ObjectWrapperImpl.h +31 -0
  127. package/platforms/ios/src/cpp/OneByteStringResource.cpp +55 -0
  128. package/platforms/ios/src/cpp/OneByteStringResource.h +36 -0
  129. package/platforms/ios/src/cpp/PerIsolateData.cpp +49 -0
  130. package/platforms/ios/src/cpp/PerIsolateData.h +54 -0
  131. package/platforms/ios/src/cpp/RafImpl.cpp +8 -0
  132. package/platforms/ios/src/cpp/RafImpl.h +11 -8
  133. package/platforms/ios/src/cpp/TextDecoderImpl.cpp +193 -0
  134. package/platforms/ios/src/cpp/TextDecoderImpl.h +23 -13
  135. package/platforms/ios/src/cpp/TextEncoderImpl.cpp +139 -0
  136. package/platforms/ios/src/cpp/TextEncoderImpl.h +21 -12
  137. package/platforms/ios/src/cpp/URLImpl.cpp +464 -0
  138. package/platforms/ios/src/cpp/URLImpl.h +121 -0
  139. package/platforms/ios/src/cpp/canvas2d/CanvasGradient.cpp +71 -0
  140. package/platforms/ios/src/cpp/canvas2d/CanvasGradient.h +29 -13
  141. package/platforms/ios/src/cpp/canvas2d/CanvasPattern.cpp +89 -0
  142. package/platforms/ios/src/cpp/canvas2d/CanvasPattern.h +49 -12
  143. package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +2841 -0
  144. package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +1331 -21
  145. package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.cpp +207 -0
  146. package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.h +27 -13
  147. package/platforms/ios/src/cpp/canvas2d/MatrixImpl.cpp +807 -0
  148. package/platforms/ios/src/cpp/canvas2d/MatrixImpl.h +173 -13
  149. package/platforms/ios/src/cpp/canvas2d/Path2D.cpp +499 -0
  150. package/platforms/ios/src/cpp/canvas2d/Path2D.h +422 -12
  151. package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.cpp +253 -0
  152. package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.h +51 -12
  153. package/platforms/ios/src/cpp/gl.h +57 -7
  154. package/platforms/ios/src/cpp/gl3stub.c +425 -0
  155. package/platforms/ios/src/cpp/gl3stub.h +665 -0
  156. package/platforms/ios/src/cpp/gles3jni.h +37 -0
  157. package/platforms/ios/src/cpp/include/robin_hood.h +2544 -0
  158. package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.cpp +91 -0
  159. package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.h +33 -13
  160. package/platforms/ios/src/cpp/webgl/WebGLBuffer.h +42 -7
  161. package/platforms/ios/src/cpp/webgl/WebGLFramebuffer.h +47 -11
  162. package/platforms/ios/src/cpp/webgl/WebGLProgram.h +41 -6
  163. package/platforms/ios/src/cpp/webgl/WebGLRenderbuffer.h +41 -7
  164. package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +6845 -0
  165. package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.h +3217 -388
  166. package/platforms/ios/src/cpp/webgl/{WebGLRenderingContextBase.mm → WebGLRenderingContextBase.cpp} +18 -17
  167. package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.h +16 -36
  168. package/platforms/ios/src/cpp/webgl/WebGLShader.h +41 -7
  169. package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.cpp +50 -0
  170. package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.h +67 -12
  171. package/platforms/ios/src/cpp/webgl/WebGLTexture.h +41 -7
  172. package/platforms/ios/src/cpp/webgl/WebGLUniformLocation.h +45 -9
  173. package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.cpp +126 -0
  174. package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.h +26 -12
  175. package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.cpp +35 -0
  176. package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.h +26 -6
  177. package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.cpp +41 -0
  178. package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.h +26 -6
  179. package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.cpp +306 -0
  180. package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.h +47 -13
  181. package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.h +49 -6
  182. package/platforms/ios/src/cpp/webgl/extensions/EXT_shader_texture_lodImpl.h +37 -15
  183. package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.h +47 -6
  184. package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.h +49 -6
  185. package/platforms/ios/src/cpp/webgl/extensions/OES_fbo_render_mipmap.h +41 -16
  186. package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.h +44 -6
  187. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_floatImpl.h +39 -16
  188. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_float_linearImpl.h +37 -16
  189. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.h +42 -6
  190. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_float_linearImpl.h +40 -16
  191. package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.cpp +102 -0
  192. package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.h +69 -14
  193. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.h +51 -8
  194. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.h +49 -6
  195. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.h +49 -8
  196. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.h +76 -6
  197. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.h +57 -6
  198. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.h +53 -6
  199. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.h +59 -6
  200. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.h +46 -6
  201. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.cpp +35 -0
  202. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.h +131 -14
  203. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.cpp +32 -0
  204. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.h +61 -13
  205. package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp +4533 -0
  206. package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.h +1427 -342
  207. package/platforms/ios/src/cpp/webgl2/WebGLQuery.h +41 -4
  208. package/platforms/ios/src/cpp/webgl2/WebGLSampler.h +42 -3
  209. package/platforms/ios/src/cpp/webgl2/WebGLSyncImpl.h +45 -11
  210. package/platforms/ios/src/cpp/webgl2/WebGLTransformFeedback.h +43 -4
  211. package/platforms/ios/src/cpp/webgl2/WebGLVertexArrayObject.h +44 -4
  212. package/platforms/ios/src/module.modulemap +1 -0
  213. package/{pods → src-native/ios}/NativeScript.podspec +12 -25
  214. package/typings/objc!CanvasNative.d.ts +2038 -0
  215. package/typings/objc!CanvasNative.js +1 -0
  216. package/typings/objc!CanvasNative.js.map +1 -0
  217. package/utils.d.ts +3 -1
  218. package/utils.js +7 -20
  219. package/utils.js.map +1 -1
  220. package/angular/nativescript-canvas-angular.d.ts +0 -5
  221. package/platforms/ios/src/cpp/CanvasJSIModule.mm +0 -1105
  222. package/platforms/ios/src/cpp/ImageAssetImpl.mm +0 -417
  223. package/platforms/ios/src/cpp/ImageBitmapImpl.mm +0 -126
  224. package/platforms/ios/src/cpp/RafImpl.mm +0 -10
  225. package/platforms/ios/src/cpp/TextDecoderImpl.mm +0 -97
  226. package/platforms/ios/src/cpp/TextEncoderImpl.mm +0 -60
  227. package/platforms/ios/src/cpp/VecMutableBuffer.h +0 -46
  228. package/platforms/ios/src/cpp/canvas-cxx/src/lib.rs.cc +0 -6132
  229. package/platforms/ios/src/cpp/canvas-cxx/src/lib.rs.h +0 -2859
  230. package/platforms/ios/src/cpp/canvas2d/CanvasGradient.mm +0 -42
  231. package/platforms/ios/src/cpp/canvas2d/CanvasPattern.mm +0 -49
  232. package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.mm +0 -1975
  233. package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.mm +0 -68
  234. package/platforms/ios/src/cpp/canvas2d/MatrixImpl.mm +0 -149
  235. package/platforms/ios/src/cpp/canvas2d/Path2D.mm +0 -335
  236. package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.mm +0 -68
  237. package/platforms/ios/src/cpp/rust/cxx.cc +0 -793
  238. package/platforms/ios/src/cpp/rust/cxx.h +0 -1111
  239. package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.mm +0 -39
  240. package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.mm +0 -5958
  241. package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.mm +0 -40
  242. package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.mm +0 -108
  243. package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.mm +0 -28
  244. package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.mm +0 -42
  245. package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.mm +0 -295
  246. package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.mm +0 -40
  247. package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.mm +0 -37
  248. package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.mm +0 -28
  249. package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.mm +0 -31
  250. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.mm +0 -28
  251. package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.mm +0 -127
  252. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.mm +0 -45
  253. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.mm +0 -45
  254. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.mm +0 -31
  255. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.mm +0 -70
  256. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.mm +0 -47
  257. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.mm +0 -46
  258. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.mm +0 -49
  259. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.mm +0 -30
  260. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.mm +0 -177
  261. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.mm +0 -64
  262. package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.mm +0 -4556
  263. package/pods/Headers/jsi/decorator.h +0 -770
  264. package/pods/Headers/jsi/instrumentation.h +0 -117
  265. package/pods/Headers/jsi/jsi-inl.h +0 -338
  266. package/pods/Headers/jsi/jsi.h +0 -1571
  267. package/pods/Headers/jsi/jsilib.h +0 -59
  268. package/pods/Headers/jsi/threadsafe.h +0 -79
  269. package/pods/Headers/v8runtime/HostProxy.h +0 -71
  270. package/pods/Headers/v8runtime/JSIV8ValueConverter.h +0 -74
  271. package/pods/Headers/v8runtime/V8PointerValue.h +0 -44
  272. package/pods/Headers/v8runtime/V8Runtime.h +0 -240
  273. package/pods/Headers/v8runtime/V8RuntimeConfig.h +0 -26
  274. package/pods/Headers/v8runtime/V8RuntimeFactory.h +0 -21
  275. /package/platforms/ios/src/cpp/{OnRafCallback.mm → OnRafCallback.cpp} +0 -0
  276. /package/{pods → src-native/ios}/Headers/include/APIDesign.md +0 -0
  277. /package/{pods → src-native/ios}/Headers/include/DEPS +0 -0
  278. /package/{pods → src-native/ios}/Headers/include/DIR_METADATA +0 -0
  279. /package/{pods → src-native/ios}/Headers/include/OWNERS +0 -0
  280. /package/{pods → src-native/ios}/Headers/include/cppgc/DEPS +0 -0
  281. /package/{pods → src-native/ios}/Headers/include/cppgc/OWNERS +0 -0
  282. /package/{pods → src-native/ios}/Headers/include/cppgc/README.md +0 -0
  283. /package/{pods → src-native/ios}/Headers/include/cppgc/allocation.h +0 -0
  284. /package/{pods → src-native/ios}/Headers/include/cppgc/common.h +0 -0
  285. /package/{pods → src-native/ios}/Headers/include/cppgc/cross-thread-persistent.h +0 -0
  286. /package/{pods → src-native/ios}/Headers/include/cppgc/custom-space.h +0 -0
  287. /package/{pods → src-native/ios}/Headers/include/cppgc/default-platform.h +0 -0
  288. /package/{pods → src-native/ios}/Headers/include/cppgc/ephemeron-pair.h +0 -0
  289. /package/{pods → src-native/ios}/Headers/include/cppgc/explicit-management.h +0 -0
  290. /package/{pods → src-native/ios}/Headers/include/cppgc/garbage-collected.h +0 -0
  291. /package/{pods → src-native/ios}/Headers/include/cppgc/heap-consistency.h +0 -0
  292. /package/{pods → src-native/ios}/Headers/include/cppgc/heap-state.h +0 -0
  293. /package/{pods → src-native/ios}/Headers/include/cppgc/heap-statistics.h +0 -0
  294. /package/{pods → src-native/ios}/Headers/include/cppgc/heap.h +0 -0
  295. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/api-constants.h +0 -0
  296. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/atomic-entry-flag.h +0 -0
  297. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/caged-heap-local-data.h +0 -0
  298. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/compiler-specific.h +0 -0
  299. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/finalizer-trait.h +0 -0
  300. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/gc-info.h +0 -0
  301. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/logging.h +0 -0
  302. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/name-trait.h +0 -0
  303. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/persistent-node.h +0 -0
  304. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/pointer-policies.h +0 -0
  305. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/write-barrier.h +0 -0
  306. /package/{pods → src-native/ios}/Headers/include/cppgc/liveness-broker.h +0 -0
  307. /package/{pods → src-native/ios}/Headers/include/cppgc/macros.h +0 -0
  308. /package/{pods → src-native/ios}/Headers/include/cppgc/member.h +0 -0
  309. /package/{pods → src-native/ios}/Headers/include/cppgc/name-provider.h +0 -0
  310. /package/{pods → src-native/ios}/Headers/include/cppgc/object-size-trait.h +0 -0
  311. /package/{pods → src-native/ios}/Headers/include/cppgc/persistent.h +0 -0
  312. /package/{pods → src-native/ios}/Headers/include/cppgc/platform.h +0 -0
  313. /package/{pods → src-native/ios}/Headers/include/cppgc/prefinalizer.h +0 -0
  314. /package/{pods → src-native/ios}/Headers/include/cppgc/process-heap-statistics.h +0 -0
  315. /package/{pods → src-native/ios}/Headers/include/cppgc/sentinel-pointer.h +0 -0
  316. /package/{pods → src-native/ios}/Headers/include/cppgc/source-location.h +0 -0
  317. /package/{pods → src-native/ios}/Headers/include/cppgc/testing.h +0 -0
  318. /package/{pods → src-native/ios}/Headers/include/cppgc/trace-trait.h +0 -0
  319. /package/{pods → src-native/ios}/Headers/include/cppgc/type-traits.h +0 -0
  320. /package/{pods → src-native/ios}/Headers/include/cppgc/visitor.h +0 -0
  321. /package/{pods → src-native/ios}/Headers/include/js_protocol-1.2.json +0 -0
  322. /package/{pods → src-native/ios}/Headers/include/js_protocol-1.3.json +0 -0
  323. /package/{pods → src-native/ios}/Headers/include/js_protocol.pdl +0 -0
  324. /package/{pods → src-native/ios}/Headers/include/libffi/arm64/ffi.h +0 -0
  325. /package/{pods → src-native/ios}/Headers/include/libffi/arm64/ffitarget.h +0 -0
  326. /package/{pods → src-native/ios}/Headers/include/libffi/x86_64/ffi.h +0 -0
  327. /package/{pods → src-native/ios}/Headers/include/libffi/x86_64/ffitarget.h +0 -0
  328. /package/{pods → src-native/ios}/Headers/include/libffi.h +0 -0
  329. /package/{pods → src-native/ios}/Headers/include/libplatform/DEPS +0 -0
  330. /package/{pods → src-native/ios}/Headers/include/libplatform/libplatform-export.h +0 -0
  331. /package/{pods → src-native/ios}/Headers/include/libplatform/libplatform.h +0 -0
  332. /package/{pods → src-native/ios}/Headers/include/libplatform/v8-tracing.h +0 -0
  333. /package/{pods → src-native/ios}/Headers/include/v8-array-buffer.h +0 -0
  334. /package/{pods → src-native/ios}/Headers/include/v8-callbacks.h +0 -0
  335. /package/{pods → src-native/ios}/Headers/include/v8-container.h +0 -0
  336. /package/{pods → src-native/ios}/Headers/include/v8-context.h +0 -0
  337. /package/{pods → src-native/ios}/Headers/include/v8-cppgc.h +0 -0
  338. /package/{pods → src-native/ios}/Headers/include/v8-data.h +0 -0
  339. /package/{pods → src-native/ios}/Headers/include/v8-date.h +0 -0
  340. /package/{pods → src-native/ios}/Headers/include/v8-debug.h +0 -0
  341. /package/{pods → src-native/ios}/Headers/include/v8-embedder-heap.h +0 -0
  342. /package/{pods → src-native/ios}/Headers/include/v8-embedder-state-scope.h +0 -0
  343. /package/{pods → src-native/ios}/Headers/include/v8-exception.h +0 -0
  344. /package/{pods → src-native/ios}/Headers/include/v8-extension.h +0 -0
  345. /package/{pods → src-native/ios}/Headers/include/v8-external.h +0 -0
  346. /package/{pods → src-native/ios}/Headers/include/v8-fast-api-calls.h +0 -0
  347. /package/{pods → src-native/ios}/Headers/include/v8-forward.h +0 -0
  348. /package/{pods → src-native/ios}/Headers/include/v8-function-callback.h +0 -0
  349. /package/{pods → src-native/ios}/Headers/include/v8-function.h +0 -0
  350. /package/{pods → src-native/ios}/Headers/include/v8-initialization.h +0 -0
  351. /package/{pods → src-native/ios}/Headers/include/v8-inspector-protocol.h +0 -0
  352. /package/{pods → src-native/ios}/Headers/include/v8-inspector.h +0 -0
  353. /package/{pods → src-native/ios}/Headers/include/v8-internal.h +0 -0
  354. /package/{pods → src-native/ios}/Headers/include/v8-isolate.h +0 -0
  355. /package/{pods → src-native/ios}/Headers/include/v8-json.h +0 -0
  356. /package/{pods → src-native/ios}/Headers/include/v8-local-handle.h +0 -0
  357. /package/{pods → src-native/ios}/Headers/include/v8-locker.h +0 -0
  358. /package/{pods → src-native/ios}/Headers/include/v8-maybe.h +0 -0
  359. /package/{pods → src-native/ios}/Headers/include/v8-memory-span.h +0 -0
  360. /package/{pods → src-native/ios}/Headers/include/v8-message.h +0 -0
  361. /package/{pods → src-native/ios}/Headers/include/v8-metrics.h +0 -0
  362. /package/{pods → src-native/ios}/Headers/include/v8-microtask-queue.h +0 -0
  363. /package/{pods → src-native/ios}/Headers/include/v8-microtask.h +0 -0
  364. /package/{pods → src-native/ios}/Headers/include/v8-object.h +0 -0
  365. /package/{pods → src-native/ios}/Headers/include/v8-persistent-handle.h +0 -0
  366. /package/{pods → src-native/ios}/Headers/include/v8-platform.h +0 -0
  367. /package/{pods → src-native/ios}/Headers/include/v8-primitive-object.h +0 -0
  368. /package/{pods → src-native/ios}/Headers/include/v8-primitive.h +0 -0
  369. /package/{pods → src-native/ios}/Headers/include/v8-profiler.h +0 -0
  370. /package/{pods → src-native/ios}/Headers/include/v8-promise.h +0 -0
  371. /package/{pods → src-native/ios}/Headers/include/v8-proxy.h +0 -0
  372. /package/{pods → src-native/ios}/Headers/include/v8-regexp.h +0 -0
  373. /package/{pods → src-native/ios}/Headers/include/v8-script.h +0 -0
  374. /package/{pods → src-native/ios}/Headers/include/v8-snapshot.h +0 -0
  375. /package/{pods → src-native/ios}/Headers/include/v8-statistics.h +0 -0
  376. /package/{pods → src-native/ios}/Headers/include/v8-template.h +0 -0
  377. /package/{pods → src-native/ios}/Headers/include/v8-traced-handle.h +0 -0
  378. /package/{pods → src-native/ios}/Headers/include/v8-typed-array.h +0 -0
  379. /package/{pods → src-native/ios}/Headers/include/v8-unwinder-state.h +0 -0
  380. /package/{pods → src-native/ios}/Headers/include/v8-unwinder.h +0 -0
  381. /package/{pods → src-native/ios}/Headers/include/v8-util.h +0 -0
  382. /package/{pods → src-native/ios}/Headers/include/v8-value-serializer-version.h +0 -0
  383. /package/{pods → src-native/ios}/Headers/include/v8-value-serializer.h +0 -0
  384. /package/{pods → src-native/ios}/Headers/include/v8-value.h +0 -0
  385. /package/{pods → src-native/ios}/Headers/include/v8-version-string.h +0 -0
  386. /package/{pods → src-native/ios}/Headers/include/v8-version.h +0 -0
  387. /package/{pods → src-native/ios}/Headers/include/v8-wasm-trap-handler-posix.h +0 -0
  388. /package/{pods → src-native/ios}/Headers/include/v8-wasm-trap-handler-win.h +0 -0
  389. /package/{pods → src-native/ios}/Headers/include/v8-wasm.h +0 -0
  390. /package/{pods → src-native/ios}/Headers/include/v8-weak-callback-info.h +0 -0
  391. /package/{pods → src-native/ios}/Headers/include/v8.h +0 -0
  392. /package/{pods → src-native/ios}/Headers/include/v8config.h +0 -0
  393. /package/{pods → src-native/ios}/Headers/inspector/InspectorServer.h +0 -0
  394. /package/{pods → src-native/ios}/Headers/inspector/JsV8InspectorClient.h +0 -0
  395. /package/{pods → src-native/ios}/Headers/inspector/base/trace_event/common/trace_event_common.h +0 -0
  396. /package/{pods → src-native/ios}/Headers/inspector/base64.h +0 -0
  397. /package/{pods → src-native/ios}/Headers/inspector/src/base/address-region.h +0 -0
  398. /package/{pods → src-native/ios}/Headers/inspector/src/base/atomic-utils.h +0 -0
  399. /package/{pods → src-native/ios}/Headers/inspector/src/base/atomicops.h +0 -0
  400. /package/{pods → src-native/ios}/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +0 -0
  401. /package/{pods → src-native/ios}/Headers/inspector/src/base/base-export.h +0 -0
  402. /package/{pods → src-native/ios}/Headers/inspector/src/base/bits.h +0 -0
  403. /package/{pods → src-native/ios}/Headers/inspector/src/base/build_config.h +0 -0
  404. /package/{pods → src-native/ios}/Headers/inspector/src/base/compiler-specific.h +0 -0
  405. /package/{pods → src-native/ios}/Headers/inspector/src/base/export-template.h +0 -0
  406. /package/{pods → src-native/ios}/Headers/inspector/src/base/flags.h +0 -0
  407. /package/{pods → src-native/ios}/Headers/inspector/src/base/immediate-crash.h +0 -0
  408. /package/{pods → src-native/ios}/Headers/inspector/src/base/lazy-instance.h +0 -0
  409. /package/{pods → src-native/ios}/Headers/inspector/src/base/logging.h +0 -0
  410. /package/{pods → src-native/ios}/Headers/inspector/src/base/macros.h +0 -0
  411. /package/{pods → src-native/ios}/Headers/inspector/src/base/memory.h +0 -0
  412. /package/{pods → src-native/ios}/Headers/inspector/src/base/once.h +0 -0
  413. /package/{pods → src-native/ios}/Headers/inspector/src/base/optional.h +0 -0
  414. /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/mutex.h +0 -0
  415. /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/platform.h +0 -0
  416. /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/semaphore.h +0 -0
  417. /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/v8-time.h +0 -0
  418. /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/wrappers.h +0 -0
  419. /package/{pods → src-native/ios}/Headers/inspector/src/base/safe_conversions.h +0 -0
  420. /package/{pods → src-native/ios}/Headers/inspector/src/base/safe_conversions_impl.h +0 -0
  421. /package/{pods → src-native/ios}/Headers/inspector/src/base/template-utils.h +0 -0
  422. /package/{pods → src-native/ios}/Headers/inspector/src/base/v8-fallthrough.h +0 -0
  423. /package/{pods → src-native/ios}/Headers/inspector/src/common/checks.h +0 -0
  424. /package/{pods → src-native/ios}/Headers/inspector/src/common/globals.h +0 -0
  425. /package/{pods → src-native/ios}/Headers/inspector/src/debug/debug-interface.h +0 -0
  426. /package/{pods → src-native/ios}/Headers/inspector/src/debug/interface-types.h +0 -0
  427. /package/{pods → src-native/ios}/Headers/inspector/src/init/v8.h +0 -0
  428. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/custom-preview.h +0 -0
  429. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/injected-script.h +0 -0
  430. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/inspected-context.h +0 -0
  431. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/CSS.h +0 -0
  432. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Console.h +0 -0
  433. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/DOM.h +0 -0
  434. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Debugger.h +0 -0
  435. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Forward.h +0 -0
  436. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/HeapProfiler.h +0 -0
  437. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Log.h +0 -0
  438. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Network.h +0 -0
  439. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Overlay.h +0 -0
  440. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Page.h +0 -0
  441. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Profiler.h +0 -0
  442. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Protocol.h +0 -0
  443. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Runtime.h +0 -0
  444. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Schema.h +0 -0
  445. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Security.h +0 -0
  446. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/remote-object-id.h +0 -0
  447. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/search-util.h +0 -0
  448. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/string-16.h +0 -0
  449. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/string-util.h +0 -0
  450. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-console-agent-impl.h +0 -0
  451. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-console-message.h +0 -0
  452. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-console.h +0 -0
  453. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-css-agent-impl.h +0 -0
  454. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +0 -0
  455. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger-id.h +0 -0
  456. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger-script.h +0 -0
  457. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger.h +0 -0
  458. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-dom-agent-impl.h +0 -0
  459. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +0 -0
  460. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-inspector-impl.h +0 -0
  461. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-inspector-session-impl.h +0 -0
  462. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-log-agent-impl.h +0 -0
  463. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-network-agent-impl.h +0 -0
  464. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +0 -0
  465. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +0 -0
  466. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-page-agent-impl.h +0 -0
  467. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +0 -0
  468. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-regex.h +0 -0
  469. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +0 -0
  470. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-schema-agent-impl.h +0 -0
  471. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-stack-trace-impl.h +0 -0
  472. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-string-conversions.h +0 -0
  473. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-value-utils.h +0 -0
  474. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/value-mirror.h +0 -0
  475. /package/{pods → src-native/ios}/Headers/inspector/src/libplatform/default-platform.h +0 -0
  476. /package/{pods → src-native/ios}/Headers/inspector/src/logging/tracing-flags.h +0 -0
  477. /package/{pods → src-native/ios}/Headers/inspector/src/numbers/conversions.h +0 -0
  478. /package/{pods → src-native/ios}/Headers/inspector/src/tracing/trace-event.h +0 -0
  479. /package/{pods → src-native/ios}/Headers/inspector/src/utils/allocation.h +0 -0
  480. /package/{pods → src-native/ios}/Headers/inspector/src/utils/vector.h +0 -0
  481. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +0 -0
  482. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +0 -0
  483. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +0 -0
  484. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +0 -0
  485. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +0 -0
  486. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +0 -0
  487. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +0 -0
  488. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +0 -0
  489. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +0 -0
  490. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +0 -0
  491. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +0 -0
  492. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +0 -0
  493. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +0 -0
  494. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +0 -0
  495. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +0 -0
  496. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +0 -0
  497. /package/{pods → src-native/ios}/Headers/inspector/utils.h +0 -0
  498. /package/{pods → src-native/ios}/Headers/inspector/v8-inspector-platform.h +0 -0
  499. /package/{pods → src-native/ios}/Headers/runtime/ArgConverter.h +0 -0
  500. /package/{pods → src-native/ios}/Headers/runtime/ArrayAdapter.h +0 -0
  501. /package/{pods → src-native/ios}/Headers/runtime/Caches.h +0 -0
  502. /package/{pods → src-native/ios}/Headers/runtime/ClassBuilder.h +0 -0
  503. /package/{pods → src-native/ios}/Headers/runtime/Common.h +0 -0
  504. /package/{pods → src-native/ios}/Headers/runtime/ConcurrentMap.h +0 -0
  505. /package/{pods → src-native/ios}/Headers/runtime/ConcurrentQueue.h +0 -0
  506. /package/{pods → src-native/ios}/Headers/runtime/Console.h +0 -0
  507. /package/{pods → src-native/ios}/Headers/runtime/Constants.h +0 -0
  508. /package/{pods → src-native/ios}/Headers/runtime/DataWrapper.h +0 -0
  509. /package/{pods → src-native/ios}/Headers/runtime/DictionaryAdapter.h +0 -0
  510. /package/{pods → src-native/ios}/Headers/runtime/ExtVector.h +0 -0
  511. /package/{pods → src-native/ios}/Headers/runtime/FFICall.h +0 -0
  512. /package/{pods → src-native/ios}/Headers/runtime/FastEnumerationAdapter.h +0 -0
  513. /package/{pods → src-native/ios}/Headers/runtime/FunctionReference.h +0 -0
  514. /package/{pods → src-native/ios}/Headers/runtime/Helpers.h +0 -0
  515. /package/{pods → src-native/ios}/Headers/runtime/InlineFunctions.h +0 -0
  516. /package/{pods → src-native/ios}/Headers/runtime/Interop.h +0 -0
  517. /package/{pods → src-native/ios}/Headers/runtime/KnownUnknownClassPair.h +0 -0
  518. /package/{pods → src-native/ios}/Headers/runtime/Metadata.h +0 -0
  519. /package/{pods → src-native/ios}/Headers/runtime/MetadataBuilder.h +0 -0
  520. /package/{pods → src-native/ios}/Headers/runtime/MetadataInlines.h +0 -0
  521. /package/{pods → src-native/ios}/Headers/runtime/ModuleInternal.h +0 -0
  522. /package/{pods → src-native/ios}/Headers/runtime/NSDataAdapter.h +0 -0
  523. /package/{pods → src-native/ios}/Headers/runtime/NativeScriptException.h +0 -0
  524. /package/{pods → src-native/ios}/Headers/runtime/ObjectManager.h +0 -0
  525. /package/{pods → src-native/ios}/Headers/runtime/OneByteStringResource.h +0 -0
  526. /package/{pods → src-native/ios}/Headers/runtime/Pointer.h +0 -0
  527. /package/{pods → src-native/ios}/Headers/runtime/PromiseProxy.h +0 -0
  528. /package/{pods → src-native/ios}/Headers/runtime/Reference.h +0 -0
  529. /package/{pods → src-native/ios}/Headers/runtime/Runtime.h +0 -0
  530. /package/{pods → src-native/ios}/Headers/runtime/RuntimeConfig.h +0 -0
  531. /package/{pods → src-native/ios}/Headers/runtime/SetTimeout.h +0 -0
  532. /package/{pods → src-native/ios}/Headers/runtime/SimpleAllocator.h +0 -0
  533. /package/{pods → src-native/ios}/Headers/runtime/StringHasher.h +0 -0
  534. /package/{pods → src-native/ios}/Headers/runtime/SymbolIterator.h +0 -0
  535. /package/{pods → src-native/ios}/Headers/runtime/SymbolLoader.h +0 -0
  536. /package/{pods → src-native/ios}/Headers/runtime/TNSDerivedClass.h +0 -0
  537. /package/{pods → src-native/ios}/Headers/runtime/TSHelpers.h +0 -0
  538. /package/{pods → src-native/ios}/Headers/runtime/Tasks.h +0 -0
  539. /package/{pods → src-native/ios}/Headers/runtime/UnmanagedType.h +0 -0
  540. /package/{pods → src-native/ios}/Headers/runtime/WeakRef.h +0 -0
  541. /package/{pods → src-native/ios}/Headers/runtime/Worker.h +0 -0
  542. /package/{pods → src-native/ios}/Headers/runtime/robin_hood.h +0 -0
@@ -6,10 +6,7 @@
6
6
  #pragma process_pending_includes
7
7
 
8
8
  #include <vector>
9
- #include "rust/cxx.h"
10
- #include "canvas-cxx/src/lib.rs.h"
11
- #import "NativeScript/JSIRuntime.h"
12
- #include "VecMutableBuffer.h"
9
+ #include "Common.h"
13
10
 
14
11
  #include "WebGLRenderingContextBase.h"
15
12
 
@@ -20,7 +17,7 @@
20
17
  #include "ImageBitmapImpl.h"
21
18
  #include "RafImpl.h"
22
19
 
23
- #include "canvas2d/CanvasRenderingContext2DImpl.h"
20
+ #include "CanvasRenderingContext2DImpl.h"
24
21
 
25
22
  #include "WebGLBuffer.h"
26
23
  #include "WebGLFramebuffer.h"
@@ -59,459 +56,3291 @@
59
56
  #include "extensions/OES_fbo_render_mipmap.h"
60
57
  #include "gl.h"
61
58
 
62
- using namespace facebook;
63
- using namespace org::nativescript::canvas;
64
59
 
65
- class JSI_EXPORT WebGLRenderingContext : public WebGLRenderingContextBase {
60
+ class WebGLRenderingContext : public WebGLRenderingContextBase {
66
61
  public:
67
62
 
68
- WebGLRenderingContext(rust::Box<WebGLState> state);
63
+ WebGLRenderingContext(WebGLState *state);
69
64
 
70
- WebGLRenderingContext(rust::Box<WebGLState> state, WebGLRenderingVersion version);
65
+ WebGLRenderingContext(WebGLState *state, WebGLRenderingVersion version);
71
66
 
72
- jsi::Value get(jsi::Runtime &, const jsi::PropNameID &name) override;
67
+ static v8::Local<v8::FunctionTemplate> GetCtor(v8::Isolate *isolate);
73
68
 
74
- std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime &rt) override;
69
+ static v8::CFunction fast_resized_;
75
70
 
76
- jsi::Value GetParameterInternal(jsi::Runtime &runtime, uint32_t pnameValue,
77
- rust::Box<WebGLResult> result);
71
+ static v8::CFunction fast_start_raf_;
78
72
 
79
- static inline jsi::Value GetProperty(const std::string &methodName) {
80
- if (methodName == "DEPTH_BUFFER_BIT") { return {0x00000100}; }
73
+ static v8::CFunction fast_stop_raf_;
81
74
 
82
- if (methodName == "STENCIL_BUFFER_BIT") { return {0x00000400}; }
75
+ static v8::CFunction fast_active_texture_;
83
76
 
84
- if (methodName == "COLOR_BUFFER_BIT") { return {0x00004000}; }
77
+ static v8::CFunction fast_attach_shader_;
85
78
 
86
- if (methodName == "POINTS") { return {0x0000}; }
79
+ static v8::CFunction fast_bind_buffer_;
87
80
 
88
- if (methodName == "LINES") { return {0x0001}; }
81
+ static v8::CFunction fast_bind_buffer_null_;
89
82
 
90
- if (methodName == "LINE_LOOP") { return {0x0002}; }
83
+ static v8::CFunction fast_bind_frame_buffer_;
91
84
 
92
- if (methodName == "LINE_STRIP") { return {0x0003}; }
85
+ static v8::CFunction fast_bind_frame_buffer_null_;
93
86
 
94
- if (methodName == "TRIANGLES") { return {0x0004}; }
87
+ static v8::CFunction fast_bind_render_buffer_;
95
88
 
96
- if (methodName == "TRIANGLE_STRIP") { return {0x0005}; }
89
+ static v8::CFunction fast_bind_render_buffer_null_;
97
90
 
98
- if (methodName == "TRIANGLE_FAN") { return {0x0006}; }
91
+ static v8::CFunction fast_bind_texture_;
99
92
 
100
- if (methodName == "ZERO") { return {0}; }
93
+ static v8::CFunction fast_bind_texture_null_;
101
94
 
102
- if (methodName == "ONE") { return {1}; }
95
+ static v8::CFunction fast_blend_color_;
96
+ static v8::CFunction fast_blend_equation_separate_;
97
+ static v8::CFunction fast_blend_equation_;
98
+ static v8::CFunction fast_blend_func_separate_;
99
+ static v8::CFunction fast_blend_func_;
103
100
 
104
- if (methodName == "SRC_COLOR") { return {0x0300}; }
101
+ static v8::CFunction fast_buffer_data_os_;
102
+ static v8::CFunction fast_buffer_data_target_usage_;
103
+ static v8::CFunction fast_buffer_data_u8_;
104
+ static v8::CFunction fast_buffer_data_i8_;
105
+ static v8::CFunction fast_buffer_data_u16_;
106
+ static v8::CFunction fast_buffer_data_i16_;
107
+ static v8::CFunction fast_buffer_data_u32_;
108
+ static v8::CFunction fast_buffer_data_i32_;
109
+ static v8::CFunction fast_buffer_data_f32_;
110
+ static v8::CFunction fast_buffer_data_f64_;
111
+ static v8::CFunction fast_buffer_data_array_buffer_;
105
112
 
106
- if (methodName == "ONE_MINUS_SRC_COLOR") { return {0x0301}; }
113
+ static v8::CFunction fast_buffer_sub_data_target_offset_;
107
114
 
108
- if (methodName == "SRC_ALPHA") { return {0x0302}; }
115
+ static v8::CFunction fast_buffer_sub_data_u8_;
116
+ static v8::CFunction fast_buffer_sub_data_i8_;
109
117
 
110
- if (methodName == "ONE_MINUS_SRC_ALPHA") { return {0x0303}; }
118
+ static v8::CFunction fast_buffer_sub_data_u16_;
119
+ static v8::CFunction fast_buffer_sub_data_i16_;
111
120
 
112
- if (methodName == "DST_ALPHA") { return {0x0304}; }
121
+ static v8::CFunction fast_buffer_sub_data_u32_;
122
+ static v8::CFunction fast_buffer_sub_data_i32_;
113
123
 
114
- if (methodName == "ONE_MINUS_DST_ALPHA") { return {0x0305}; }
124
+ static v8::CFunction fast_buffer_sub_data_f32_;
125
+ static v8::CFunction fast_buffer_sub_data_f64_;
115
126
 
116
- if (methodName == "DST_COLOR") { return {0x0306}; }
127
+ static v8::CFunction fast_buffer_sub_data_array_buffer_;
117
128
 
118
- if (methodName == "ONE_MINUS_DST_COLOR") { return {0x0307}; }
129
+ static v8::CFunction fast_check_framebuffer_status_;
119
130
 
120
- if (methodName == "SRC_ALPHA_SATURATE") { return {0x0308}; }
131
+ static v8::CFunction fast_draw_elements_;
121
132
 
133
+ static v8::CFunction fast_vertex_attrib_1f_;
122
134
 
123
- if (methodName == "CONSTANT_COLOR") { return {0x8001}; }
124
- if (methodName == "ONE_MINUS_CONSTANT_COLOR") { return {0x8002}; }
125
- if (methodName == "CONSTANT_ALPHA") { return {0x8003}; }
126
- if (methodName == "ONE_MINUS_CONSTANT_ALPHA") { return {0x8004}; }
135
+ static v8::CFunction fast_vertex_attrib_1fv_;
127
136
 
137
+ static v8::CFunction fast_vertex_attrib_2f_;
128
138
 
129
- /* Blending equations */
139
+ static v8::CFunction fast_vertex_attrib_2fv_;
130
140
 
131
- if (methodName == "FUNC_ADD") { return {0x8006}; }
132
- if (methodName == "FUNC_SUBTRACT") { return {0x800A}; }
133
- if (methodName == "FUNC_REVERSE_SUBTRACT") { return {0x800B}; }
134
- if (methodName == "BLEND_EQUATION") { return {0x8009}; }
135
- if (methodName == "BLEND_EQUATION_RGB") { return {0x8009}; }
136
- if (methodName == "BLEND_EQUATION_ALPHA") { return {0x883D}; }
141
+ static v8::CFunction fast_vertex_attrib_3f_;
137
142
 
143
+ static v8::CFunction fast_vertex_attrib_3fv_;
138
144
 
139
- if (methodName == "BLEND_DST_RGB") { return {0x80C8}; }
140
- if (methodName == "BLEND_SRC_RGB") { return {0x80C9}; }
141
- if (methodName == "BLEND_DST_ALPHA") { return {0x80CA}; }
145
+ static v8::CFunction fast_vertex_attrib_4f_;
142
146
 
147
+ static v8::CFunction fast_vertex_attrib_4fv_;
143
148
 
144
- if (methodName == "BLEND_SRC_ALPHA") { return {0x80CB}; }
145
- if (methodName == "BLEND_COLOR") { return {0x8005}; }
146
- if (methodName == "ARRAY_BUFFER_BINDING") { return {0x8894}; }
147
149
 
150
+ static v8::CFunction fast_uniform1f_;
148
151
 
149
- if (methodName == "ELEMENT_ARRAY_BUFFER_BINDING") { return {0x8895}; }
150
- if (methodName == "LINE_WIDTH") { return {0x0B21}; }
151
- if (methodName == "ALIASED_POINT_SIZE_RANGE") { return {0x846D}; }
152
+ static v8::CFunction fast_uniform1i_;
152
153
 
153
- if (methodName == "ALIASED_LINE_WIDTH_RANGE") { return {0x846E}; }
154
- if (methodName == "CULL_FACE_MODE") { return {0x0B45}; }
155
- if (methodName == "FRONT_FACE") { return {0x0B46}; }
154
+ static v8::CFunction fast_uniform2f_;
156
155
 
157
- if (methodName == "DEPTH_RANGE") { return {0x0B70}; }
158
- if (methodName == "DEPTH_WRITEMASK") { return {0x0B72}; }
159
- if (methodName == "DEPTH_CLEAR_VALUE") { return {0x0B73}; }
156
+ static v8::CFunction fast_uniform2i_;
160
157
 
161
- if (methodName == "DEPTH_FUNC") { return {0x0B74}; }
162
- if (methodName == "STENCIL_CLEAR_VALUE") { return {0x0B91}; }
163
- if (methodName == "STENCIL_FUNC") { return {0x0B92}; }
158
+ static v8::CFunction fast_uniform3f_;
164
159
 
165
- if (methodName == "STENCIL_FAIL") { return {0x0B94}; }
166
- if (methodName == "STENCIL_PASS_DEPTH_FAIL") { return {0x0B95}; }
167
- if (methodName == "STENCIL_PASS_DEPTH_PASS") { return {0x0B96}; }
160
+ static v8::CFunction fast_uniform3i_;
168
161
 
169
- if (methodName == "STENCIL_REF") { return {0x0B97}; }
170
- if (methodName == "STENCIL_VALUE_MASK") { return {0x0B93}; }
171
- if (methodName == "STENCIL_WRITEMASK") { return {0x0B98}; }
162
+ static v8::CFunction fast_uniform4f_;
172
163
 
173
- if (methodName == "STENCIL_BACK_FUNC") { return {0x8800}; }
174
- if (methodName == "STENCIL_BACK_FAIL") { return {0x8801}; }
175
- if (methodName == "STENCIL_BACK_PASS_DEPTH_FAIL") { return {0x8802}; }
164
+ static v8::CFunction fast_uniform4i_;
176
165
 
177
- if (methodName == "STENCIL_BACK_PASS_DEPTH_PASS") { return {0x8803}; }
178
- if (methodName == "STENCIL_BACK_REF") { return {0x8CA3}; }
179
- if (methodName == "STENCIL_BACK_VALUE_MASK") { return {0x8CA4}; }
180
- if (methodName == "STENCIL_BACK_WRITEMASK") { return {0x8CA5}; }
166
+ static v8::CFunction fast_clear_depth_;
181
167
 
182
- if (methodName == "VIEWPORT") { return {0x0BA2}; }
183
- if (methodName == "SCISSOR_BOX") { return {0x0C10}; }
184
- if (methodName == "COLOR_CLEAR_VALUE") { return {0x0C22}; }
185
- if (methodName == "COLOR_WRITEMASK") { return {0x0C23}; }
168
+ static v8::CFunction fast_clear_stencil_;
186
169
 
187
- if (methodName == "UNPACK_ALIGNMENT") { return {0x0CF5}; }
188
- if (methodName == "PACK_ALIGNMENT") { return {0x0D05}; }
189
- if (methodName == "MAX_TEXTURE_SIZE") { return {0x0D33}; }
170
+ static v8::CFunction fast_clear_;
190
171
 
172
+ static v8::CFunction fast_clear_color_;
191
173
 
192
- if (methodName == "MAX_VIEWPORT_DIMS") { return {0x0D3A}; }
193
- if (methodName == "SUBPIXEL_BITS") { return {0x0D50}; }
174
+ static v8::CFunction fast_viewport_;
194
175
 
195
- if (methodName == "RED_BITS") { return {0x0D52}; }
196
- if (methodName == "GREEN_BITS") { return {0x0D53}; }
197
- if (methodName == "BLUE_BITS") { return {0x0D54}; }
198
- if (methodName == "ALPHA_BITS") { return {0x0D55}; }
176
+ static v8::CFunction fast_enable_;
199
177
 
200
- if (methodName == "STENCIL_BITS") { return {0x0D57}; }
201
- if (methodName == "POLYGON_OFFSET_UNITS") { return {0x2A00}; }
202
- if (methodName == "POLYGON_OFFSET_FACTOR") { return {0x8038}; }
178
+ static v8::CFunction fast_enable_vertex_attrib_array_;
203
179
 
204
- if (methodName == "TEXTURE_BINDING_2D") { return {0x8069}; }
205
- if (methodName == "SAMPLE_BUFFERS") { return {0x80A8}; }
206
- if (methodName == "SAMPLES") { return {0x80A9}; }
207
- if (methodName == "SAMPLE_COVERAGE_VALUE") { return {0x80AA}; }
180
+ static v8::CFunction fast_use_program_;
208
181
 
209
- if (methodName == "SAMPLE_COVERAGE_INVERT") { return {0x80AB}; }
210
- if (methodName == "COMPRESSED_TEXTURE_FORMATS") { return {0x86A3}; }
211
- if (methodName == "VENDOR") { return {0x1F00}; }
212
- if (methodName == "RENDERER") { return {0x1F01}; }
182
+ static v8::CFunction fast_use_program_null_;
213
183
 
214
- if (methodName == "VERSION") { return {0x1F02}; }
215
- if (methodName == "IMPLEMENTATION_COLOR_READ_TYPE") { return {0x8B9A}; }
216
- if (methodName == "IMPLEMENTATION_COLOR_READ_FORMAT") { return {0x8B9B}; }
217
- if (methodName == "BROWSER_DEFAULT_WEBGL") { return {0x9244}; }
184
+ static v8::CFunction fast_draw_arrays_;
218
185
 
219
- if (methodName == "STATIC_DRAW") { return {0x88E4}; }
220
- if (methodName == "STREAM_DRAW") { return {0x88E0}; }
221
- if (methodName == "DYNAMIC_DRAW") { return {0x88E8}; }
222
- if (methodName == "ARRAY_BUFFER") { return {0x8892}; }
186
+ static v8::CFunction fast_uniform_matrix2fv_;
223
187
 
224
- if (methodName == "ELEMENT_ARRAY_BUFFER") { return {0x8893}; }
225
- if (methodName == "BUFFER_SIZE") { return {0x8764}; }
226
- if (methodName == "BUFFER_USAGE") { return {0x8765}; }
227
- if (methodName == "CURRENT_VERTEX_ATTRIB") { return {0x8626}; }
188
+ static v8::CFunction fast_uniform_matrix2fv_array_;
228
189
 
190
+ static v8::CFunction fast_uniform_matrix3fv_;
229
191
 
230
- if (methodName == "VERTEX_ATTRIB_ARRAY_ENABLED") { return {0x8622}; }
231
- if (methodName == "VERTEX_ATTRIB_ARRAY_SIZE") { return {0x8623}; }
232
- if (methodName == "VERTEX_ATTRIB_ARRAY_STRIDE") { return {0x8624}; }
233
- if (methodName == "VERTEX_ATTRIB_ARRAY_TYPE") { return {0x8625}; }
234
- if (methodName == "VERTEX_ATTRIB_ARRAY_NORMALIZED") { return {0x886A}; }
235
- if (methodName == "VERTEX_ATTRIB_ARRAY_POINTER") { return {0x8645}; }
236
- if (methodName == "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING") { return {0x889F}; }
192
+ static v8::CFunction fast_uniform_matrix3fv_array_;
237
193
 
238
- if (methodName == "CULL_FACE") { return {0x0B44}; }
239
- if (methodName == "FRONT") { return {0x0404}; }
240
- if (methodName == "BACK") { return {0x0405}; }
241
- if (methodName == "FRONT_AND_BACK") { return {0x0408}; }
242
-
243
- if (methodName == "BLEND") { return {0x0BE2}; }
244
- if (methodName == "DEPTH_TEST") { return {0x0B71}; }
245
- if (methodName == "DITHER") { return {0x0BD0}; }
246
- if (methodName == "POLYGON_OFFSET_FILL") { return {0x8037}; }
247
-
248
- if (methodName == "SAMPLE_ALPHA_TO_COVERAGE") { return {0x809E}; }
249
- if (methodName == "SAMPLE_COVERAGE") { return {0x80A0}; }
250
- if (methodName == "SCISSOR_TEST") { return {0x0C11}; }
251
- if (methodName == "STENCIL_TEST") { return {0x0B90}; }
252
-
253
-
254
- /* Errors */
255
-
256
- if (methodName == "NO_ERROR") { return {0}; }
257
- if (methodName == "INVALID_ENUM") { return {0x0500}; }
258
- if (methodName == "INVALID_VALUE") { return {0x0501}; }
259
- if (methodName == "INVALID_OPERATION") { return {0x0502}; }
260
-
261
- if (methodName == "OUT_OF_MEMORY") { return {0x0505}; }
262
- if (methodName == "CONTEXT_LOST_WEBGL") { return {0x9242}; }
263
- if (methodName == "CW") { return {0x0900}; }
264
- if (methodName == "CCW") { return {0x0901}; }
265
-
266
- if (methodName == "DONT_CARE") { return {0x1100}; }
267
- if (methodName == "FASTEST") { return {0x1101}; }
268
- if (methodName == "NICEST") { return {0x1102}; }
269
- if (methodName == "GENERATE_MIPMAP_HINT") { return {0x8192}; }
270
-
271
- if (methodName == "BYTE") { return {0x1400}; }
272
- if (methodName == "UNSIGNED_BYTE") { return {0x1401}; }
273
- if (methodName == "SHORT") { return {0x1402}; }
274
- if (methodName == "UNSIGNED_SHORT") { return {0x1403}; }
275
-
276
- if (methodName == "INT") { return {0x1404}; }
277
- if (methodName == "UNSIGNED_INT") { return {0x1405}; }
278
- if (methodName == "FLOAT") { return {0x1406}; }
279
- if (methodName == "DEPTH_COMPONENT") { return {0x1902}; }
280
-
281
- if (methodName == "ALPHA") { return {0x1906}; }
282
- if (methodName == "RGB") { return {0x1907}; }
283
-
284
- /* Clearing buffers */
285
-
286
- if (methodName == "RGBA") { return {0x1908}; }
287
- if (methodName == "LUMINANCE") { return {0x1909}; }
288
- if (methodName == "LUMINANCE_ALPHA") { return {0x190A}; }
289
-
290
- /* Clearing buffers */
291
-
292
- /* Rendering primitives */
293
-
294
- if (methodName == "UNSIGNED_SHORT_4_4_4_4") { return {0x8033}; }
295
- if (methodName == "UNSIGNED_SHORT_5_5_5_1") { return {0x8034}; }
296
- if (methodName == "UNSIGNED_SHORT_5_6_5") { return {0x8363}; }
297
- if (methodName == "FRAGMENT_SHADER") { return {0x8B30}; }
298
- if (methodName == "VERTEX_SHADER") { return {0x8B31}; }
299
- if (methodName == "COMPILE_STATUS") { return {0x8B81}; }
300
- if (methodName == "DELETE_STATUS") { return {0x8B80}; }
301
-
302
- /* Rendering primitives */
303
-
304
- /* Blending modes */
305
-
306
- if (methodName == "LINK_STATUS") { return {0x8B82}; }
307
- if (methodName == "VALIDATE_STATUS") { return {0x8B83}; }
308
- if (methodName == "ATTACHED_SHADERS") { return {0x8B85}; }
309
- if (methodName == "ACTIVE_ATTRIBUTES") { return {0x8B89}; }
310
- if (methodName == "ACTIVE_UNIFORMS") { return {0x8B86}; }
311
- if (methodName == "MAX_VERTEX_ATTRIBS") { return {0x8869}; }
312
- if (methodName == "MAX_VERTEX_UNIFORM_VECTORS") { return {0x8DFB}; }
313
- if (methodName == "MAX_VARYING_VECTORS") { return {0x8DFC}; }
314
- if (methodName == "MAX_COMBINED_TEXTURE_IMAGE_UNITS") { return {0x8B4D}; }
315
- if (methodName == "MAX_VERTEX_TEXTURE_IMAGE_UNITS") { return {0x8B4C}; }
316
- if (methodName == "MAX_TEXTURE_IMAGE_UNITS") { return {0x8872}; }
317
- if (methodName == "MAX_FRAGMENT_UNIFORM_VECTORS") { return {0x8DFD}; }
318
- if (methodName == "SHADER_TYPE") { return {0x8B4F}; }
319
- if (methodName == "SHADING_LANGUAGE_VERSION") { return {0x8B8C}; }
320
- if (methodName == "CURRENT_PROGRAM") { return {0x8B8D}; }
321
-
322
- /* Blending modes */
323
-
324
- if (methodName == "NEVER") { return {0x0200}; }
325
- if (methodName == "LESS") { return {0x0201}; }
326
- if (methodName == "EQUAL") { return {0x0202}; }
327
-
328
- /* Blending equations */
329
-
330
- /* Getting GL parameter information */
331
-
332
- if (methodName == "LEQUAL") { return {0x0203}; }
333
- if (methodName == "GREATER") { return {0x0204}; }
334
- if (methodName == "NOTEQUAL") { return {0x0205}; }
335
- if (methodName == "GEQUAL") { return {0x0206}; }
336
- if (methodName == "ALWAYS") { return {0x0207}; }
337
- if (methodName == "KEEP") { return {0x1E00}; }
338
- if (methodName == "REPLACE") { return {0x1E01}; }
339
- if (methodName == "INCR") { return {0x1E02}; }
340
- if (methodName == "DECR") { return {0x1E03}; }
341
- if (methodName == "INVERT") { return {0x150A}; }
342
- if (methodName == "INCR_WRAP") { return {0x8507}; }
343
- if (methodName == "DECR_WRAP") { return {0x8508}; }
344
- if (methodName == "NEAREST") { return {0x2600}; }
345
- if (methodName == "LINEAR") { return {0x2601}; }
346
- if (methodName == "NEAREST_MIPMAP_NEAREST") { return {0x2700}; }
347
- if (methodName == "LINEAR_MIPMAP_NEAREST") { return {0x2701}; }
348
- if (methodName == "NEAREST_MIPMAP_LINEAR") { return {0x2702}; }
349
- if (methodName == "LINEAR_MIPMAP_LINEAR") { return {0x2703}; }
350
- if (methodName == "TEXTURE_MAG_FILTER") { return {0x2800}; }
351
- if (methodName == "TEXTURE_MIN_FILTER") { return {0x2801}; }
352
- if (methodName == "TEXTURE_WRAP_S") { return {0x2802}; }
353
- if (methodName == "TEXTURE_WRAP_T") { return {0x2803}; }
354
- if (methodName == "TEXTURE_2D") { return {0x0DE1}; }
355
- if (methodName == "TEXTURE") { return {0x1702}; }
356
- if (methodName == "TEXTURE_CUBE_MAP") { return {0x8513}; }
357
- if (methodName == "TEXTURE_BINDING_CUBE_MAP") { return {0x8514}; }
358
- if (methodName == "TEXTURE_CUBE_MAP_POSITIVE_X") { return {0x8515}; }
359
- if (methodName == "TEXTURE_CUBE_MAP_NEGATIVE_X") { return {0x8516}; }
360
- if (methodName == "TEXTURE_CUBE_MAP_POSITIVE_Y") { return {0x8517}; }
361
- if (methodName == "TEXTURE_CUBE_MAP_NEGATIVE_Y") { return {0x8518}; }
362
- if (methodName == "TEXTURE_CUBE_MAP_POSITIVE_Z") { return {0x8519}; }
363
- if (methodName == "TEXTURE_CUBE_MAP_NEGATIVE_Z") { return {0x851A}; }
364
- if (methodName == "MAX_CUBE_MAP_TEXTURE_SIZE") { return {0x851C}; }
365
- if (methodName == "TEXTURE0") { return {0x84C0}; }
366
- if (methodName == "TEXTURE1") { return {0x84C1}; }
367
- if (methodName == "TEXTURE2") { return {0x84C2}; }
368
- if (methodName == "TEXTURE3") { return {0x84C3}; }
369
- if (methodName == "TEXTURE4") { return {0x84C4}; }
370
- if (methodName == "TEXTURE5") { return {0x84C5}; }
371
- if (methodName == "TEXTURE6") { return {0x84C6}; }
372
- if (methodName == "TEXTURE7") { return {0x84C7}; }
373
- if (methodName == "TEXTURE8") { return {0x84C8}; }
374
- if (methodName == "TEXTURE9") { return {0x84C9}; }
375
- if (methodName == "TEXTURE10") { return {0x84CA}; }
376
- if (methodName == "TEXTURE11") { return {0x84CB}; }
377
- if (methodName == "TEXTURE12") { return {0x84CC}; }
378
- if (methodName == "TEXTURE13") { return {0x84CD}; }
379
- if (methodName == "TEXTURE14") { return {0x84CE}; }
380
- if (methodName == "TEXTURE15") { return {0x84CF}; }
381
- if (methodName == "TEXTURE16") { return {0x84D0}; }
382
- if (methodName == "TEXTURE17") { return {0x84D1}; }
383
- if (methodName == "TEXTURE18") { return {0x84D2}; }
384
- if (methodName == "TEXTURE19") { return {0x84D3}; }
385
- if (methodName == "TEXTURE20") { return {0x84D4}; }
386
- if (methodName == "TEXTURE21") { return {0x84D5}; }
387
- if (methodName == "TEXTURE22") { return {0x84D6}; }
388
- if (methodName == "TEXTURE23") { return {0x84D7}; }
389
- if (methodName == "TEXTURE24") { return {0x84D8}; }
390
- if (methodName == "TEXTURE25") { return {0x84D9}; }
391
- if (methodName == "TEXTURE26") { return {0x84DA}; }
392
- if (methodName == "TEXTURE27") { return {0x84DB}; }
393
- if (methodName == "TEXTURE28") { return {0x84DC}; }
394
- if (methodName == "TEXTURE29") { return {0x84DD}; }
395
-
396
- /* Getting GL parameter information */
397
-
398
- /* Buffers */
399
-
400
- if (methodName == "TEXTURE30") { return {0x84DE}; }
401
- if (methodName == "TEXTURE31") { return {0x84DF}; }
402
- if (methodName == "ACTIVE_TEXTURE") { return {0x84E0}; }
403
- if (methodName == "REPEAT") { return {0x2901}; }
404
- if (methodName == "CLAMP_TO_EDGE") { return {0x812F}; }
405
- if (methodName == "MIRRORED_REPEAT") { return {0x8370}; }
406
- if (methodName == "FLOAT_VEC2") { return {0x8B50}; }
407
-
408
- /* Buffers */
409
-
410
- /* Vertex attributes */
411
-
412
- if (methodName == "FLOAT_VEC3") { return {0x8B51}; }
413
- if (methodName == "FLOAT_VEC4") { return {0x8B52}; }
414
- if (methodName == "INT_VEC2") { return {0x8B53}; }
415
- if (methodName == "INT_VEC3") { return {0x8B54}; }
416
- if (methodName == "INT_VEC4") { return {0x8B55}; }
417
- if (methodName == "BOOL") { return {0x8B56}; }
418
- if (methodName == "BOOL_VEC2") { return {0x8B57}; }
419
- if (methodName == "BOOL_VEC3") { return {0x8B58}; }
420
-
421
- /* Vertex attributes */
422
-
423
- /* Culling */
424
-
425
- if (methodName == "BOOL_VEC4") { return {0x8B59}; }
426
- if (methodName == "FLOAT_MAT2") { return {0x8B5A}; }
427
- if (methodName == "FLOAT_MAT3") { return {0x8B5B}; }
428
- if (methodName == "FLOAT_MAT4") { return {0x8B5C}; }
429
-
430
- /* Culling */
431
-
432
- /* Enabling and disabling */
433
-
434
- if (methodName == "SAMPLER_2D") { return {0x8B5E}; }
435
- if (methodName == "SAMPLER_CUBE") { return {0x8B60}; }
436
- if (methodName == "LOW_FLOAT") { return {0x8DF0}; }
437
- if (methodName == "MEDIUM_FLOAT") { return {0x8DF1}; }
438
- if (methodName == "HIGH_FLOAT") { return {0x8DF2}; }
439
- if (methodName == "LOW_INT") { return {0x8DF3}; }
440
- if (methodName == "MEDIUM_INT") { return {0x8DF4}; }
441
- if (methodName == "HIGH_INT") { return {0x8DF5}; }
442
-
443
- /* Enabling and disabling */
444
-
445
- if (methodName == "FRAMEBUFFER") { return {0x8D40}; }
446
- if (methodName == "RENDERBUFFER") { return {0x8D41}; }
447
- if (methodName == "RGBA4") { return {0x8056}; }
448
- if (methodName == "RGB5_A1") { return {0x8057}; }
449
- if (methodName == "RGB565") { return {0x8D62}; }
450
- if (methodName == "DEPTH_COMPONENT16") { return {0x81A5}; }
451
- if (methodName == "STENCIL_INDEX8") { return {0x8D48}; }
452
-
453
- /* Errors */
454
-
455
- /* Front face directions */
456
-
457
- if (methodName == "DEPTH_STENCIL") { return {0x84F9}; }
458
- if (methodName == "RENDERBUFFER_WIDTH") { return {0x8D42}; }
459
-
460
- /* Front face directions */
461
-
462
- /* Hints */
463
-
464
- if (methodName == "RENDERBUFFER_HEIGHT") { return {0x8D43}; }
465
- if (methodName == "RENDERBUFFER_INTERNAL_FORMAT") { return {0x8D44}; }
466
- if (methodName == "RENDERBUFFER_RED_SIZE") { return {0x8D50}; }
467
- if (methodName == "RENDERBUFFER_GREEN_SIZE") { return {0x8D51}; }
468
-
469
- /* Hints */
470
-
471
- /* Data types */
472
-
473
- if (methodName == "RENDERBUFFER_BLUE_SIZE") { return {0x8D52}; }
474
- if (methodName == "RENDERBUFFER_ALPHA_SIZE") { return {0x8D53}; }
475
- if (methodName == "RENDERBUFFER_DEPTH_SIZE") { return {0x8D54}; }
476
- if (methodName == "RENDERBUFFER_STENCIL_SIZE") { return {0x8D55}; }
477
- if (methodName == "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE") { return {0x8CD0}; }
478
- if (methodName == "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME") { return {0x8CD1}; }
479
- if (methodName == "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL") { return {0x8CD2}; }
194
+ static v8::CFunction fast_uniform_matrix4fv_;
480
195
 
481
- /* Data types */
196
+ static v8::CFunction fast_uniform_matrix4fv_array_;
482
197
 
483
- /* Pixel formats */
198
+ static v8::CFunction fast_uniform_1fv_;
484
199
 
485
- if (methodName == "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE") { return {0x8CD3}; }
486
- if (methodName == "COLOR_ATTACHMENT0") { return {0x8CE0}; }
487
- if (methodName == "DEPTH_ATTACHMENT") { return {0x8D00}; }
488
- if (methodName == "STENCIL_ATTACHMENT") { return {0x8D20}; }
489
- if (methodName == "DEPTH_STENCIL_ATTACHMENT") { return {0x821A}; }
490
- if (methodName == "NONE") { return {}; }
200
+ static v8::CFunction fast_uniform_1fv_array_;
491
201
 
492
- /* Pixel formats */
202
+ static v8::CFunction fast_uniform_2fv_;
493
203
 
494
- /* Pixel types */
204
+ static v8::CFunction fast_uniform_2fv_array_;
495
205
 
496
- if (methodName == "FRAMEBUFFER_COMPLETE") { return {0x8CD5}; }
497
- if (methodName == "FRAMEBUFFER_INCOMPLETE_ATTACHMENT") { return {0x8CD6}; }
498
- if (methodName == "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT") { return {0x8CD7}; }
206
+ static v8::CFunction fast_uniform_3fv_;
499
207
 
500
- /* Pixel types */
208
+ static v8::CFunction fast_uniform_3fv_array_;
501
209
 
502
- /* Shaders */
210
+ static v8::CFunction fast_uniform_4fv_;
503
211
 
504
- if (methodName == "FRAMEBUFFER_INCOMPLETE_DIMENSIONS") { return {0x8CD9}; }
505
- if (methodName == "FRAMEBUFFER_UNSUPPORTED") { return {0x8CDD}; }
506
- if (methodName == "FRAMEBUFFER_BINDING") { return {0x8CA6}; }
507
- if (methodName == "RENDERBUFFER_BINDING") { return {0x8CA7}; }
508
- if (methodName == "MAX_RENDERBUFFER_SIZE") { return {0x84E8}; }
509
- if (methodName == "INVALID_FRAMEBUFFER_OPERATION") { return {0x0506}; }
510
- if (methodName == "UNPACK_FLIP_Y_WEBGL") { return {0x9240}; }
511
- if (methodName == "UNPACK_PREMULTIPLY_ALPHA_WEBGL") { return {0x9241}; }
512
- if (methodName == "UNPACK_COLORSPACE_CONVERSION_WEBGL") { return {0x9243}; }
212
+ static v8::CFunction fast_uniform_4fv_array_;
213
+
214
+ static v8::CFunction fast_uniform_1iv_;
215
+
216
+ static v8::CFunction fast_uniform_1iv_array_;
217
+
218
+ static v8::CFunction fast_uniform_2iv_;
219
+
220
+ static v8::CFunction fast_uniform_2iv_array_;
221
+
222
+ static v8::CFunction fast_uniform_3iv_;
223
+
224
+ static v8::CFunction fast_uniform_3iv_array_;
225
+
226
+ static v8::CFunction fast_uniform_4iv_;
227
+
228
+ static v8::CFunction fast_uniform_4iv_array_;
229
+
230
+ static v8::CFunction fast_vertex_attrib_pointer_;
231
+
232
+ static v8::CFunction fast_validate_program_;
233
+
234
+ static v8::CFunction fast_delete_buffer_;
235
+
236
+ static v8::CFunction fast_delete_buffer_framebuffer_;
237
+
238
+ static v8::CFunction fast_delete_program_;
239
+ static v8::CFunction fast_delete_renderbuffer_;
240
+ static v8::CFunction fast_delete_shader_;
241
+ static v8::CFunction fast_delete_texture_;
242
+
243
+ static v8::CFunction fast_disable_;
244
+
245
+ static v8::CFunction fast_compile_shader_;
246
+
247
+ static v8::CFunction fast_framebuffer_texture_2d_;
248
+
249
+
250
+ static v8::CFunction fast_color_mask_;
251
+ static v8::CFunction fast_copy_tex_image_2d_;
252
+ static v8::CFunction fast_copy_tex_sub_image_2d_;
253
+ static v8::CFunction fast_cull_face_;
254
+ static v8::CFunction fast_depth_func_;
255
+ static v8::CFunction fast_depth_mask_;
256
+ static v8::CFunction fast_depth_range_;
257
+ static v8::CFunction fast_detach_shader_;
258
+ static v8::CFunction fast_disable_vertex_attrib_array_;
259
+
260
+ static v8::CFunction fast_finish_;
261
+ static v8::CFunction fast_flush_;
262
+ static v8::CFunction fast_framebuffer_renderbuffer_;
263
+ static v8::CFunction fast_front_face_;
264
+ static v8::CFunction fast_generate_mipmap_;
265
+ static v8::CFunction fast_get_vertex_attrib_offset_;
266
+ static v8::CFunction fast_hint_;
267
+ static v8::CFunction fast_is_buffer_;
268
+ static v8::CFunction fast_is_context_lost_;
269
+ static v8::CFunction fast_is_enabled_;
270
+ static v8::CFunction fast_is_framebuffer_;
271
+ static v8::CFunction fast_is_program_;
272
+ static v8::CFunction fast_is_renderbuffer_;
273
+ static v8::CFunction fast_is_shader_;
274
+ static v8::CFunction fast_is_texture_;
275
+ static v8::CFunction fast_line_width_;
276
+ static v8::CFunction fast_link_program_;
277
+ static v8::CFunction fast_pixel_storei_bool_;
278
+ static v8::CFunction fast_pixel_storei_;
279
+ static v8::CFunction fast_polygon_offset_;
280
+
281
+ static v8::CFunction fast_renderbuffer_storage_;
282
+ static v8::CFunction fast_sample_coverage_;
283
+ static v8::CFunction fast_scissor_;
284
+
285
+
286
+ static v8::CFunction fast_stencil_func_separate_;
287
+ static v8::CFunction fast_stencil_func_;
288
+ static v8::CFunction fast_stencil_mask_separate_;
289
+ static v8::CFunction fast_stencil_mask_;
290
+ static v8::CFunction fast_stencil_op_separate_;
291
+ static v8::CFunction fast_stencil_op_;
292
+
293
+ static v8::CFunction fast_tex_parameterf_;
294
+ static v8::CFunction fast_tex_parameteri_;
295
+
296
+
297
+
298
+ static v8::Local<v8::Object>
299
+ NewInstance(v8::Isolate *isolate, WebGLRenderingContext *renderingContext) {
300
+ auto context = isolate->GetCurrentContext();
301
+ v8::EscapableHandleScope scope(isolate);
302
+ auto object = WebGLRenderingContext::GetCtor(isolate)->GetFunction(
303
+ context).ToLocalChecked()->NewInstance(context).ToLocalChecked();
304
+ SetNativeType(object, NativeType::WebGLRenderingContextBase);
305
+ object->SetAlignedPointerInInternalField(0, renderingContext);
306
+ renderingContext->BindFinalizer(isolate, object);
307
+ return scope.Escape(object);
308
+ }
309
+
310
+ static WebGLRenderingContext *GetPointer(const v8::Local<v8::Object> &object);
311
+
312
+
313
+ static void SetConstants(v8::Isolate *isolate, const v8::Local<v8::ObjectTemplate> &tmpl);
314
+
315
+ static void
316
+ SetProps(v8::Isolate *isolate, const v8::Local<v8::ObjectTemplate> &tmpl);
317
+
318
+ static void SetMethods(v8::Isolate *isolate,
319
+ const v8::Local<v8::ObjectTemplate> &tmpl);
320
+
321
+
322
+ v8::Local<v8::Value> GetParameterInternal(v8::Isolate *isolate, uint32_t pnameValue,
323
+ WebGLResult *result);
324
+
325
+ static void GetDrawingBufferWidth(v8::Local<v8::String> name,
326
+ const v8::PropertyCallbackInfo<v8::Value> &info);
327
+
328
+ static void GetFlipY(v8::Local<v8::String> name,
329
+ const v8::PropertyCallbackInfo<v8::Value> &info);
330
+
331
+ static void GetDrawingBufferHeight(v8::Local<v8::String> name,
332
+ const v8::PropertyCallbackInfo<v8::Value> &info);
333
+
334
+ static void __Resized(const v8::FunctionCallbackInfo<v8::Value> &args);
335
+
336
+ static void __FastResized(v8::Local<v8::Object> receiver_obj) {
337
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
338
+ if (ptr == nullptr) {
339
+ return;
340
+ }
341
+
342
+ canvas_native_webgl_resized(
343
+ ptr->GetState());
344
+
345
+ }
346
+
347
+ static void __StartRaf(const v8::FunctionCallbackInfo<v8::Value> &args);
348
+
349
+ static void __FastStartRaf(v8::Local<v8::Object> receiver_obj) {
350
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
351
+ if (ptr == nullptr) {
352
+ return;
353
+ }
354
+
355
+ ptr->StartRaf();
356
+
357
+ }
358
+
359
+ static void __StopRaf(const v8::FunctionCallbackInfo<v8::Value> &args);
360
+
361
+ static void __FastStopRaf(v8::Local<v8::Object> receiver_obj) {
362
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
363
+ if (ptr == nullptr) {
364
+ return;
365
+ }
366
+
367
+ ptr->StopRaf();
368
+
369
+ }
370
+
371
+ static void ActiveTexture(const v8::FunctionCallbackInfo<v8::Value> &args);
372
+
373
+
374
+ static void FastActiveTexture(v8::Local<v8::Object> receiver_obj, uint32_t texture) {
375
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
376
+ if (ptr == nullptr) {
377
+ return;
378
+ }
379
+ canvas_native_webgl_active_texture(texture,
380
+ ptr->GetState());
381
+ }
382
+
383
+
384
+ static void AttachShader(const v8::FunctionCallbackInfo<v8::Value> &args);
385
+
386
+ static void
387
+ AttachShaderImpl(WebGLRenderingContext *ptr, WebGLProgram *program, WebGLShader *shader) {
388
+ if (program == nullptr || shader == nullptr) {
389
+ return;
390
+ }
391
+
392
+ canvas_native_webgl_attach_shader(
393
+ program->GetProgram(),
394
+ shader->GetShader(),
395
+ ptr->GetState()
396
+ );
397
+ }
398
+
399
+ static void
400
+ FastAttachShader(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> program_obj,
401
+ v8::Local<v8::Object> shader_obj) {
402
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
403
+ if (ptr == nullptr) {
404
+ return;
405
+ }
406
+
407
+ auto programType = GetNativeType(program_obj);
408
+ auto shaderType = GetNativeType(shader_obj);
409
+
410
+ WebGLProgram *program = nullptr;
411
+ WebGLShader *shader = nullptr;
412
+ if (programType == NativeType::WebGLProgram) {
413
+ program = WebGLProgram::GetPointer(program_obj);
414
+ }
415
+
416
+ if (shaderType == NativeType::WebGLShader) {
417
+ shader = WebGLShader::GetPointer(shader_obj);
418
+ }
419
+
420
+ AttachShaderImpl(
421
+ ptr,
422
+ program,
423
+ shader
424
+ );
425
+ }
426
+
427
+ static void BindAttribLocation(const v8::FunctionCallbackInfo<v8::Value> &args);
428
+
429
+
430
+ // todo with fast string
431
+ /*
432
+ static void FastBindAttribLocation(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> program_obj, uint32_t index) {
433
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
434
+ if (ptr == nullptr) {
435
+ return;
436
+ }
437
+
438
+
439
+ auto type = GetNativeType(program_obj);
440
+ if (type == NativeType::WebGLProgram) {
441
+ auto program = WebGLProgram::GetPointer(program_obj);
442
+
443
+ auto name = ConvertFromV8String(isolate, args[2]);
444
+ canvas_native_webgl_bind_attrib_location(
445
+ program->GetProgram(),
446
+ index,
447
+ name.c_str(),
448
+ ptr->GetState()
449
+ );
450
+
451
+ }
452
+ }
453
+ */
454
+ static void BindBuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
455
+
456
+ static void FastBindBuffer(v8::Local<v8::Object> receiver_obj, uint32_t target,
457
+ v8::Local<v8::Object> buffer_obj) {
458
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
459
+ if (ptr == nullptr) {
460
+ return;
461
+ }
462
+
463
+ auto type = GetNativeType(buffer_obj);
464
+ if (type == NativeType::WebGLBuffer) {
465
+ auto buffer = WebGLBuffer::GetPointer(buffer_obj);
466
+ if (buffer ==
467
+ nullptr) { return; }
468
+ canvas_native_webgl_bind_buffer(
469
+ target,
470
+ buffer->GetBuffer(),
471
+ ptr->GetState()
472
+ );
473
+ }
474
+ }
475
+
476
+ static void
477
+ FastBindBufferNull(v8::Local<v8::Object> receiver_obj, uint32_t target, int32_t buffer_obj) {
478
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
479
+ if (ptr == nullptr) {
480
+ return;
481
+ }
482
+
483
+ canvas_native_webgl_bind_buffer(
484
+ target,
485
+ 0,
486
+ ptr->GetState()
487
+ );
488
+ }
489
+
490
+ static void BindFramebuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
491
+
492
+ static void FastBindFramebuffer(v8::Local<v8::Object> receiver_obj, uint32_t target,
493
+ v8::Local<v8::Object> buffer_obj) {
494
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
495
+ if (ptr == nullptr) {
496
+ return;
497
+ }
498
+
499
+ auto type = GetNativeType(buffer_obj);
500
+ if (type == NativeType::WebGLFramebuffer) {
501
+ auto framebuffer = WebGLFramebuffer::GetPointer(buffer_obj);
502
+ canvas_native_webgl_bind_frame_buffer(
503
+ target,
504
+ framebuffer->GetFrameBuffer(),
505
+ ptr->GetState()
506
+ );
507
+ }
508
+ }
509
+
510
+ static void FastBindFramebufferNull(v8::Local<v8::Object> receiver_obj, uint32_t target,
511
+ int32_t buffer_obj) {
512
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
513
+ if (ptr == nullptr) {
514
+ return;
515
+ }
516
+
517
+ // null value
518
+ // unbind
519
+ canvas_native_webgl_bind_frame_buffer(
520
+ target,
521
+ 0,
522
+ ptr->GetState()
523
+ );
524
+ }
525
+
526
+ static void BindRenderbuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
527
+
528
+
529
+ static void FastBindRenderbuffer(v8::Local<v8::Object> receiver_obj, uint32_t target,
530
+ v8::Local<v8::Object> buffer_obj) {
531
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
532
+ if (ptr == nullptr) {
533
+ return;
534
+ }
535
+
536
+
537
+ auto type = GetNativeType(buffer_obj);
538
+ if (type == NativeType::WebGLRenderbuffer) {
539
+ auto renderbuffer = WebGLRenderbuffer::GetPointer(buffer_obj);
540
+
541
+ if (renderbuffer ==
542
+ nullptr) { return; }
543
+ canvas_native_webgl_bind_render_buffer(
544
+ target,
545
+ renderbuffer->GetRenderBuffer(),
546
+ ptr->GetState()
547
+ );
548
+ }
549
+ }
550
+
551
+ static void FastBindRenderbufferNull(v8::Local<v8::Object> receiver_obj, uint32_t target,
552
+ int32_t buffer_obj) {
553
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
554
+ if (ptr == nullptr) {
555
+ return;
556
+ }
557
+
558
+ canvas_native_webgl_bind_render_buffer(
559
+ target,
560
+ 0,
561
+ ptr->GetState()
562
+ );
563
+ }
564
+
565
+ static void BindTexture(const v8::FunctionCallbackInfo<v8::Value> &args);
566
+
567
+ static void FastBindTexture(v8::Local<v8::Object> receiver_obj, uint32_t target,
568
+ v8::Local<v8::Object> texture_obj) {
569
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
570
+ if (ptr == nullptr) {
571
+ return;
572
+ }
573
+
574
+ auto type = GetNativeType(texture_obj);
575
+ if (type == NativeType::WebGLTexture) {
576
+ auto texture = WebGLTexture::GetPointer(texture_obj);
577
+ canvas_native_webgl_bind_texture(
578
+ target,
579
+ texture->GetTexture(),
580
+ ptr->GetState()
581
+ );
582
+ }
583
+ }
584
+
585
+ static void FastBindTextureNull(v8::Local<v8::Object> receiver_obj, uint32_t target,
586
+ int32_t texture_obj) {
587
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
588
+ if (ptr == nullptr) {
589
+ return;
590
+ }
591
+
592
+ canvas_native_webgl_bind_texture(
593
+ target,
594
+ 0,
595
+ ptr->GetState()
596
+ );
597
+ }
598
+
599
+ static void BlendColor(const v8::FunctionCallbackInfo<v8::Value> &args);
600
+
601
+ static void
602
+ FastBlendColor(v8::Local<v8::Object> receiver_obj, double red, double green, double blue,
603
+ double alpha) {
604
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
605
+ if (ptr == nullptr) {
606
+ return;
607
+ }
608
+
609
+ canvas_native_webgl_blend_color(
610
+ static_cast<float>(red),
611
+ static_cast<float>(green),
612
+ static_cast<float>(blue),
613
+ static_cast<float>(alpha),
614
+ ptr->GetState()
615
+ );
616
+ }
617
+
618
+ static void BlendEquationSeparate(const v8::FunctionCallbackInfo<v8::Value> &args);
619
+
620
+ static void FastBlendEquationSeparate(v8::Local<v8::Object> receiver_obj, uint32_t modeRGB,
621
+ uint32_t modeAlpha) {
622
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
623
+ if (ptr == nullptr) {
624
+ return;
625
+ }
626
+
627
+ canvas_native_webgl_blend_equation_separate(
628
+ modeRGB,
629
+ modeAlpha,
630
+ ptr->GetState()
631
+ );
632
+ }
633
+
634
+ static void BlendEquation(const v8::FunctionCallbackInfo<v8::Value> &args);
635
+
636
+ static void FastBlendEquation(v8::Local<v8::Object> receiver_obj, uint32_t mode) {
637
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
638
+ if (ptr == nullptr) {
639
+ return;
640
+ }
641
+ canvas_native_webgl_blend_equation(
642
+ mode,
643
+ ptr->GetState()
644
+ );
645
+ }
646
+
647
+ static void BlendFuncSeparate(const v8::FunctionCallbackInfo<v8::Value> &args);
648
+
649
+ static void
650
+ FastBlendFuncSeparate(v8::Local<v8::Object> receiver_obj, uint32_t srcRGB, uint32_t dstRGB,
651
+ uint32_t srcAlpha, uint32_t dstAlpha) {
652
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
653
+ if (ptr == nullptr) {
654
+ return;
655
+ }
656
+
657
+ canvas_native_webgl_blend_func_separate(
658
+ srcRGB,
659
+ dstRGB,
660
+ srcAlpha,
661
+ dstAlpha,
662
+ ptr->GetState()
663
+ );
664
+ }
665
+
666
+ static void BlendFunc(const v8::FunctionCallbackInfo<v8::Value> &args);
667
+
668
+ static void
669
+ FastBlendFunc(v8::Local<v8::Object> receiver_obj, uint32_t sfactor, uint32_t dfactor) {
670
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
671
+ if (ptr == nullptr) {
672
+ return;
673
+ }
674
+
675
+ canvas_native_webgl_blend_func(
676
+ sfactor,
677
+ dfactor,
678
+ ptr->GetState()
679
+ );
680
+ }
681
+
682
+ static void BufferData(const v8::FunctionCallbackInfo<v8::Value> &args);
683
+
684
+
685
+ static void
686
+ FastBufferDataTargetUsage(v8::Local<v8::Object> receiver_obj, uint32_t target, uint32_t usage) {
687
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
688
+ if (ptr == nullptr) {
689
+ return;
690
+ }
691
+
692
+ canvas_native_webgl_buffer_data_none(
693
+ target,
694
+ 0,
695
+ usage,
696
+ ptr->GetState()
697
+ );
698
+ }
699
+
700
+ /*
701
+ *
702
+ static void FastBufferDataU8(v8::Local<v8::Object> receiver_obj, uint32_t target,
703
+ const v8::FastApiArrayBufferView &srcData, uint32_t usage) {
704
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
705
+ if (ptr == nullptr) {
706
+ return;
707
+ }
708
+
709
+
710
+ canvas_native_webgl_buffer_data(
711
+ target,
712
+ (uint8_t *) srcData.data, srcData.byte_length,
713
+ usage,
714
+ ptr->GetState()
715
+ );
716
+ }
717
+
718
+
719
+ static void FastBufferDataI8(v8::Local<v8::Object> receiver_obj, uint32_t target,
720
+ const v8::FastApiArrayBufferView &srcData, uint32_t usage) {
721
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
722
+ if (ptr == nullptr) {
723
+ return;
724
+ }
725
+
726
+ canvas_native_webgl_buffer_data_i8(
727
+ target,
728
+ (int8_t *)srcData.data, srcData.byte_length,
729
+ usage,
730
+ ptr->GetState()
731
+ );
732
+ }
733
+
734
+ static void FastBufferDataU16(v8::Local<v8::Object> receiver_obj, uint32_t target,
735
+ const v8::FastApiArrayBufferView &srcData, uint32_t usage) {
736
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
737
+ if (ptr == nullptr) {
738
+ return;
739
+ }
740
+
741
+ canvas_native_webgl_buffer_data_u16(
742
+ target,
743
+ (uint16_t *)srcData.data, srcData.byte_length / sizeof(uint16_t),
744
+ usage,
745
+ ptr->GetState()
746
+ );
747
+ }
748
+
749
+ static void FastBufferDataI16(v8::Local<v8::Object> receiver_obj, uint32_t target,
750
+ const v8::FastApiArrayBufferView &srcData, uint32_t usage) {
751
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
752
+ if (ptr == nullptr) {
753
+ return;
754
+ }
755
+
756
+
757
+ canvas_native_webgl_buffer_data_i16(
758
+ target,
759
+ (int16_t *)srcData.data, srcData.byte_length / sizeof(int16_t),
760
+ usage,
761
+ ptr->GetState()
762
+ );
763
+ }
764
+
765
+ */
766
+
767
+ static void FastBufferDataF32(v8::Local<v8::Object> receiver_obj, uint32_t target,
768
+ const v8::FastApiTypedArray<float> &srcData, uint32_t usage) {
769
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
770
+ if (ptr == nullptr) {
771
+ return;
772
+ }
773
+
774
+ auto size = srcData.length();
775
+ float *data;
776
+ srcData.getStorageIfAligned(&data);
777
+
778
+
779
+ canvas_native_webgl_buffer_data_f32(
780
+ target,
781
+ data, size,
782
+ usage,
783
+ ptr->GetState()
784
+ );
785
+ }
786
+
787
+ static void FastBufferDataF64(v8::Local<v8::Object> receiver_obj, uint32_t target,
788
+ const v8::FastApiTypedArray<double> &srcData, uint32_t usage) {
789
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
790
+ if (ptr == nullptr) {
791
+ return;
792
+ }
793
+
794
+ auto size = srcData.length();
795
+ double *data;
796
+ srcData.getStorageIfAligned(&data);
797
+
798
+
799
+ canvas_native_webgl_buffer_data_f64(
800
+ target,
801
+ data, size,
802
+ usage,
803
+ ptr->GetState()
804
+ );
805
+ }
806
+
807
+ static void FastBufferDataU32(v8::Local<v8::Object> receiver_obj, uint32_t target,
808
+ const v8::FastApiTypedArray<uint32_t> &srcData, uint32_t usage) {
809
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
810
+ if (ptr == nullptr) {
811
+ return;
812
+ }
813
+
814
+ auto size = srcData.length();
815
+ uint32_t *data;
816
+ srcData.getStorageIfAligned(&data);
817
+
818
+
819
+ canvas_native_webgl_buffer_data_u32(
820
+ target,
821
+ data, size,
822
+ usage,
823
+ ptr->GetState()
824
+ );
825
+ }
826
+
827
+ static void FastBufferDataI32(v8::Local<v8::Object> receiver_obj, uint32_t target,
828
+ const v8::FastApiTypedArray<int32_t> &srcData, uint32_t usage) {
829
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
830
+ if (ptr == nullptr) {
831
+ return;
832
+ }
833
+
834
+ auto size = srcData.length();
835
+ int32_t *data;
836
+ srcData.getStorageIfAligned(&data);
837
+
838
+
839
+ canvas_native_webgl_buffer_data_i32(
840
+ target,
841
+ data, size,
842
+ usage,
843
+ ptr->GetState()
844
+ );
845
+ }
846
+
847
+ static void FastBufferDataArrayBuffer(v8::Local<v8::Object> receiver_obj, uint32_t target,
848
+ const v8::FastApiArrayBuffer &srcData, uint32_t usage) {
849
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
850
+ if (ptr == nullptr) {
851
+ return;
852
+ }
853
+
854
+
855
+ canvas_native_webgl_buffer_data(
856
+ target,
857
+ (uint8_t *) srcData.data, srcData.byte_length,
858
+ usage,
859
+ ptr->GetState()
860
+ );
861
+ }
862
+
863
+ static void
864
+ FastBufferDataOS(v8::Local<v8::Object> receiver_obj, uint32_t target, uint32_t offset,
865
+ uint32_t usage) {
866
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
867
+ if (ptr == nullptr) {
868
+ return;
869
+ }
870
+
871
+
872
+ canvas_native_webgl_buffer_data_none(
873
+ target,
874
+ static_cast<ssize_t>(offset),
875
+ usage,
876
+ ptr->GetState()
877
+ );
878
+ }
879
+
880
+ static void BufferSubData(const v8::FunctionCallbackInfo<v8::Value> &args);
881
+
882
+ static void FastBufferSubDataTargetOffset(v8::Local<v8::Object> receiver_obj, uint32_t target,
883
+ int32_t offset) {
884
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
885
+ if (ptr == nullptr) {
886
+ return;
887
+ }
888
+
889
+ canvas_native_webgl_buffer_sub_data_none(
890
+ target,
891
+ static_cast<ssize_t>(offset),
892
+ ptr->GetState()
893
+ );
894
+ }
895
+
896
+ /*
897
+ static void
898
+ FastBufferSubDataU8(v8::Local<v8::Object> receiver_obj, uint32_t target, int32_t offset,
899
+ const v8::FastApiArrayBufferView &srcData) {
900
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
901
+ if (ptr == nullptr) {
902
+ return;
903
+ }
904
+
905
+
906
+ canvas_native_webgl_buffer_sub_data(
907
+ target,
908
+ static_cast<ssize_t>(offset),
909
+ (uint8_t *) srcData.data, srcData.byte_length,
910
+ ptr->GetState()
911
+ );
912
+ }
913
+
914
+
915
+ static void
916
+ FastBufferSubDataI8(v8::Local<v8::Object> receiver_obj, uint32_t target, int32_t offset,
917
+ const v8::FastApiArrayBufferView &srcData) {
918
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
919
+ if (ptr == nullptr) {
920
+ return;
921
+ }
922
+
923
+ auto size = srcData.length();
924
+ int8_t *data;
925
+ srcData.getStorageIfAligned(&data);
926
+
927
+
928
+ canvas_native_webgl_buffer_sub_data_i8(
929
+ target,
930
+ static_cast<ssize_t>(offset),
931
+ data, size,
932
+ ptr->GetState()
933
+ );
934
+ }
935
+
936
+
937
+ static void
938
+ FastBufferSubDataU16(v8::Local<v8::Object> receiver_obj, uint32_t target, int32_t offset,
939
+ const v8::FastApiArrayBufferView &srcData) {
940
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
941
+ if (ptr == nullptr) {
942
+ return;
943
+ }
944
+
945
+ auto size = srcData.length();
946
+ uint16_t *data;
947
+ srcData.getStorageIfAligned(&data);
948
+
949
+
950
+ canvas_native_webgl_buffer_sub_data_u16(
951
+ target,
952
+ static_cast<ssize_t>(offset),
953
+ data, size,
954
+ ptr->GetState()
955
+ );
956
+ }
957
+
958
+
959
+ static void
960
+ FastBufferSubDataI16(v8::Local<v8::Object> receiver_obj, uint32_t target, int32_t offset,
961
+ const v8::FastApiArrayBufferView&srcData) {
962
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
963
+ if (ptr == nullptr) {
964
+ return;
965
+ }
966
+
967
+ auto size = srcData.length();
968
+ int16_t *data;
969
+ srcData.getStorageIfAligned(&data);
970
+
971
+
972
+ canvas_native_webgl_buffer_sub_data_i16(
973
+ target,
974
+ static_cast<ssize_t>(offset),
975
+ data, size,
976
+ ptr->GetState()
977
+ );
978
+ }
979
+
980
+
981
+ */
982
+ static void
983
+ FastBufferSubDataU32(v8::Local<v8::Object> receiver_obj, uint32_t target, int32_t offset,
984
+ const v8::FastApiTypedArray<uint32_t> &srcData) {
985
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
986
+ if (ptr == nullptr) {
987
+ return;
988
+ }
989
+
990
+ auto size = srcData.length();
991
+ uint32_t *data;
992
+ srcData.getStorageIfAligned(&data);
993
+
994
+
995
+ canvas_native_webgl_buffer_sub_data_u32(
996
+ target,
997
+ static_cast<ssize_t>(offset),
998
+ data, size,
999
+ ptr->GetState()
1000
+ );
1001
+ }
1002
+
1003
+
1004
+ static void
1005
+ FastBufferSubDataI32(v8::Local<v8::Object> receiver_obj, uint32_t target, int32_t offset,
1006
+ const v8::FastApiTypedArray<int32_t> &srcData) {
1007
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1008
+ if (ptr == nullptr) {
1009
+ return;
1010
+ }
1011
+
1012
+ auto size = srcData.length();
1013
+ int32_t *data;
1014
+ srcData.getStorageIfAligned(&data);
1015
+
1016
+
1017
+ canvas_native_webgl_buffer_sub_data_i32(
1018
+ target,
1019
+ static_cast<ssize_t>(offset),
1020
+ data, size,
1021
+ ptr->GetState()
1022
+ );
1023
+ }
1024
+
1025
+
1026
+ static void
1027
+ FastBufferSubDataF32(v8::Local<v8::Object> receiver_obj, uint32_t target, int32_t offset,
1028
+ const v8::FastApiTypedArray<float> &srcData) {
1029
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1030
+ if (ptr == nullptr) {
1031
+ return;
1032
+ }
1033
+
1034
+ auto size = srcData.length();
1035
+ float *data;
1036
+ srcData.getStorageIfAligned(&data);
1037
+
1038
+
1039
+ canvas_native_webgl_buffer_sub_data_f32(
1040
+ target,
1041
+ static_cast<ssize_t>(offset),
1042
+ data, size,
1043
+ ptr->GetState()
1044
+ );
1045
+ }
1046
+
1047
+
1048
+ static void
1049
+ FastBufferSubDataF64(v8::Local<v8::Object> receiver_obj, uint32_t target, int32_t offset,
1050
+ const v8::FastApiTypedArray<double> &srcData) {
1051
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1052
+ if (ptr == nullptr) {
1053
+ return;
1054
+ }
1055
+
1056
+ auto size = srcData.length();
1057
+ double *data;
1058
+ srcData.getStorageIfAligned(&data);
1059
+
1060
+
1061
+ canvas_native_webgl_buffer_sub_data_f64(
1062
+ target,
1063
+ static_cast<ssize_t>(offset),
1064
+ data, size,
1065
+ ptr->GetState()
1066
+ );
1067
+ }
1068
+
1069
+
1070
+ static void FastBufferSubDataArrayBuffer(v8::Local<v8::Object> receiver_obj, uint32_t target,
1071
+ int32_t offset,
1072
+ const v8::FastApiArrayBuffer &srcData) {
1073
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1074
+ if (ptr == nullptr) {
1075
+ return;
1076
+ }
1077
+
1078
+ canvas_native_webgl_buffer_sub_data(
1079
+ target,
1080
+ static_cast<intptr_t>(offset),
1081
+ (uint8_t *) srcData.data, srcData.byte_length,
1082
+ ptr->GetState()
1083
+ );
1084
+ }
1085
+
1086
+ static void CheckFramebufferStatus(const v8::FunctionCallbackInfo<v8::Value> &args);
1087
+
1088
+ static uint32_t
1089
+ FastCheckFramebufferStatus(v8::Local<v8::Object> receiver_obj, uint32_t target) {
1090
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1091
+ if (ptr == nullptr) {
1092
+ return 0;
1093
+ }
1094
+
1095
+ return canvas_native_webgl_check_frame_buffer_status(
1096
+ target,
1097
+ ptr->GetState()
1098
+ );
1099
+ }
1100
+
1101
+ static void ClearColor(const v8::FunctionCallbackInfo<v8::Value> &args);
1102
+
1103
+ static void
1104
+ ClearColorImpl(WebGLRenderingContext *ptr, float red, float green, float blue, float alpha) {
1105
+ canvas_native_webgl_clear_color(
1106
+ red, green, blue, alpha,
1107
+ ptr->GetState()
1108
+ );
1109
+ }
1110
+
1111
+ static void
1112
+ FastClearColor(v8::Local<v8::Object> receiver_obj, double red, double green, double blue,
1113
+ double alpha) {
1114
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1115
+ if (ptr == nullptr) {
1116
+ return;
1117
+ }
1118
+ ClearColorImpl(
1119
+ ptr,
1120
+ static_cast<float>(red),
1121
+ static_cast<float>(green),
1122
+ static_cast<float>(blue),
1123
+ static_cast<float>(alpha)
1124
+ );
1125
+ }
1126
+
1127
+ static void ClearDepth(const v8::FunctionCallbackInfo<v8::Value> &args);
1128
+
1129
+ static void FastClearDepth(v8::Local<v8::Object> receiver_obj, double depth) {
1130
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1131
+ if (ptr == nullptr) {
1132
+ return;
1133
+ }
1134
+
1135
+ canvas_native_webgl_clear_depth(
1136
+ static_cast<float>(depth),
1137
+ ptr->GetState()
1138
+ );
1139
+ }
1140
+
1141
+ static void ClearStencil(const v8::FunctionCallbackInfo<v8::Value> &args);
1142
+
1143
+ static void FastClearStencil(v8::Local<v8::Object> receiver_obj, int32_t stencil) {
1144
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1145
+ if (ptr == nullptr) {
1146
+ return;
1147
+ }
1148
+
1149
+ canvas_native_webgl_clear_stencil(
1150
+ stencil,
1151
+ ptr->GetState()
1152
+ );
1153
+ }
1154
+
1155
+ static void Clear(const v8::FunctionCallbackInfo<v8::Value> &args);
1156
+
1157
+ static void ClearImpl(WebGLRenderingContext *ptr, uint32_t mask) {
1158
+
1159
+ canvas_native_webgl_clear(
1160
+ mask,
1161
+ ptr->GetState()
1162
+ );
1163
+
1164
+ ptr->UpdateInvalidateState();
1165
+ }
1166
+
1167
+ static void FastClear(v8::Local<v8::Object> receiver_obj, uint32_t mask) {
1168
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1169
+ if (ptr == nullptr) {
1170
+ return;
1171
+ }
1172
+
1173
+ ClearImpl(
1174
+ ptr,
1175
+ mask
1176
+ );
1177
+ }
1178
+
1179
+ static void ColorMask(const v8::FunctionCallbackInfo<v8::Value> &args);
1180
+
1181
+ static void
1182
+ FastColorMask(v8::Local<v8::Object> receiver_obj, bool red, bool green, bool blue, bool alpha) {
1183
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1184
+ if (ptr == nullptr) {
1185
+ return;
1186
+ }
1187
+
1188
+ canvas_native_webgl_color_mask(
1189
+ red,
1190
+ green,
1191
+ blue,
1192
+ alpha,
1193
+ ptr->GetState()
1194
+ );
1195
+ }
1196
+
1197
+ static void Commit(const v8::FunctionCallbackInfo<v8::Value> &args);
1198
+
1199
+ static void CompileShader(const v8::FunctionCallbackInfo<v8::Value> &args);
1200
+
1201
+ static void
1202
+ FastCompileShader(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> shader_obj) {
1203
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1204
+ if (ptr == nullptr) {
1205
+ return;
1206
+ }
1207
+
1208
+ if (GetNativeType(shader_obj) == NativeType::WebGLShader) {
1209
+ auto shader = WebGLShader::GetPointer(shader_obj);
1210
+ if (shader != nullptr) {
1211
+ canvas_native_webgl_compile_shader(
1212
+ shader->GetShader(),
1213
+ ptr->GetState()
1214
+ );
1215
+ }
1216
+ }
1217
+
1218
+ }
1219
+
1220
+ static void CompressedTexImage2D(const v8::FunctionCallbackInfo<v8::Value> &args);
1221
+
1222
+ static void CompressedTexSubImage2D(const v8::FunctionCallbackInfo<v8::Value> &args);
1223
+
1224
+ static void CopyTexImage2D(const v8::FunctionCallbackInfo<v8::Value> &args);
1225
+
1226
+ static void
1227
+ FastCopyTexImage2D(v8::Local<v8::Object> receiver_obj, uint32_t target, int32_t level,
1228
+ uint32_t internalformat, int32_t x, int32_t y, int32_t width, int32_t height,
1229
+ int32_t border) {
1230
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1231
+ if (ptr == nullptr) {
1232
+ return;
1233
+ }
1234
+
1235
+ canvas_native_webgl_copy_tex_image2d(
1236
+ target,
1237
+ level,
1238
+ internalformat,
1239
+ x,
1240
+ y,
1241
+ width,
1242
+ height,
1243
+ border,
1244
+ ptr->GetState()
1245
+ );
1246
+
1247
+ }
1248
+
1249
+ static void CopyTexSubImage2D(const v8::FunctionCallbackInfo<v8::Value> &args);
1250
+
1251
+ static void
1252
+ FastCopyTexSubImage2D(v8::Local<v8::Object> receiver_obj, uint32_t target, int32_t level,
1253
+ int32_t xoffset, int32_t yoffset, int32_t x, int32_t y, int32_t width,
1254
+ int32_t height) {
1255
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1256
+ if (ptr == nullptr) {
1257
+ return;
1258
+ }
1259
+
1260
+
1261
+ canvas_native_webgl_copy_tex_sub_image2d(
1262
+ target,
1263
+ level,
1264
+ xoffset,
1265
+ yoffset,
1266
+ x,
1267
+ y,
1268
+ width,
1269
+ height,
1270
+ ptr->GetState()
1271
+ );
1272
+
1273
+ }
1274
+
1275
+ static void CreateBuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
1276
+
1277
+ static void CreateFramebuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
1278
+
1279
+ static void CreateProgram(const v8::FunctionCallbackInfo<v8::Value> &args);
1280
+
1281
+ static void CreateRenderbuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
1282
+
1283
+ static void CreateShader(const v8::FunctionCallbackInfo<v8::Value> &args);
1284
+
1285
+ static void CreateTexture(const v8::FunctionCallbackInfo<v8::Value> &args);
1286
+
1287
+ static void CullFace(const v8::FunctionCallbackInfo<v8::Value> &args);
1288
+
1289
+ static void FastCullFace(v8::Local<v8::Object> receiver_obj, uint32_t mode) {
1290
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1291
+ if (ptr == nullptr) {
1292
+ return;
1293
+ }
1294
+
1295
+
1296
+ canvas_native_webgl_cull_face(
1297
+ mode,
1298
+ ptr->GetState()
1299
+ );
1300
+
1301
+ }
1302
+
1303
+ static void DeleteBuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
1304
+
1305
+ static void FastDeleteBuffer(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> value) {
1306
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1307
+ if (ptr == nullptr) {
1308
+ return;
1309
+ }
1310
+
1311
+
1312
+ auto type = GetNativeType(value);
1313
+ if (type == NativeType::WebGLBuffer) {
1314
+ auto buffer = WebGLBuffer::GetPointer(value);
1315
+ if (buffer != nullptr) {
1316
+ canvas_native_webgl_delete_buffer(
1317
+ buffer->GetBuffer(),
1318
+ ptr->GetState()
1319
+ );
1320
+ }
1321
+ }
1322
+
1323
+ }
1324
+
1325
+ static void DeleteFramebuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
1326
+
1327
+ static void
1328
+ FastDeleteFramebuffer(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> value) {
1329
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1330
+ if (ptr == nullptr) {
1331
+ return;
1332
+ }
1333
+
1334
+ auto type = GetNativeType(value);
1335
+ if (type == NativeType::WebGLFramebuffer) {
1336
+ auto buffer = WebGLFramebuffer::GetPointer(value);
1337
+ if (buffer != nullptr) {
1338
+ canvas_native_webgl_delete_framebuffer(
1339
+ buffer->GetFrameBuffer(),
1340
+ ptr->GetState()
1341
+ );
1342
+ }
1343
+ }
1344
+
1345
+ }
1346
+
1347
+ static void DeleteProgram(const v8::FunctionCallbackInfo<v8::Value> &args);
1348
+
1349
+ static void FastDeleteProgram(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> value) {
1350
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1351
+ if (ptr == nullptr) {
1352
+ return;
1353
+ }
1354
+
1355
+ auto type = GetNativeType(value);
1356
+
1357
+ if (type == NativeType::WebGLProgram) {
1358
+ auto program = WebGLProgram::GetPointer(value);
1359
+ if (program != nullptr) {
1360
+ canvas_native_webgl_delete_framebuffer(
1361
+ program->GetProgram(),
1362
+ ptr->GetState()
1363
+ );
1364
+ }
1365
+ }
1366
+
1367
+
1368
+ }
1369
+
1370
+ static void DeleteRenderbuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
1371
+
1372
+ static void
1373
+ FastDeleteRenderbuffer(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> value) {
1374
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1375
+ if (ptr == nullptr) {
1376
+ return;
1377
+ }
1378
+
1379
+
1380
+ auto type = GetNativeType(value);
1381
+
1382
+ if (type == NativeType::WebGLRenderbuffer) {
1383
+ auto buffer = WebGLRenderbuffer::GetPointer(value);
1384
+ if (buffer != nullptr) {
1385
+ canvas_native_webgl_delete_renderbuffer(
1386
+ buffer->GetRenderBuffer(),
1387
+ ptr->GetState()
1388
+ );
1389
+ }
1390
+ }
1391
+
1392
+
1393
+ }
1394
+
1395
+ static void DeleteShader(const v8::FunctionCallbackInfo<v8::Value> &args);
1396
+
1397
+ static void FastDeleteShader(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> value) {
1398
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1399
+ if (ptr == nullptr) {
1400
+ return;
1401
+ }
1402
+
1403
+
1404
+ auto type = GetNativeType(value);
1405
+
1406
+ if (type == NativeType::WebGLShader) {
1407
+ auto shader = WebGLShader::GetPointer(value);
1408
+ if (shader != nullptr) {
1409
+ canvas_native_webgl_delete_shader(
1410
+ shader->GetShader(),
1411
+ ptr->GetState()
1412
+ );
1413
+ }
1414
+ }
1415
+ }
1416
+
1417
+ static void DeleteTexture(const v8::FunctionCallbackInfo<v8::Value> &args);
1418
+
1419
+ static void FastDeleteTexture(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> value) {
1420
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1421
+ if (ptr == nullptr) {
1422
+ return;
1423
+ }
1424
+
1425
+ auto type = GetNativeType(value);
1426
+
1427
+ if (type == NativeType::WebGLTexture) {
1428
+ auto texture = WebGLTexture::GetPointer(value);
1429
+ if (texture != nullptr) {
1430
+ canvas_native_webgl_delete_texture(
1431
+ texture->GetTexture(),
1432
+ ptr->GetState()
1433
+ );
1434
+ }
1435
+ }
1436
+ }
1437
+
1438
+ static void DepthFunc(const v8::FunctionCallbackInfo<v8::Value> &args);
1439
+
1440
+ static void FastDepthFunc(v8::Local<v8::Object> receiver_obj, uint32_t func) {
1441
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1442
+ if (ptr == nullptr) {
1443
+ return;
1444
+ }
1445
+
1446
+ canvas_native_webgl_depth_func(
1447
+ func,
1448
+ ptr->GetState()
1449
+ );
1450
+ }
1451
+
1452
+ static void DepthMask(const v8::FunctionCallbackInfo<v8::Value> &args);
1453
+
1454
+ static void FastDepthMask(v8::Local<v8::Object> receiver_obj, bool mask) {
1455
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1456
+ if (ptr == nullptr) {
1457
+ return;
1458
+ }
1459
+ canvas_native_webgl_depth_mask(
1460
+ mask,
1461
+ ptr->GetState()
1462
+ );
1463
+ }
1464
+
1465
+ static void DepthRange(const v8::FunctionCallbackInfo<v8::Value> &args);
1466
+
1467
+ static void FastDepthRange(v8::Local<v8::Object> receiver_obj, double zNear, double zFar) {
1468
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1469
+ if (ptr == nullptr) {
1470
+ return;
1471
+ }
1472
+
1473
+ canvas_native_webgl_depth_range(
1474
+ static_cast<float>(zNear),
1475
+ static_cast<float>(zFar),
1476
+ ptr->GetState()
1477
+ );
1478
+ }
1479
+
1480
+ static void DetachShader(const v8::FunctionCallbackInfo<v8::Value> &args);
1481
+
1482
+ static void
1483
+ FastDetachShader(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> program_obj,
1484
+ v8::Local<v8::Object> shader_obj) {
1485
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1486
+ if (ptr == nullptr) {
1487
+ return;
1488
+ }
1489
+
1490
+ auto programType = GetNativeType(program_obj);
1491
+ auto shaderType = GetNativeType(shader_obj);
1492
+ WebGLProgram *program = nullptr;
1493
+ WebGLShader *shader = nullptr;
1494
+ if (programType == NativeType::WebGLProgram) {
1495
+ program = WebGLProgram::GetPointer(program_obj);
1496
+ }
1497
+ if (shaderType == NativeType::WebGLShader) {
1498
+ shader = WebGLShader::GetPointer(shader_obj);
1499
+ }
1500
+
1501
+ if (program != nullptr &&
1502
+ shader != nullptr) {
1503
+ canvas_native_webgl_detach_shader(
1504
+ program->GetProgram(),
1505
+ shader->GetShader(),
1506
+ ptr->GetState()
1507
+ );
1508
+ }
1509
+ }
1510
+
1511
+ static void DisableVertexAttribArray(const v8::FunctionCallbackInfo<v8::Value> &args);
1512
+
1513
+ static void FastDisableVertexAttribArray(v8::Local<v8::Object> receiver_obj, uint32_t index) {
1514
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1515
+ if (ptr == nullptr) {
1516
+ return;
1517
+ }
1518
+
1519
+
1520
+ canvas_native_webgl_disable_vertex_attrib_array(
1521
+ index,
1522
+ ptr->GetState()
1523
+ );
1524
+ }
1525
+
1526
+ static void Disable(const v8::FunctionCallbackInfo<v8::Value> &args);
1527
+
1528
+ static void FastDisable(v8::Local<v8::Object> receiver_obj, uint32_t cap) {
1529
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1530
+ if (ptr == nullptr) {
1531
+ return;
1532
+ }
1533
+
1534
+ canvas_native_webgl_disable(
1535
+ cap,
1536
+ ptr->GetState()
1537
+ );
1538
+ }
1539
+
1540
+ static void DrawArrays(const v8::FunctionCallbackInfo<v8::Value> &args);
1541
+
1542
+ static void
1543
+ DrawArraysImpl(WebGLRenderingContext *ptr, uint32_t mode, int32_t first, int32_t count) {
1544
+ canvas_native_webgl_draw_arrays(
1545
+ mode,
1546
+ first,
1547
+ count,
1548
+ ptr->GetState()
1549
+ );
1550
+ ptr->UpdateInvalidateState();
1551
+ }
1552
+
1553
+ static void FastDrawArrays(v8::Local<v8::Object> receiver_obj, uint32_t mode, int32_t first,
1554
+ int32_t count) {
1555
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1556
+ if (ptr == nullptr) {
1557
+ return;
1558
+ }
1559
+
1560
+
1561
+ DrawArraysImpl(
1562
+ ptr,
1563
+ mode,
1564
+ first,
1565
+ count
1566
+ );
1567
+ }
1568
+
1569
+ static void DrawElements(const v8::FunctionCallbackInfo<v8::Value> &args);
1570
+
1571
+
1572
+ static void
1573
+ FastDrawElements(v8::Local<v8::Object> receiver_obj, uint32_t mode, int32_t count, int32_t type,
1574
+ int32_t offset) {
1575
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1576
+ if (ptr == nullptr) {
1577
+ return;
1578
+ }
1579
+
1580
+
1581
+ canvas_native_webgl_draw_elements(
1582
+ mode,
1583
+ count,
1584
+ type,
1585
+ static_cast<ssize_t>(offset),
1586
+ ptr->GetState()
1587
+ );
1588
+ ptr->UpdateInvalidateState();
1589
+ }
1590
+
1591
+ static void EnableVertexAttribArray(const v8::FunctionCallbackInfo<v8::Value> &args);
1592
+
1593
+ static void FastEnableVertexAttribArray(v8::Local<v8::Object> receiver_obj, uint32_t index) {
1594
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1595
+ if (ptr == nullptr) {
1596
+ return;
1597
+ }
1598
+
1599
+
1600
+ canvas_native_webgl_enable_vertex_attrib_array(
1601
+ index,
1602
+ ptr->GetState()
1603
+ );
1604
+ }
1605
+
1606
+ static void Enable(const v8::FunctionCallbackInfo<v8::Value> &args);
1607
+
1608
+ static void
1609
+ EnableImpl(WebGLRenderingContext *ptr, uint32_t cap) {
1610
+ canvas_native_webgl_enable(cap, ptr->GetState()
1611
+ );
1612
+ }
1613
+
1614
+ static void FastEnable(v8::Local<v8::Object> receiver_obj, uint32_t cap) {
1615
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1616
+ if (ptr == nullptr) {
1617
+ return;
1618
+ }
1619
+
1620
+ EnableImpl(
1621
+ ptr,
1622
+ cap
1623
+ );
1624
+ }
1625
+
1626
+ static void Finish(const v8::FunctionCallbackInfo<v8::Value> &args);
1627
+
1628
+ static void FastFinish(v8::Local<v8::Object> receiver_obj) {
1629
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1630
+ if (ptr == nullptr) {
1631
+ return;
1632
+ }
1633
+
1634
+ canvas_native_webgl_finish(
1635
+ ptr->GetState()
1636
+ );
1637
+ }
1638
+
1639
+ static void FastFlush(v8::Local<v8::Object> receiver_obj) {
1640
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1641
+ if (ptr == nullptr) {
1642
+ return;
1643
+ }
1644
+
1645
+ canvas_native_webgl_flush(
1646
+ ptr->GetState()
1647
+ );
1648
+ }
1649
+
1650
+ static void Flush(const v8::FunctionCallbackInfo<v8::Value> &args);
1651
+
1652
+ static void FramebufferRenderbuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
1653
+
1654
+ static void FastFramebufferRenderbuffer(v8::Local<v8::Object> receiver_obj, uint32_t target,
1655
+ uint32_t attachment,
1656
+ uint32_t renderbuffertarget,
1657
+ v8::Local<v8::Object> renderbuffer_obj) {
1658
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1659
+ if (ptr == nullptr) {
1660
+ return;
1661
+ }
1662
+
1663
+
1664
+ auto type = GetNativeType(renderbuffer_obj);
1665
+ if (type == NativeType::WebGLRenderbuffer) {
1666
+ auto renderbuffer = WebGLRenderbuffer::GetPointer(renderbuffer_obj);
1667
+ if (renderbuffer != nullptr) {
1668
+ canvas_native_webgl_framebuffer_renderbuffer(
1669
+ target,
1670
+ attachment,
1671
+ renderbuffertarget,
1672
+ renderbuffer->GetRenderBuffer(),
1673
+ ptr->GetState()
1674
+ );
1675
+ }
1676
+ }
1677
+ }
1678
+
1679
+ static void FramebufferTexture2D(const v8::FunctionCallbackInfo<v8::Value> &args);
1680
+
1681
+ static void FastFramebufferTexture2D(v8::Local<v8::Object> receiver_obj, uint32_t target,
1682
+ uint32_t attachment, uint32_t textarget, int32_t level,
1683
+ v8::Local<v8::Object> texture_obj) {
1684
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1685
+ if (ptr == nullptr) {
1686
+ return;
1687
+ }
1688
+
1689
+ auto type = GetNativeType(texture_obj);
1690
+ if (type == NativeType::WebGLTexture) {
1691
+ auto texture = WebGLTexture::GetPointer(texture_obj);
1692
+ if (texture != nullptr) {
1693
+ canvas_native_webgl_framebuffer_texture2d(
1694
+ target,
1695
+ attachment,
1696
+ textarget,
1697
+ texture->GetTexture(),
1698
+ level,
1699
+ ptr->GetState()
1700
+ );
1701
+ }
1702
+ }
1703
+ }
1704
+
1705
+ static void FrontFace(const v8::FunctionCallbackInfo<v8::Value> &args);
1706
+
1707
+ static void FastFrontFace(v8::Local<v8::Object> receiver_obj, uint32_t mode) {
1708
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1709
+ if (ptr == nullptr) {
1710
+ return;
1711
+ }
1712
+
1713
+ canvas_native_webgl_front_face(
1714
+ mode,
1715
+ ptr->GetState()
1716
+ );
1717
+ }
1718
+
1719
+ static void GenerateMipmap(const v8::FunctionCallbackInfo<v8::Value> &args);
1720
+
1721
+ static void FastGenerateMipmap(v8::Local<v8::Object> receiver_obj, uint32_t target) {
1722
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1723
+ if (ptr == nullptr) {
1724
+ return;
1725
+ }
1726
+
1727
+ canvas_native_webgl_generate_mipmap(
1728
+ target,
1729
+ ptr->GetState()
1730
+ );
1731
+ }
1732
+
1733
+ static void GetActiveAttrib(const v8::FunctionCallbackInfo<v8::Value> &args);
1734
+
1735
+ static void GetActiveUniform(const v8::FunctionCallbackInfo<v8::Value> &args);
1736
+
1737
+ static void GetAttachedShaders(const v8::FunctionCallbackInfo<v8::Value> &args);
1738
+
1739
+ static void GetAttribLocation(const v8::FunctionCallbackInfo<v8::Value> &args);
1740
+
1741
+ static void GetBufferParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
1742
+
1743
+ static uint32_t
1744
+ FastGetBufferParameter(v8::Local<v8::Object> receiver_obj, uint32_t target, uint32_t pname) {
1745
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1746
+ if (ptr == nullptr) {
1747
+ return -1;
1748
+ }
1749
+
1750
+
1751
+ return canvas_native_webgl_get_buffer_parameter(
1752
+ target,
1753
+ pname,
1754
+ ptr->GetState()
1755
+ );
1756
+
1757
+ }
1758
+
1759
+ static void GetContextAttributes(const v8::FunctionCallbackInfo<v8::Value> &args);
1760
+
1761
+ static void GetError(const v8::FunctionCallbackInfo<v8::Value> &args);
1762
+
1763
+ static void GetExtension(const v8::FunctionCallbackInfo<v8::Value> &args);
1764
+
1765
+ static void GetFramebufferAttachmentParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
1766
+
1767
+ static void GetParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
1768
+
1769
+ static void GetProgramInfoLog(const v8::FunctionCallbackInfo<v8::Value> &args);
1770
+
1771
+ static void GetProgramParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
1772
+
1773
+ static void GetRenderbufferParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
1774
+
1775
+ static void GetShaderInfoLog(const v8::FunctionCallbackInfo<v8::Value> &args);
1776
+
1777
+ static void GetShaderParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
1778
+
1779
+ static void GetShaderPrecisionFormat(const v8::FunctionCallbackInfo<v8::Value> &args);
1780
+
1781
+ static void GetShaderSource(const v8::FunctionCallbackInfo<v8::Value> &args);
1782
+
1783
+ static void GetSupportedExtensions(const v8::FunctionCallbackInfo<v8::Value> &args);
1784
+
1785
+ static void GetTexParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
1786
+
1787
+ static void GetUniformLocation(const v8::FunctionCallbackInfo<v8::Value> &args);
1788
+
1789
+ static void GetUniform(const v8::FunctionCallbackInfo<v8::Value> &args);
1790
+
1791
+ static void GetVertexAttribOffset(const v8::FunctionCallbackInfo<v8::Value> &args);
1792
+
1793
+ static int32_t
1794
+ FastGetVertexAttribOffset(v8::Local<v8::Object> receiver_obj, uint32_t index, uint32_t pname) {
1795
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1796
+ if (ptr == nullptr) {
1797
+ return 0;
1798
+ }
1799
+
1800
+
1801
+ return canvas_native_webgl_get_vertex_attrib_offset(
1802
+ index,
1803
+ pname,
1804
+ ptr->GetState());
1805
+ }
1806
+
1807
+ static void GetVertexAttrib(const v8::FunctionCallbackInfo<v8::Value> &args);
1808
+
1809
+ static void Hint(const v8::FunctionCallbackInfo<v8::Value> &args);
1810
+
1811
+ static void FastHint(v8::Local<v8::Object> receiver_obj, uint32_t target, uint32_t mode) {
1812
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1813
+ if (ptr == nullptr) {
1814
+ return;
1815
+ }
1816
+
1817
+ canvas_native_webgl_hint(target,
1818
+ mode,
1819
+ ptr->GetState());
1820
+ }
1821
+
1822
+ static void IsBuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
1823
+
1824
+ static bool FastIsBuffer(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> value) {
1825
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1826
+ if (ptr == nullptr) {
1827
+ return false;
1828
+ }
1829
+
1830
+ auto type = GetNativeType(value);
1831
+ if (type == NativeType::WebGLBuffer) {
1832
+ auto buffer = WebGLBuffer::GetPointer(value);
1833
+ if (buffer != nullptr) {
1834
+ auto ret = canvas_native_webgl_is_buffer(
1835
+ buffer->GetBuffer(),
1836
+ ptr->GetState());
1837
+ return ret;
1838
+ }
1839
+ }
1840
+
1841
+ return false;
1842
+ }
1843
+
1844
+ static void IsContextLost(const v8::FunctionCallbackInfo<v8::Value> &args);
1845
+
1846
+ static bool FastIsContextLost(v8::Local<v8::Object> receiver_obj) {
1847
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1848
+ if (ptr == nullptr) {
1849
+ return false;
1850
+ }
1851
+
1852
+
1853
+ auto ret = canvas_native_webgl_get_is_context_lost(
1854
+ ptr->GetState());
1855
+
1856
+ return ret;
1857
+ }
1858
+
1859
+ static void IsEnabled(const v8::FunctionCallbackInfo<v8::Value> &args);
1860
+
1861
+ static bool FastIsEnabled(v8::Local<v8::Object> receiver_obj, uint32_t cap) {
1862
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1863
+ if (ptr == nullptr) {
1864
+ return false;
1865
+ }
1866
+
1867
+ return canvas_native_webgl_is_enabled(
1868
+ cap, ptr->GetState());
1869
+ }
1870
+
1871
+ static void IsFramebuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
1872
+
1873
+ static bool FastIsFramebuffer(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> value) {
1874
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1875
+ if (ptr == nullptr) {
1876
+ return false;
1877
+ }
1878
+
1879
+ auto type = GetNativeType(value);
1880
+ if (type == NativeType::WebGLFramebuffer) {
1881
+ auto framebuffer = WebGLFramebuffer::GetPointer(value);
1882
+ if (framebuffer != nullptr) {
1883
+ auto ret = canvas_native_webgl_is_framebuffer(
1884
+ framebuffer->GetFrameBuffer(),
1885
+ ptr->GetState());
1886
+ return ret;
1887
+ }
1888
+ }
1889
+
1890
+ return false;
1891
+ }
1892
+
1893
+ static void IsProgram(const v8::FunctionCallbackInfo<v8::Value> &args);
1894
+
1895
+ static bool FastIsProgram(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> value) {
1896
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1897
+ if (ptr == nullptr) {
1898
+ return false;
1899
+ }
1900
+
1901
+ auto type = GetNativeType(value);
1902
+ if (type == NativeType::WebGLProgram) {
1903
+ auto program = WebGLProgram::GetPointer(value);
1904
+ if (program != nullptr) {
1905
+ auto ret = canvas_native_webgl_is_program(
1906
+ program->GetProgram(),
1907
+ ptr->GetState());
1908
+
1909
+ return ret;
1910
+ }
1911
+ }
1912
+
1913
+ return false;
1914
+ }
1915
+
1916
+ static void IsRenderbuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
1917
+
1918
+ static bool
1919
+ FastIsRenderbuffer(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> value) {
1920
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1921
+ if (ptr == nullptr) {
1922
+ return false;
1923
+ }
1924
+
1925
+
1926
+ auto type = GetNativeType(value);
1927
+ if (type == NativeType::WebGLRenderbuffer) {
1928
+ auto renderbuffer = WebGLRenderbuffer::GetPointer(value);
1929
+ if (renderbuffer != nullptr) {
1930
+ auto ret = canvas_native_webgl_is_renderbuffer(
1931
+ renderbuffer->GetRenderBuffer(),
1932
+ ptr->GetState());
1933
+
1934
+ return ret;
1935
+ }
1936
+ }
1937
+
1938
+ return false;
1939
+ }
1940
+
1941
+ static void IsShader(const v8::FunctionCallbackInfo<v8::Value> &args);
1942
+
1943
+ static bool FastIsShader(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> value) {
1944
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1945
+ if (ptr == nullptr) {
1946
+ return false;
1947
+ }
1948
+
1949
+ auto type = GetNativeType(value);
1950
+ if (type == NativeType::WebGLShader) {
1951
+ auto shader = WebGLShader::GetPointer(value);
1952
+ if (shader != nullptr) {
1953
+ auto ret = canvas_native_webgl_is_shader(
1954
+ shader->GetShader(),
1955
+ ptr->GetState());
1956
+
1957
+ return ret;
1958
+ }
1959
+ }
1960
+
1961
+ return false;
1962
+ }
1963
+
1964
+ static void IsTexture(const v8::FunctionCallbackInfo<v8::Value> &args);
1965
+
1966
+ static bool FastIsTexture(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> value) {
1967
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1968
+ if (ptr == nullptr) {
1969
+ return false;
1970
+ }
1971
+
1972
+
1973
+ auto type = GetNativeType(value);
1974
+ if (type == NativeType::WebGLTexture) {
1975
+ auto texture = WebGLTexture::GetPointer(value);
1976
+ if (texture != nullptr) {
1977
+ auto ret = canvas_native_webgl_is_texture(
1978
+ texture->GetTexture(),
1979
+ ptr->GetState());
1980
+ return ret;
1981
+ }
1982
+ }
1983
+
1984
+ return false;
1985
+ }
1986
+
1987
+ static void LineWidth(const v8::FunctionCallbackInfo<v8::Value> &args);
1988
+
1989
+ static void FastLineWidth(v8::Local<v8::Object> receiver_obj, double width) {
1990
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1991
+ if (ptr == nullptr) {
1992
+ return;
1993
+ }
1994
+
1995
+ canvas_native_webgl_line_width(
1996
+ static_cast<float>(width),
1997
+ ptr->GetState());
1998
+
1999
+ }
2000
+
2001
+ static void LinkProgram(const v8::FunctionCallbackInfo<v8::Value> &args);
2002
+
2003
+ static void FastLinkProgram(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> value) {
2004
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2005
+ if (ptr == nullptr) {
2006
+ return;
2007
+ }
2008
+
2009
+ auto type = GetNativeType(value);
2010
+ if (type == NativeType::WebGLProgram) {
2011
+ auto program = WebGLProgram::GetPointer(value);
2012
+ if (program != nullptr) {
2013
+ canvas_native_webgl_link_program(
2014
+ program->GetProgram(),
2015
+ ptr->GetState());
2016
+ }
2017
+ }
2018
+ }
2019
+
2020
+ static void PixelStorei(const v8::FunctionCallbackInfo<v8::Value> &args);
2021
+
2022
+ static void
2023
+ FastPixelStoreiBool(v8::Local<v8::Object> receiver_obj, uint32_t pname, bool param) {
2024
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2025
+ if (ptr == nullptr) {
2026
+ return;
2027
+ }
2028
+
2029
+ canvas_native_webgl_pixel_storei(
2030
+ pname,
2031
+ param ? 1 : 0,
2032
+ ptr->GetState()
2033
+ );
2034
+ }
2035
+
2036
+ static void FastPixelStorei(v8::Local<v8::Object> receiver_obj, uint32_t pname, int32_t param) {
2037
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2038
+ if (ptr == nullptr) {
2039
+ return;
2040
+ }
2041
+
2042
+ canvas_native_webgl_pixel_storei(
2043
+ pname,
2044
+ param,
2045
+ ptr->GetState()
2046
+ );
2047
+ }
2048
+
2049
+ static void PolygonOffset(const v8::FunctionCallbackInfo<v8::Value> &args);
2050
+
2051
+ static void FastPolygonOffset(v8::Local<v8::Object> receiver_obj, double factor, double units) {
2052
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2053
+ if (ptr == nullptr) {
2054
+ return;
2055
+ }
2056
+
2057
+ canvas_native_webgl_polygon_offset(
2058
+ static_cast<float>(factor),
2059
+ static_cast<float>(units),
2060
+ ptr->GetState()
2061
+ );
2062
+
2063
+ }
2064
+
2065
+ static void ReadPixels(const v8::FunctionCallbackInfo<v8::Value> &args);
2066
+
2067
+ static void RenderbufferStorage(const v8::FunctionCallbackInfo<v8::Value> &args);
2068
+
2069
+ static void FastRenderbufferStorage(v8::Local<v8::Object> receiver_obj, uint32_t target,
2070
+ uint32_t internalFormat, int32_t width, int32_t height) {
2071
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2072
+ if (ptr == nullptr) {
2073
+ return;
2074
+ }
2075
+
2076
+ canvas_native_webgl_renderbuffer_storage(
2077
+ target,
2078
+ internalFormat,
2079
+ width,
2080
+ height,
2081
+ ptr->GetState()
2082
+ );
2083
+
2084
+ }
2085
+
2086
+ static void SampleCoverage(const v8::FunctionCallbackInfo<v8::Value> &args);
2087
+
2088
+ static void FastSampleCoverage(v8::Local<v8::Object> receiver_obj, double value, bool invert) {
2089
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2090
+ if (ptr == nullptr) {
2091
+ return;
2092
+ }
2093
+
2094
+ canvas_native_webgl_sample_coverage(
2095
+ static_cast<float>(value),
2096
+ invert,
2097
+ ptr->GetState()
2098
+ );
2099
+
2100
+ }
2101
+
2102
+ static void Scissor(const v8::FunctionCallbackInfo<v8::Value> &args);
2103
+
2104
+ static void FastScissor(v8::Local<v8::Object> receiver_obj, int32_t x, int32_t y, int32_t width,
2105
+ int32_t height) {
2106
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2107
+ if (ptr == nullptr) {
2108
+ return;
2109
+ }
2110
+
2111
+ canvas_native_webgl_scissor(
2112
+ x,
2113
+ y,
2114
+ width,
2115
+ height,
2116
+ ptr->GetState()
2117
+ );
2118
+
2119
+ }
2120
+
2121
+ static void ShaderSource(const v8::FunctionCallbackInfo<v8::Value> &args);
2122
+
2123
+ static void StencilFuncSeparate(const v8::FunctionCallbackInfo<v8::Value> &args);
2124
+
2125
+ static void
2126
+ FastStencilFuncSeparate(v8::Local<v8::Object> receiver_obj, uint32_t face, uint32_t func,
2127
+ int32_t ref, uint32_t mask) {
2128
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2129
+ if (ptr == nullptr) {
2130
+ return;
2131
+ }
2132
+
2133
+ canvas_native_webgl_stencil_func_separate(
2134
+ face,
2135
+ func,
2136
+ ref,
2137
+ mask,
2138
+ ptr->GetState()
2139
+ );
2140
+
2141
+ }
2142
+
2143
+ static void StencilFunc(const v8::FunctionCallbackInfo<v8::Value> &args);
2144
+
2145
+ static void
2146
+ FastStencilFunc(v8::Local<v8::Object> receiver_obj, uint32_t func, int32_t ref, uint32_t mask) {
2147
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2148
+ if (ptr == nullptr) {
2149
+ return;
2150
+ }
2151
+
2152
+ canvas_native_webgl_stencil_func(
2153
+ func,
2154
+ ref,
2155
+ mask,
2156
+ ptr->GetState()
2157
+ );
2158
+
2159
+ }
2160
+
2161
+ static void StencilMaskSeparate(const v8::FunctionCallbackInfo<v8::Value> &args);
2162
+
2163
+ static void
2164
+ FastStencilMaskSeparate(v8::Local<v8::Object> receiver_obj, uint32_t face, uint32_t mask) {
2165
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2166
+ if (ptr == nullptr) {
2167
+ return;
2168
+ }
2169
+
2170
+ canvas_native_webgl_stencil_mask_separate(
2171
+ face,
2172
+ mask,
2173
+ ptr->GetState()
2174
+ );
2175
+
2176
+ }
2177
+
2178
+ static void StencilMask(const v8::FunctionCallbackInfo<v8::Value> &args);
2179
+
2180
+ static void FastStencilMask(v8::Local<v8::Object> receiver_obj, uint32_t mask) {
2181
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2182
+ if (ptr == nullptr) {
2183
+ return;
2184
+ }
2185
+
2186
+
2187
+ canvas_native_webgl_stencil_mask(
2188
+ mask,
2189
+ ptr->GetState()
2190
+ );
2191
+
2192
+ }
2193
+
2194
+ static void StencilOpSeparate(const v8::FunctionCallbackInfo<v8::Value> &args);
2195
+
2196
+ static void
2197
+ FastStencilOpSeparate(v8::Local<v8::Object> receiver_obj, uint32_t face, uint32_t fail,
2198
+ uint32_t zfail, uint32_t zpass) {
2199
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2200
+ if (ptr == nullptr) {
2201
+ return;
2202
+ }
2203
+
2204
+ canvas_native_webgl_stencil_op_separate(
2205
+ face,
2206
+ fail,
2207
+ zfail,
2208
+ zpass,
2209
+ ptr->GetState()
2210
+ );
2211
+
2212
+ }
2213
+
2214
+ static void StencilOp(const v8::FunctionCallbackInfo<v8::Value> &args);
2215
+
2216
+ static void FastStencilOp(v8::Local<v8::Object> receiver_obj, uint32_t fail, uint32_t zfail,
2217
+ uint32_t zpass) {
2218
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2219
+ if (ptr == nullptr) {
2220
+ return;
2221
+ }
2222
+
2223
+ canvas_native_webgl_stencil_op(
2224
+ fail,
2225
+ zfail,
2226
+ zpass,
2227
+ ptr->GetState()
2228
+ );
2229
+
2230
+ }
2231
+
2232
+ static void TexImage2D(const v8::FunctionCallbackInfo<v8::Value> &args);
2233
+
2234
+ static void TexParameterf(const v8::FunctionCallbackInfo<v8::Value> &args);
2235
+
2236
+ static void
2237
+ FastTexParameterf(v8::Local<v8::Object> receiver_obj, uint32_t target, uint32_t pname,
2238
+ double param) {
2239
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2240
+ if (ptr == nullptr) {
2241
+ return;
2242
+ }
2243
+
2244
+ canvas_native_webgl_tex_parameterf(
2245
+ target,
2246
+ pname,
2247
+ static_cast<float>(param),
2248
+ ptr->GetState()
2249
+ );
2250
+
2251
+ }
2252
+
2253
+ static void TexParameteri(const v8::FunctionCallbackInfo<v8::Value> &args);
2254
+
2255
+ static void FastTexParameteri(v8::Local<v8::Object> receiver_obj, uint32_t target,
2256
+ uint32_t pname, int32_t
2257
+ param) {
2258
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2259
+ if (ptr == nullptr) {
2260
+ return;
2261
+ }
2262
+
2263
+ canvas_native_webgl_tex_parameteri(
2264
+ target,
2265
+ pname,
2266
+ param,
2267
+ ptr->GetState()
2268
+ );
2269
+
2270
+ }
2271
+
2272
+ static void TexSubImage2D(const v8::FunctionCallbackInfo<v8::Value> &args);
2273
+
2274
+ static void Uniform1f(const v8::FunctionCallbackInfo<v8::Value> &args);
2275
+
2276
+ static void Uniform1fImpl(WebGLState *receiver_obj, int32_t location, double v0) {
2277
+ canvas_native_webgl_uniform1f(
2278
+ location,
2279
+ static_cast<float>(v0),
2280
+ receiver_obj
2281
+ );
2282
+ }
2283
+
2284
+ static void
2285
+ FastUniform1f(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2286
+ double v0) {
2287
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2288
+ if (ptr == nullptr) {
2289
+ return;
2290
+ }
2291
+
2292
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2293
+
2294
+ if (location != nullptr) {
2295
+ Uniform1fImpl(
2296
+ ptr->GetState(),
2297
+ location->GetUniformLocation(),
2298
+ static_cast<float>(v0)
2299
+ );
2300
+ }
2301
+ }
2302
+
2303
+ static void Uniform1iv(const v8::FunctionCallbackInfo<v8::Value> &args);
2304
+
2305
+ static void
2306
+ FastUniform1iv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2307
+ const v8::FastApiTypedArray<int32_t> &value) {
2308
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2309
+ if (ptr == nullptr) {
2310
+ return;
2311
+ }
2312
+
2313
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2314
+
2315
+ if (location != nullptr) {
2316
+ auto size = value.length();
2317
+ int32_t *data;
2318
+ value.getStorageIfAligned(&data);
2319
+
2320
+ canvas_native_webgl_uniform1iv(
2321
+ location->GetUniformLocation(),
2322
+ data, size,
2323
+ ptr->GetState());
2324
+ }
2325
+ }
2326
+
2327
+ static void
2328
+ FastUniform1ivArray(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2329
+ v8::Local<v8::Array> value) {
2330
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2331
+ if (ptr == nullptr) {
2332
+ return;
2333
+ }
2334
+
2335
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2336
+
2337
+ if (location != nullptr) {
2338
+ auto len = value->Length();
2339
+ std::vector<int32_t> buf;
2340
+ buf.reserve(len);
2341
+
2342
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<int32_t>::Build().GetId(), int32_t>(
2343
+ value, buf.data(), len);
2344
+
2345
+ if (copied) {
2346
+ canvas_native_webgl_uniform1iv(
2347
+ location->GetUniformLocation(),
2348
+ buf.data(),
2349
+ buf.size(),
2350
+ ptr->GetState());
2351
+ }
2352
+
2353
+
2354
+ }
2355
+ }
2356
+
2357
+
2358
+ static void Uniform1fv(const v8::FunctionCallbackInfo<v8::Value> &args);
2359
+
2360
+
2361
+ static void
2362
+ FastUniform1fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2363
+ const v8::FastApiTypedArray<float> &value) {
2364
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2365
+ if (ptr == nullptr) {
2366
+ return;
2367
+ }
2368
+
2369
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2370
+
2371
+ if (location != nullptr) {
2372
+ auto size = value.length();
2373
+ float *data;
2374
+ value.getStorageIfAligned(&data);
2375
+
2376
+ canvas_native_webgl_uniform1fv(
2377
+ location->GetUniformLocation(),
2378
+ data, size,
2379
+ ptr->GetState());
2380
+ }
2381
+ }
2382
+
2383
+ static void
2384
+ FastUniform1fvArray(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2385
+ v8::Local<v8::Array> value) {
2386
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2387
+ if (ptr == nullptr) {
2388
+ return;
2389
+ }
2390
+
2391
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2392
+
2393
+ if (location != nullptr) {
2394
+ auto len = value->Length();
2395
+ std::vector<float> buf;
2396
+ buf.reserve(len);
2397
+
2398
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
2399
+ value, buf.data(), len);
2400
+
2401
+ if (copied) {
2402
+ canvas_native_webgl_uniform1fv(
2403
+ location->GetUniformLocation(),
2404
+ buf.data(),
2405
+ buf.size(),
2406
+ ptr->GetState());
2407
+ }
2408
+
2409
+
2410
+ }
2411
+ }
2412
+
2413
+
2414
+ static void Uniform1i(const v8::FunctionCallbackInfo<v8::Value> &args);
2415
+
2416
+
2417
+ static void Uniform1iImpl(WebGLState *receiver_obj, int32_t location, int32_t v0) {
2418
+ canvas_native_webgl_uniform1i(
2419
+ location,
2420
+ v0,
2421
+ receiver_obj
2422
+ );
2423
+ }
2424
+
2425
+ static void
2426
+ FastUniform1i(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2427
+ int32_t v0) {
2428
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2429
+ if (ptr == nullptr) {
2430
+ return;
2431
+ }
2432
+
2433
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2434
+
2435
+ if (location != nullptr) {
2436
+ Uniform1iImpl(
2437
+ ptr->GetState(),
2438
+ location->GetUniformLocation(),
2439
+ v0
2440
+ );
2441
+ }
2442
+ }
2443
+
2444
+ static void Uniform2f(const v8::FunctionCallbackInfo<v8::Value> &args);
2445
+
2446
+ static void
2447
+ FastUniform2f(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2448
+ double v0, double v1) {
2449
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2450
+ if (ptr == nullptr) {
2451
+ return;
2452
+ }
2453
+
2454
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2455
+
2456
+ if (location != nullptr) {
2457
+ canvas_native_webgl_uniform2f(
2458
+ location->GetUniformLocation(),
2459
+ static_cast<float>(v0),
2460
+ static_cast<float>(v1),
2461
+ ptr->GetState()
2462
+ );
2463
+ }
2464
+ }
2465
+
2466
+
2467
+ static void Uniform2iv(const v8::FunctionCallbackInfo<v8::Value> &args);
2468
+
2469
+
2470
+ static void
2471
+ FastUniform2iv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2472
+ const v8::FastApiTypedArray<int32_t> &value) {
2473
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2474
+ if (ptr == nullptr) {
2475
+ return;
2476
+ }
2477
+
2478
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2479
+
2480
+ if (location != nullptr) {
2481
+ auto size = value.length();
2482
+ int32_t *data;
2483
+ value.getStorageIfAligned(&data);
2484
+
2485
+ canvas_native_webgl_uniform2iv(
2486
+ location->GetUniformLocation(),
2487
+ data, size,
2488
+ ptr->GetState());
2489
+ }
2490
+ }
2491
+
2492
+ static void
2493
+ FastUniform2ivArray(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2494
+ v8::Local<v8::Array> value) {
2495
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2496
+ if (ptr == nullptr) {
2497
+ return;
2498
+ }
2499
+
2500
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2501
+
2502
+ if (location != nullptr) {
2503
+ auto len = value->Length();
2504
+ std::vector<int32_t> buf;
2505
+ buf.reserve(len);
2506
+
2507
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<int32_t>::Build().GetId(), int32_t>(
2508
+ value, buf.data(), len);
2509
+
2510
+ if (copied) {
2511
+ canvas_native_webgl_uniform2iv(
2512
+ location->GetUniformLocation(),
2513
+ buf.data(),
2514
+ buf.size(),
2515
+ ptr->GetState());
2516
+ }
2517
+
2518
+ }
2519
+ }
2520
+
2521
+
2522
+ static void Uniform2fv(const v8::FunctionCallbackInfo<v8::Value> &args);
2523
+
2524
+ static void
2525
+ FastUniform2fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2526
+ const v8::FastApiTypedArray<float> &value) {
2527
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2528
+ if (ptr == nullptr) {
2529
+ return;
2530
+ }
2531
+
2532
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2533
+
2534
+ if (location != nullptr) {
2535
+ auto size = value.length();
2536
+ float *data;
2537
+ value.getStorageIfAligned(&data);
2538
+
2539
+ canvas_native_webgl_uniform2fv(
2540
+ location->GetUniformLocation(),
2541
+ data, size,
2542
+ ptr->GetState());
2543
+ }
2544
+ }
2545
+
2546
+ static void
2547
+ FastUniform2fvArray(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2548
+ v8::Local<v8::Array> value) {
2549
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2550
+ if (ptr == nullptr) {
2551
+ return;
2552
+ }
2553
+
2554
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2555
+
2556
+ if (location != nullptr) {
2557
+ auto len = value->Length();
2558
+ std::vector<float> buf;
2559
+ buf.reserve(len);
2560
+
2561
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
2562
+ value, buf.data(), len);
2563
+
2564
+ if (copied) {
2565
+ canvas_native_webgl_uniform2fv(
2566
+ location->GetUniformLocation(),
2567
+ buf.data(),
2568
+ buf.size(),
2569
+ ptr->GetState());
2570
+ }
2571
+
2572
+ }
2573
+ }
2574
+
2575
+
2576
+ static void Uniform2i(const v8::FunctionCallbackInfo<v8::Value> &args);
2577
+
2578
+ static void
2579
+ FastUniform2i(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2580
+ int32_t v0, int32_t v1) {
2581
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2582
+ if (ptr == nullptr) {
2583
+ return;
2584
+ }
2585
+
2586
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2587
+
2588
+ if (location != nullptr) {
2589
+ canvas_native_webgl_uniform2i(
2590
+ location->GetUniformLocation(),
2591
+ v0,
2592
+ v1,
2593
+ ptr->GetState()
2594
+ );
2595
+ }
2596
+ }
2597
+
2598
+
2599
+ static void Uniform3f(const v8::FunctionCallbackInfo<v8::Value> &args);
2600
+
2601
+ static void
2602
+ FastUniform3f(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2603
+ double v0, double v1, double v2) {
2604
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2605
+ if (ptr == nullptr) {
2606
+ return;
2607
+ }
2608
+
2609
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2610
+
2611
+ if (location != nullptr) {
2612
+ canvas_native_webgl_uniform3f(
2613
+ location->GetUniformLocation(),
2614
+ static_cast<float>(v0),
2615
+ static_cast<float>(v1),
2616
+ static_cast<float>(v2),
2617
+ ptr->GetState()
2618
+ );
2619
+ }
2620
+ }
2621
+
2622
+
2623
+ static void Uniform3iv(const v8::FunctionCallbackInfo<v8::Value> &args);
2624
+
2625
+
2626
+ static void
2627
+ FastUniform3fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2628
+ const v8::FastApiTypedArray<float> &value) {
2629
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2630
+ if (ptr == nullptr) {
2631
+ return;
2632
+ }
2633
+
2634
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2635
+
2636
+ if (location != nullptr) {
2637
+ auto size = value.length();
2638
+ float *data;
2639
+ value.getStorageIfAligned(&data);
2640
+
2641
+ canvas_native_webgl_uniform3fv(
2642
+ location->GetUniformLocation(),
2643
+ data, size,
2644
+ ptr->GetState());
2645
+ }
2646
+ }
2647
+
2648
+ static void
2649
+ FastUniform3fvArray(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2650
+ v8::Local<v8::Array> value) {
2651
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2652
+ if (ptr == nullptr) {
2653
+ return;
2654
+ }
2655
+
2656
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2657
+
2658
+ if (location != nullptr) {
2659
+ auto len = value->Length();
2660
+ std::vector<float> buf;
2661
+ buf.reserve(len);
2662
+
2663
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
2664
+ value, buf.data(), len);
2665
+
2666
+ if (copied) {
2667
+ canvas_native_webgl_uniform3fv(
2668
+ location->GetUniformLocation(),
2669
+ buf.data(),
2670
+ buf.size(),
2671
+ ptr->GetState());
2672
+ }
2673
+
2674
+ }
2675
+ }
2676
+
2677
+
2678
+ static void Uniform3fv(const v8::FunctionCallbackInfo<v8::Value> &args);
2679
+
2680
+
2681
+ static void
2682
+ FastUniform3iv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2683
+ const v8::FastApiTypedArray<int32_t> &value) {
2684
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2685
+ if (ptr == nullptr) {
2686
+ return;
2687
+ }
2688
+
2689
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2690
+
2691
+ if (location != nullptr) {
2692
+ auto size = value.length();
2693
+ int32_t *data;
2694
+ value.getStorageIfAligned(&data);
2695
+
2696
+ canvas_native_webgl_uniform3iv(
2697
+ location->GetUniformLocation(),
2698
+ data, size,
2699
+ ptr->GetState());
2700
+ }
2701
+ }
2702
+
2703
+ static void
2704
+ FastUniform3ivArray(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2705
+ v8::Local<v8::Array> value) {
2706
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2707
+ if (ptr == nullptr) {
2708
+ return;
2709
+ }
2710
+
2711
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2712
+
2713
+ if (location != nullptr) {
2714
+ auto len = value->Length();
2715
+ std::vector<int32_t> buf;
2716
+ buf.reserve(len);
2717
+
2718
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<int32_t>::Build().GetId(), int32_t>(
2719
+ value, buf.data(), len);
2720
+
2721
+ if (copied) {
2722
+ canvas_native_webgl_uniform3iv(
2723
+ location->GetUniformLocation(),
2724
+ buf.data(),
2725
+ buf.size(),
2726
+ ptr->GetState());
2727
+ }
2728
+
2729
+ }
2730
+ }
2731
+
2732
+
2733
+ static void Uniform3i(const v8::FunctionCallbackInfo<v8::Value> &args);
2734
+
2735
+
2736
+ static void
2737
+ FastUniform3i(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2738
+ int32_t v0, int32_t v1, int32_t v2) {
2739
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2740
+ if (ptr == nullptr) {
2741
+ return;
2742
+ }
2743
+
2744
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2745
+
2746
+ if (location != nullptr) {
2747
+ canvas_native_webgl_uniform3i(
2748
+ location->GetUniformLocation(),
2749
+ v0,
2750
+ v1,
2751
+ v2,
2752
+ ptr->GetState()
2753
+ );
2754
+ }
2755
+ }
2756
+
2757
+ static void Uniform4f(const v8::FunctionCallbackInfo<v8::Value> &args);
2758
+
2759
+
2760
+ static void
2761
+ FastUniform4f(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2762
+ double v0, double v1, double v2, double v3) {
2763
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2764
+ if (ptr == nullptr) {
2765
+ return;
2766
+ }
2767
+
2768
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2769
+
2770
+ if (location != nullptr) {
2771
+ canvas_native_webgl_uniform4f(
2772
+ location->GetUniformLocation(),
2773
+ static_cast<float>(v0),
2774
+ static_cast<float>(v1),
2775
+ static_cast<float>(v2),
2776
+ static_cast<float>(v3),
2777
+ ptr->GetState()
2778
+ );
2779
+ }
2780
+ }
2781
+
2782
+
2783
+ static void Uniform4iv(const v8::FunctionCallbackInfo<v8::Value> &args);
2784
+
2785
+ static void
2786
+ FastUniform4iv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2787
+ const v8::FastApiTypedArray<int32_t> &value) {
2788
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2789
+ if (ptr == nullptr) {
2790
+ return;
2791
+ }
2792
+
2793
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2794
+
2795
+ if (location != nullptr) {
2796
+ auto size = value.length();
2797
+ int32_t *data;
2798
+ value.getStorageIfAligned(&data);
2799
+
2800
+ canvas_native_webgl_uniform4iv(
2801
+ location->GetUniformLocation(),
2802
+ data, size,
2803
+ ptr->GetState());
2804
+ }
2805
+ }
2806
+
2807
+ static void
2808
+ FastUniform4ivArray(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2809
+ v8::Local<v8::Array> value) {
2810
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2811
+ if (ptr == nullptr) {
2812
+ return;
2813
+ }
2814
+
2815
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2816
+
2817
+ if (location != nullptr) {
2818
+ auto len = value->Length();
2819
+ std::vector<int32_t> buf;
2820
+ buf.reserve(len);
2821
+
2822
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<int32_t>::Build().GetId(), int32_t>(
2823
+ value, buf.data(), len);
2824
+
2825
+ if (copied) {
2826
+ canvas_native_webgl_uniform4iv(
2827
+ location->GetUniformLocation(),
2828
+ buf.data(),
2829
+ buf.size(),
2830
+ ptr->GetState());
2831
+ }
2832
+
2833
+
2834
+ }
2835
+ }
2836
+
2837
+ static void Uniform4fv(const v8::FunctionCallbackInfo<v8::Value> &args);
2838
+
2839
+
2840
+ static void
2841
+ FastUniform4fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2842
+ const v8::FastApiTypedArray<float> &value) {
2843
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2844
+ if (ptr == nullptr) {
2845
+ return;
2846
+ }
2847
+
2848
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2849
+
2850
+ if (location != nullptr) {
2851
+ auto size = value.length();
2852
+ float *data;
2853
+ value.getStorageIfAligned(&data);
2854
+
2855
+ canvas_native_webgl_uniform4fv(
2856
+ location->GetUniformLocation(),
2857
+ data, size,
2858
+ ptr->GetState());
2859
+ }
2860
+ }
2861
+
2862
+ static void
2863
+ FastUniform4fvArray(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2864
+ v8::Local<v8::Array> value) {
2865
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2866
+ if (ptr == nullptr) {
2867
+ return;
2868
+ }
2869
+
2870
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2871
+
2872
+ if (location != nullptr) {
2873
+ auto len = value->Length();
2874
+ std::vector<float> buf;
2875
+ buf.reserve(len);
2876
+
2877
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
2878
+ value, buf.data(), len);
2879
+
2880
+ if (copied) {
2881
+ canvas_native_webgl_uniform4fv(
2882
+ location->GetUniformLocation(),
2883
+ buf.data(),
2884
+ buf.size(),
2885
+ ptr->GetState());
2886
+ }
2887
+
2888
+
2889
+ }
2890
+ }
2891
+
2892
+
2893
+ static void Uniform4i(const v8::FunctionCallbackInfo<v8::Value> &args);
2894
+
2895
+ static void
2896
+ FastUniform4i(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2897
+ int32_t v0, int32_t v1, int32_t v2, int32_t v3) {
2898
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2899
+ if (ptr == nullptr) {
2900
+ return;
2901
+ }
2902
+
2903
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2904
+
2905
+ if (location != nullptr) {
2906
+ canvas_native_webgl_uniform4i(
2907
+ location->GetUniformLocation(),
2908
+ v0,
2909
+ v1,
2910
+ v2,
2911
+ v3,
2912
+ ptr->GetState()
2913
+ );
2914
+ }
2915
+ }
2916
+
2917
+
2918
+ static void UniformMatrix2fv(const v8::FunctionCallbackInfo<v8::Value> &args);
2919
+
2920
+
2921
+ static void
2922
+ FastUniformMatrix2fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2923
+ bool transpose, const v8::FastApiTypedArray<float> &value) {
2924
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2925
+ if (ptr == nullptr) {
2926
+ return;
2927
+ }
2928
+
2929
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2930
+
2931
+ if (location != nullptr) {
2932
+
2933
+ float *data;
2934
+
2935
+ value.getStorageIfAligned(&data);
2936
+ auto size = value.length();
2937
+
2938
+
2939
+ canvas_native_webgl_uniform_matrix2fv(
2940
+ location->GetUniformLocation(),
2941
+ transpose, data, size,
2942
+ ptr->GetState());
2943
+
2944
+ }
2945
+
2946
+ }
2947
+
2948
+ static void FastUniformMatrix2fvArray(v8::Local<v8::Object> receiver_obj,
2949
+ v8::Local<v8::Object> location_obj, bool transpose,
2950
+ v8::Local<v8::Array> value) {
2951
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2952
+ if (ptr == nullptr) {
2953
+ return;
2954
+ }
2955
+
2956
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2957
+
2958
+ if (location != nullptr) {
2959
+ auto len = value->Length();
2960
+ std::vector<float> buf;
2961
+ buf.reserve(len);
2962
+
2963
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
2964
+ value, buf.data(), len);
2965
+
2966
+ if (copied) {
2967
+ canvas_native_webgl_uniform_matrix2fv(
2968
+ location->GetUniformLocation(),
2969
+ transpose, buf.data(),
2970
+ buf.size(),
2971
+ ptr->GetState());
2972
+ }
2973
+
2974
+ }
2975
+ }
2976
+
2977
+
2978
+ static void UniformMatrix3fv(const v8::FunctionCallbackInfo<v8::Value> &args);
2979
+
2980
+
2981
+ static void
2982
+ FastUniformMatrix3fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
2983
+ bool transpose, const v8::FastApiTypedArray<float> &value) {
2984
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
2985
+ if (ptr == nullptr) {
2986
+ return;
2987
+ }
2988
+
2989
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
2990
+
2991
+ if (location != nullptr) {
2992
+
2993
+ float *data;
2994
+
2995
+ value.getStorageIfAligned(&data);
2996
+ auto size = value.length();
2997
+
2998
+
2999
+ canvas_native_webgl_uniform_matrix3fv(
3000
+ location->GetUniformLocation(),
3001
+ transpose, data, size,
3002
+ ptr->GetState());
3003
+
3004
+ }
3005
+
3006
+ }
3007
+
3008
+ static void FastUniformMatrix3fvArray(v8::Local<v8::Object> receiver_obj,
3009
+ v8::Local<v8::Object> location_obj, bool transpose,
3010
+ v8::Local<v8::Array> value) {
3011
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
3012
+ if (ptr == nullptr) {
3013
+ return;
3014
+ }
3015
+
3016
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
3017
+
3018
+ if (location != nullptr) {
3019
+ auto len = value->Length();
3020
+ std::vector<float> buf;
3021
+ buf.reserve(len);
3022
+
3023
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
3024
+ value, buf.data(), len);
3025
+
3026
+ if (copied) {
3027
+ canvas_native_webgl_uniform_matrix3fv(
3028
+ location->GetUniformLocation(),
3029
+ transpose, buf.data(),
3030
+ buf.size(),
3031
+ ptr->GetState());
3032
+ }
3033
+
3034
+ }
3035
+ }
3036
+
3037
+
3038
+ static void UniformMatrix4fv(const v8::FunctionCallbackInfo<v8::Value> &args);
3039
+
3040
+ static void
3041
+ FastUniformMatrix4fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
3042
+ bool transpose, const v8::FastApiTypedArray<float> &value) {
3043
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
3044
+ if (ptr == nullptr) {
3045
+ return;
3046
+ }
3047
+
3048
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
3049
+
3050
+ if (location != nullptr) {
3051
+
3052
+ float *data;
3053
+ value.getStorageIfAligned(&data);
3054
+ auto size = value.length();
3055
+
3056
+
3057
+ canvas_native_webgl_uniform_matrix4fv(
3058
+ location->GetUniformLocation(),
3059
+ transpose, data, size,
3060
+ ptr->GetState());
3061
+
3062
+ }
3063
+
3064
+ }
3065
+
3066
+ static void FastUniformMatrix4fvArray(v8::Local<v8::Object> receiver_obj,
3067
+ v8::Local<v8::Object> location_obj, bool transpose,
3068
+ v8::Local<v8::Array> value) {
3069
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
3070
+ if (ptr == nullptr) {
3071
+ return;
3072
+ }
3073
+
3074
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
3075
+
3076
+ if (location != nullptr) {
3077
+ auto len = value->Length();
3078
+ std::vector<float> buf;
3079
+ buf.reserve(len);
3080
+
3081
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
3082
+ value, buf.data(), len);
3083
+
3084
+ if (copied) {
3085
+ canvas_native_webgl_uniform_matrix4fv(
3086
+ location->GetUniformLocation(),
3087
+ transpose, buf.data(),
3088
+ buf.size(),
3089
+ ptr->GetState());
3090
+ }
3091
+
3092
+ }
3093
+ }
3094
+
3095
+ static void UseProgram(const v8::FunctionCallbackInfo<v8::Value> &args);
3096
+
3097
+ static void
3098
+ UseProgramImpl(WebGLRenderingContext *ptr, uint32_t program) {
3099
+ canvas_native_webgl_use_program(
3100
+ program,
3101
+ ptr->GetState()
3102
+ );
3103
+
3104
+ }
3105
+
3106
+
3107
+ static void FastUseProgramNull(v8::Local<v8::Object> receiver_obj, uint32_t program) {
3108
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
3109
+ if (ptr == nullptr) {
3110
+ return;
3111
+ }
3112
+
3113
+ UseProgramImpl(
3114
+ ptr,
3115
+ program
3116
+ );
3117
+ }
3118
+
3119
+ static void
3120
+ FastUseProgram(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> program_obj) {
3121
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
3122
+ if (ptr == nullptr) {
3123
+ return;
3124
+ }
3125
+
3126
+
3127
+ if (GetNativeType(program_obj) == NativeType::WebGLProgram) {
3128
+ WebGLProgram *program = WebGLProgram::GetPointer(program_obj);
3129
+ UseProgramImpl(
3130
+ ptr,
3131
+ program->GetProgram()
3132
+ );
3133
+ }
3134
+
3135
+
3136
+ }
3137
+
3138
+ static void ValidateProgram(const v8::FunctionCallbackInfo<v8::Value> &args);
3139
+
3140
+ static void
3141
+ FastValidateProgram(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> program_obj) {
3142
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
3143
+ if (ptr == nullptr) {
3144
+ return;
3145
+ }
3146
+
3147
+
3148
+ auto type = GetNativeType(program_obj);
3149
+ if (type == NativeType::WebGLProgram) {
3150
+ auto program = WebGLProgram::GetPointer(program_obj);
3151
+ if (program != nullptr) {
3152
+ canvas_native_webgl_validate_program(
3153
+ program->GetProgram(),
3154
+ ptr->GetState()
3155
+ );
3156
+ }
3157
+ }
3158
+
3159
+ }
3160
+
3161
+ static void VertexAttrib1f(const v8::FunctionCallbackInfo<v8::Value> &args);
3162
+
3163
+ static void FastVertexAttrib1f(v8::Local<v8::Object> receiver_obj, uint32_t index, float v0) {
3164
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
3165
+ if (ptr == nullptr) {
3166
+ return;
3167
+ }
3168
+
3169
+ canvas_native_webgl_vertex_attrib1f(
3170
+ index, v0, ptr->GetState());
3171
+
3172
+ }
3173
+
3174
+ static void VertexAttrib1fv(const v8::FunctionCallbackInfo<v8::Value> &args);
3175
+
3176
+ static void FastVertexAttrib1fv(v8::Local<v8::Object> receiver_obj, uint32_t index,
3177
+ const v8::FastApiTypedArray<float> &value) {
3178
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
3179
+ if (ptr == nullptr) {
3180
+ return;
3181
+ }
3182
+
3183
+
3184
+ auto size = value.length();
3185
+ float *data;
3186
+ value.getStorageIfAligned(&data);
3187
+
3188
+
3189
+ canvas_native_webgl_vertex_attrib1fv(
3190
+ index, data, size,
3191
+ ptr->GetState());
3192
+ }
3193
+
3194
+ static void VertexAttrib2f(const v8::FunctionCallbackInfo<v8::Value> &args);
3195
+
3196
+ static void
3197
+ FastVertexAttrib2f(v8::Local<v8::Object> receiver_obj, uint32_t index, float v0, float v1) {
3198
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
3199
+ if (ptr == nullptr) {
3200
+ return;
3201
+ }
3202
+
3203
+ canvas_native_webgl_vertex_attrib2f(
3204
+ index, v0, v1, ptr->GetState());
3205
+
3206
+ }
3207
+
3208
+ static void VertexAttrib2fv(const v8::FunctionCallbackInfo<v8::Value> &args);
3209
+
3210
+ static void FastVertexAttrib2fv(v8::Local<v8::Object> receiver_obj, uint32_t index,
3211
+ const v8::FastApiTypedArray<float> &value) {
3212
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
3213
+ if (ptr == nullptr) {
3214
+ return;
3215
+ }
3216
+
3217
+
3218
+ auto size = value.length();
3219
+ float *data;
3220
+ value.getStorageIfAligned(&data);
3221
+
3222
+
3223
+ canvas_native_webgl_vertex_attrib2fv(
3224
+ index, data, size,
3225
+ ptr->GetState());
3226
+ }
3227
+
3228
+ static void VertexAttrib3f(const v8::FunctionCallbackInfo<v8::Value> &args);
3229
+
3230
+ static void
3231
+ FastVertexAttrib3f(v8::Local<v8::Object> receiver_obj, uint32_t index, float v0, float v1,
3232
+ float v2) {
3233
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
3234
+ if (ptr == nullptr) {
3235
+ return;
3236
+ }
3237
+
3238
+ canvas_native_webgl_vertex_attrib3f(
3239
+ index, v0, v1, v2, ptr->GetState());
3240
+
3241
+ }
3242
+
3243
+ static void VertexAttrib3fv(const v8::FunctionCallbackInfo<v8::Value> &args);
3244
+
3245
+ static void FastVertexAttrib3fv(v8::Local<v8::Object> receiver_obj, uint32_t index,
3246
+ const v8::FastApiTypedArray<float> &value) {
3247
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
3248
+ if (ptr == nullptr) {
3249
+ return;
3250
+ }
3251
+
3252
+
3253
+ auto size = value.length();
3254
+ float *data;
3255
+ value.getStorageIfAligned(&data);
3256
+
3257
+
3258
+ canvas_native_webgl_vertex_attrib3fv(
3259
+ index, data, size,
3260
+ ptr->GetState());
3261
+ }
3262
+
3263
+ static void VertexAttrib4f(const v8::FunctionCallbackInfo<v8::Value> &args);
3264
+
3265
+ static void
3266
+ FastVertexAttrib4f(v8::Local<v8::Object> receiver_obj, uint32_t index, float v0, float v1,
3267
+ float v2, float v3) {
3268
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
3269
+ if (ptr == nullptr) {
3270
+ return;
3271
+ }
3272
+
3273
+ canvas_native_webgl_vertex_attrib4f(
3274
+ index, v0, v1, v2, v3, ptr->GetState());
3275
+
3276
+ }
3277
+
3278
+ static void VertexAttrib4fv(const v8::FunctionCallbackInfo<v8::Value> &args);
3279
+
3280
+ static void FastVertexAttrib4fv(v8::Local<v8::Object> receiver_obj, uint32_t index,
3281
+ const v8::FastApiTypedArray<float> &value) {
3282
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
3283
+ if (ptr == nullptr) {
3284
+ return;
3285
+ }
3286
+
3287
+
3288
+ auto size = value.length();
3289
+ float *data;
3290
+ value.getStorageIfAligned(&data);
3291
+
3292
+
3293
+ canvas_native_webgl_vertex_attrib4fv(
3294
+ index, data, size,
3295
+ ptr->GetState());
3296
+ }
3297
+
3298
+ static void VertexAttribPointer(const v8::FunctionCallbackInfo<v8::Value> &args);
3299
+
3300
+ static void
3301
+ FastVertexAttribPointer(v8::Local<v8::Object> receiver_obj, uint32_t index, int32_t size,
3302
+ uint32_t type, bool normalized, int32_t stride, int32_t offset) {
3303
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
3304
+ if (ptr == nullptr) {
3305
+ return;
3306
+ }
3307
+
3308
+ auto os = static_cast<ssize_t>(offset);
3309
+ canvas_native_webgl_vertex_attrib_pointer(
3310
+ index, size, type, normalized,
3311
+ stride, os,
3312
+ ptr->GetState());
3313
+ }
3314
+
3315
+
3316
+ static void Viewport(const v8::FunctionCallbackInfo<v8::Value> &args);
3317
+
3318
+
3319
+ static void
3320
+ ViewportImpl(WebGLRenderingContext *ptr, double x, double y, double width, double height) {
3321
+ canvas_native_webgl_viewport(
3322
+ static_cast<float>(x), static_cast<float>(y), static_cast<float>(width),
3323
+ static_cast<float>(height),
3324
+ ptr->GetState()
3325
+ );
513
3326
 
514
- return jsi::Value::undefined();
515
3327
  }
516
3328
 
3329
+ static void FastViewport(v8::Local<v8::Object> receiver_obj, double x, double y, double width,
3330
+ double height) {
3331
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
3332
+ if (ptr == nullptr) {
3333
+ return;
3334
+ }
3335
+
3336
+ ViewportImpl(
3337
+ ptr,
3338
+ x, y, width, height
3339
+ );
3340
+ }
3341
+
3342
+ static void __ToDataURL(const v8::FunctionCallbackInfo<v8::Value> &args);
3343
+
3344
+ static void __GetSupportedExtensions(const v8::FunctionCallbackInfo<v8::Value> &args);
3345
+
517
3346
  };