• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16import { paramMock } from "../utils"
17
18export function mockwebgl2() {
19  const WebGLQuery = {
20  }
21  const WebGLSampler = {
22  }
23  const WebGLSync = {
24  }
25  const WebGLTransformFeedback = {
26  }
27  const WebGLVertexArrayObject = {
28  }
29  const WebGLActiveInfo = {
30    size: '[PC preview] unknow size',
31    type: '[PC preview] unknow type',
32    name: '[PC preview] unknow name'
33  }
34  const glParamMock = {
35    paramDoubleMock: '[PC Preview] unknow double',
36    paramAnyMock: '[PC Preview] unknow any',
37    stringArray: '[PC preview] unknow stringArray',
38    uint32Array: '[PC preview] unknow uint32Array',
39    glBooleanArray: '[PC preview] unknow glBooleanArray',
40    int32Array: '[PC preview] unknow int32Array',
41    uintArray: '[PC preview] unknow uintArray'
42  }
43
44  const WebGL2RenderingContext = {
45      READ_BUFFER: 0x0C02,
46      UNPACK_ROW_LENGTH: 0x0CF2,
47      UNPACK_SKIP_ROWS: 0x0CF3,
48      UNPACK_SKIP_PIXELS: 0x0CF4,
49      PACK_ROW_LENGTH: 0x0D02,
50      PACK_SKIP_ROWS: 0x0D03,
51      PACK_SKIP_PIXELS: 0x0D04,
52      COLOR: 0x1800,
53      DEPTH: 0x1801,
54      STENCIL: 0x1802,
55      RED: 0x1903,
56      RGB8: 0x8051,
57      RGBA8: 0x8058,
58      RGB10_A2: 0x8059,
59      TEXTURE_BINDING_3D: 0x806A,
60      UNPACK_SKIP_IMAGES: 0x806D,
61      UNPACK_IMAGE_HEIGHT: 0x806E,
62      TEXTURE_3D: 0x806F,
63      TEXTURE_WRAP_R: 0x8072,
64      MAX_3D_TEXTURE_SIZE: 0x8073,
65      UNSIGNED_INT_2_10_10_10_REV: 0x8368,
66      MAX_ELEMENTS_VERTICES: 0x80E8,
67      MAX_ELEMENTS_INDICES: 0x80E9,
68      TEXTURE_MIN_LOD: 0x813A,
69      TEXTURE_MAX_LOD: 0x813B,
70      TEXTURE_BASE_LEVEL: 0x813C,
71      TEXTURE_MAX_LEVEL: 0x813D,
72      MIN: 0x8007,
73      MAX: 0x8008,
74      DEPTH_COMPONENT24: 0x81A6,
75      MAX_TEXTURE_LOD_BIAS: 0x84FD,
76      TEXTURE_COMPARE_MODE: 0x884C,
77      TEXTURE_COMPARE_FUNC: 0x884D,
78      CURRENT_QUERY: 0x8865,
79      QUERY_RESULT: 0x8866,
80      QUERY_RESULT_AVAILABLE: 0x8867,
81      STREAM_READ: 0x88E1,
82      STREAM_COPY: 0x88E2,
83      STATIC_READ: 0x88E5,
84      STATIC_COPY: 0x88E6,
85      DYNAMIC_READ: 0x88E9,
86      DYNAMIC_COPY: 0x88EA,
87      MAX_DRAW_BUFFERS: 0x8824,
88      DRAW_BUFFER0: 0x8825,
89      DRAW_BUFFER1: 0x8826,
90      DRAW_BUFFER2: 0x8827,
91      DRAW_BUFFER3: 0x8828,
92      DRAW_BUFFER4: 0x8829,
93      DRAW_BUFFER5: 0x882A,
94      DRAW_BUFFER6: 0x882B,
95      DRAW_BUFFER7: 0x882C,
96      DRAW_BUFFER8: 0x882D,
97      DRAW_BUFFER9: 0x882E,
98      DRAW_BUFFER10: 0x882F,
99      DRAW_BUFFER11: 0x8830,
100      DRAW_BUFFER12: 0x8831,
101      DRAW_BUFFER13: 0x8832,
102      DRAW_BUFFER14: 0x8833,
103      DRAW_BUFFER15: 0x8834,
104      MAX_FRAGMENT_UNIFORM_COMPONENTS: 0x8B49,
105      MAX_VERTEX_UNIFORM_COMPONENTS: 0x8B4A,
106      SAMPLER_3D: 0x8B5F,
107      SAMPLER_2D_SHADOW: 0x8B62,
108      FRAGMENT_SHADER_DERIVATIVE_HINT: 0x8B8B,
109      PIXEL_PACK_BUFFER: 0x88EB,
110      PIXEL_UNPACK_BUFFER: 0x88EC,
111      PIXEL_PACK_BUFFER_BINDING: 0x88ED,
112      PIXEL_UNPACK_BUFFER_BINDING: 0x88EF,
113      FLOAT_MAT2x3: 0x8B65,
114      FLOAT_MAT2x4: 0x8B66,
115      FLOAT_MAT3x2: 0x8B67,
116      FLOAT_MAT3x4: 0x8B68,
117      FLOAT_MAT4x2: 0x8B69,
118      FLOAT_MAT4x3: 0x8B6A,
119      SRGB: 0x8C40,
120      SRGB8: 0x8C41,
121      SRGB8_ALPHA8: 0x8C43,
122      COMPARE_REF_TO_TEXTURE: 0x884E,
123      RGBA32F: 0x8814,
124      RGB32F: 0x8815,
125      RGBA16F: 0x881A,
126      RGB16F: 0x881B,
127      VERTEX_ATTRIB_ARRAY_INTEGER: 0x88FD,
128      MAX_ARRAY_TEXTURE_LAYERS: 0x88FF,
129      MIN_PROGRAM_TEXEL_OFFSET: 0x8904,
130      MAX_PROGRAM_TEXEL_OFFSET: 0x8905,
131      MAX_VARYING_COMPONENTS: 0x8B4B,
132      TEXTURE_2D_ARRAY: 0x8C1A,
133      TEXTURE_BINDING_2D_ARRAY: 0x8C1D,
134      R11F_G11F_B10F: 0x8C3A,
135      UNSIGNED_INT_10F_11F_11F_REV: 0x8C3B,
136      RGB9_E5: 0x8C3D,
137      UNSIGNED_INT_5_9_9_9_REV: 0x8C3E,
138      TRANSFORM_FEEDBACK_BUFFER_MODE: 0x8C7F,
139      MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: 0x8C80,
140      TRANSFORM_FEEDBACK_VARYINGS: 0x8C83,
141      TRANSFORM_FEEDBACK_BUFFER_START: 0x8C84,
142      TRANSFORM_FEEDBACK_BUFFER_SIZE: 0x8C85,
143      TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: 0x8C88,
144      RASTERIZER_DISCARD: 0x8C89,
145      MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: 0x8C8A,
146      MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: 0x8C8B,
147      INTERLEAVED_ATTRIBS: 0x8C8C,
148      SEPARATE_ATTRIBS: 0x8C8D,
149      TRANSFORM_FEEDBACK_BUFFER: 0x8C8E,
150      TRANSFORM_FEEDBACK_BUFFER_BINDING: 0x8C8F,
151      RGBA32UI: 0x8D70,
152      RGB32UI: 0x8D71,
153      RGBA16UI: 0x8D76,
154      RGB16UI: 0x8D77,
155      RGBA8UI: 0x8D7C,
156      RGB8UI: 0x8D7D,
157      RGBA32I: 0x8D82,
158      RGB32I: 0x8D83,
159      RGBA16I: 0x8D88,
160      RGB16I: 0x8D89,
161      RGBA8I: 0x8D8E,
162      RGB8I: 0x8D8F,
163      RED_INTEGER: 0x8D94,
164      RGB_INTEGER: 0x8D98,
165      RGBA_INTEGER: 0x8D99,
166      SAMPLER_2D_ARRAY: 0x8DC1,
167      SAMPLER_2D_ARRAY_SHADOW: 0x8DC4,
168      SAMPLER_CUBE_SHADOW: 0x8DC5,
169      UNSIGNED_INT_VEC2: 0x8DC6,
170      UNSIGNED_INT_VEC3: 0x8DC7,
171      UNSIGNED_INT_VEC4: 0x8DC8,
172      INT_SAMPLER_2D: 0x8DCA,
173      INT_SAMPLER_3D: 0x8DCB,
174      INT_SAMPLER_CUBE: 0x8DCC,
175      INT_SAMPLER_2D_ARRAY: 0x8DCF,
176      UNSIGNED_INT_SAMPLER_2D: 0x8DD2,
177      UNSIGNED_INT_SAMPLER_3D: 0x8DD3,
178      UNSIGNED_INT_SAMPLER_CUBE: 0x8DD4,
179      UNSIGNED_INT_SAMPLER_2D_ARRAY: 0x8DD7,
180      DEPTH_COMPONENT32F: 0x8CAC,
181      DEPTH32F_STENCIL8: 0x8CAD,
182      FLOAT_32_UNSIGNED_INT_24_8_REV: 0x8DAD,
183      FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: 0x8210,
184      FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: 0x8211,
185      FRAMEBUFFER_ATTACHMENT_RED_SIZE: 0x8212,
186      FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: 0x8213,
187      FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: 0x8214,
188      FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: 0x8215,
189      FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: 0x8216,
190      FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: 0x8217,
191      FRAMEBUFFER_DEFAULT: 0x8218,
192      UNSIGNED_INT_24_8: 0x84FA,
193      DEPTH24_STENCIL8: 0x88F0,
194      UNSIGNED_NORMALIZED: 0x8C17,
195      DRAW_FRAMEBUFFER_BINDING: 0x8CA6,
196      READ_FRAMEBUFFER: 0x8CA8,
197      DRAW_FRAMEBUFFER: 0x8CA9,
198      READ_FRAMEBUFFER_BINDING: 0x8CAA,
199      RENDERBUFFER_SAMPLES: 0x8CAB,
200      FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: 0x8CD4,
201      MAX_COLOR_ATTACHMENTS: 0x8CDF,
202      COLOR_ATTACHMENT1: 0x8CE1,
203      COLOR_ATTACHMENT2: 0x8CE2,
204      COLOR_ATTACHMENT3: 0x8CE3,
205      COLOR_ATTACHMENT4: 0x8CE4,
206      COLOR_ATTACHMENT5: 0x8CE5,
207      COLOR_ATTACHMENT6: 0x8CE6,
208      COLOR_ATTACHMENT7: 0x8CE7,
209      COLOR_ATTACHMENT8: 0x8CE8,
210      COLOR_ATTACHMENT9: 0x8CE9,
211      COLOR_ATTACHMENT10: 0x8CEA,
212      COLOR_ATTACHMENT11: 0x8CEB,
213      COLOR_ATTACHMENT12: 0x8CEC,
214      COLOR_ATTACHMENT13: 0x8CED,
215      COLOR_ATTACHMENT14: 0x8CEE,
216      COLOR_ATTACHMENT15: 0x8CEF,
217      FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: 0x8D56,
218      MAX_SAMPLES: 0x8D57,
219      HALF_FLOAT: 0x140B,
220      RG: 0x8227,
221      RG_INTEGER: 0x8228,
222      R8: 0x8229,
223      RG8: 0x822B,
224      R16F: 0x822D,
225      R32F: 0x822E,
226      RG16F: 0x822F,
227      RG32F: 0x8230,
228      R8I: 0x8231,
229      R8UI: 0x8232,
230      R16I: 0x8233,
231      R16UI: 0x8234,
232      R32I: 0x8235,
233      R32UI: 0x8236,
234      RG8I: 0x8237,
235      RG8UI: 0x8238,
236      RG16I: 0x8239,
237      RG16UI: 0x823A,
238      RG32I: 0x823B,
239      RG32UI: 0x823C,
240      VERTEX_ARRAY_BINDING: 0x85B5,
241      R8_SNORM: 0x8F94,
242      RG8_SNORM: 0x8F95,
243      RGB8_SNORM: 0x8F96,
244      RGBA8_SNORM: 0x8F97,
245      SIGNED_NORMALIZED: 0x8F9C,
246      COPY_READ_BUFFER: 0x8F36,
247      COPY_WRITE_BUFFER: 0x8F37,
248      COPY_READ_BUFFER_BINDING: 0x8F36,
249      COPY_WRITE_BUFFER_BINDING: 0x8F37,
250      UNIFORM_BUFFER: 0x8A11,
251      UNIFORM_BUFFER_BINDING: 0x8A28,
252      UNIFORM_BUFFER_START: 0x8A29,
253      UNIFORM_BUFFER_SIZE: 0x8A2A,
254      MAX_VERTEX_UNIFORM_BLOCKS: 0x8A2B,
255      MAX_FRAGMENT_UNIFORM_BLOCKS: 0x8A2D,
256      MAX_COMBINED_UNIFORM_BLOCKS: 0x8A2E,
257      MAX_UNIFORM_BUFFER_BINDINGS: 0x8A2F,
258      MAX_UNIFORM_BLOCK_SIZE: 0x8A30,
259      MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: 0x8A31,
260      MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: 0x8A33,
261      UNIFORM_BUFFER_OFFSET_ALIGNMENT: 0x8A34,
262      ACTIVE_UNIFORM_BLOCKS: 0x8A36,
263      UNIFORM_TYPE: 0x8A37,
264      UNIFORM_SIZE: 0x8A38,
265      UNIFORM_BLOCK_INDEX: 0x8A3A,
266      UNIFORM_OFFSET: 0x8A3B,
267      UNIFORM_ARRAY_STRIDE: 0x8A3C,
268      UNIFORM_MATRIX_STRIDE: 0x8A3D,
269      UNIFORM_IS_ROW_MAJOR: 0x8A3E,
270      UNIFORM_BLOCK_BINDING: 0x8A3F,
271      UNIFORM_BLOCK_DATA_SIZE: 0x8A40,
272      UNIFORM_BLOCK_ACTIVE_UNIFORMS: 0x8A42,
273      UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: 0x8A43,
274      UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: 0x8A44,
275      UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: 0x8A46,
276      INVALID_INDEX: 0xFFFFFFFF,
277      MAX_VERTEX_OUTPUT_COMPONENTS: 0x9122,
278      MAX_FRAGMENT_INPUT_COMPONENTS: 0x9125,
279      MAX_SERVER_WAIT_TIMEOUT: 0x9111,
280      OBJECT_TYPE: 0x9112,
281      SYNC_CONDITION: 0x9113,
282      SYNC_STATUS: 0x9114,
283      SYNC_FLAGS: 0x9115,
284      SYNC_FENCE: 0x9116,
285      SYNC_GPU_COMMANDS_COMPLETE: 0x9117,
286      UNSIGNALED: 0x9118,
287      SIGNALED: 0x9119,
288      ALREADY_SIGNALED: 0x911A,
289      TIMEOUT_EXPIRED: 0x911B,
290      CONDITION_SATISFIED: 0x911C,
291      WAIT_FAILED: 0x911D,
292      SYNC_FLUSH_COMMANDS_BIT: 0x00000001,
293      VERTEX_ATTRIB_ARRAY_DIVISOR: 0x88FE,
294      ANY_SAMPLES_PASSED: 0x8C2F,
295      ANY_SAMPLES_PASSED_CONSERVATIVE: 0x8D6A,
296      SAMPLER_BINDING: 0x8919,
297      RGB10_A2UI: 0x906F,
298      INT_2_10_10_10_REV: 0x8D9F,
299      TRANSFORM_FEEDBACK: 0x8E22,
300      TRANSFORM_FEEDBACK_PAUSED: 0x8E23,
301      TRANSFORM_FEEDBACK_ACTIVE: 0x8E24,
302      TRANSFORM_FEEDBACK_BINDING: 0x8E25,
303      TEXTURE_IMMUTABLE_FORMAT: 0x912F,
304      MAX_ELEMENT_INDEX: 0x8D6B,
305      TEXTURE_IMMUTABLE_LEVELS: 0x82DF,
306      TIMEOUT_IGNORED: -1,
307      MAX_CLIENT_WAIT_TIMEOUT_WEBGL: 0x9247,
308    copyBufferSubData: function (...args) {
309      console.warn("WebGL2RenderingContext.copyBufferSubData interface mocked in the Previewer. How this interface works on the" +
310        " Previewer may be different from that on a real device.")
311    },
312    getBufferSubData: function (...args) {
313      console.warn("WebGL2RenderingContext.getBufferSubData interface mocked in the Previewer. How this interface works on the" +
314        " Previewer may be different from that on a real device.")
315    },
316    blitFramebuffer: function (...args) {
317      console.warn("WebGL2RenderingContext.blitFramebuffer interface mocked in the Previewer. How this interface works on the" +
318        " Previewer may be different from that on a real device.")
319    },
320    framebufferTextureLayer: function (...args) {
321      console.warn("WebGL2RenderingContext.framebufferTextureLayer interface mocked in the Previewer. How this interface works on the" +
322        " Previewer may be different from that on a real device.")
323    },
324    invalidateFramebuffer: function (...args) {
325      console.warn("WebGL2RenderingContext.invalidateFramebuffer interface mocked in the Previewer. How this interface works on the" +
326        " Previewer may be different from that on a real device.")
327    },
328    invalidateSubFramebuffer: function (...args) {
329      console.warn("WebGL2RenderingContext.invalidateFramebuffer interface mocked in the Previewer. How this interface works on the" +
330        " Previewer may be different from that on a real device.")
331    },
332    readBuffer: function (...args) {
333      console.warn("WebGL2RenderingContext.readBuffer interface mocked in the Previewer. How this interface works on the" +
334        " Previewer may be different from that on a real device.")
335    },
336    getInternalformatParameter: function (...args) {
337      console.warn("WebGL2RenderingContext.getInternalformatParameter interface mocked in the Previewer. How this interface works on the" +
338        " Previewer may be different from that on a real device.")
339      if (args[2] == GL_SAMPLES) {
340        return glParamMock.int32Array
341      }
342    },
343    renderbufferStorageMultisample: function (...args) {
344      console.warn("WebGL2RenderingContext.renderbufferStorageMultisample interface mocked in the Previewer. How this interface works on the" +
345        " Previewer may be different from that on a real device.")
346    },
347    texStorage2D: function (...args) {
348      console.warn("WebGL2RenderingContext.texStorage2D interface mocked in the Previewer. How this interface works on the" +
349        " Previewer may be different from that on a real device.")
350    },
351    texStorage3D: function (...args) {
352      console.warn("WebGL2RenderingContext.texStorage3D interface mocked in the Previewer. How this interface works on the" +
353        " Previewer may be different from that on a real device.")
354    },
355    texImage3D: function (...args) {
356      console.warn("WebGL2RenderingContext.texImage3D interface mocked in the Previewer. How this interface works on the" +
357        " Previewer may be different from that on a real device.")
358    },
359    texSubImage3D: function (...args) {
360      console.warn("WebGL2RenderingContext.texSubImage3D interface mocked in the Previewer. How this interface works on the" +
361        " Previewer may be different from that on a real device.")
362    },
363    copyTexSubImage3D: function (...args) {
364      console.warn("WebGL2RenderingContext.copyTexSubImage3D interface mocked in the Previewer. How this interface works on the" +
365        " Previewer may be different from that on a real device.")
366    },
367    compressedTexImage3D: function (...args) {
368      console.warn("WebGL2RenderingContext.compressedTexImage3D interface mocked in the Previewer. How this interface works on the" +
369        " Previewer may be different from that on a real device.")
370    },
371    compressedTexSubImage3D: function (...args) {
372      console.warn("WebGL2RenderingContext.compressedTexSubImage3D interface mocked in the Previewer. How this interface works on the" +
373        " Previewer may be different from that on a real device.")
374    },
375    getFragDataLocation: function (...args) {
376      console.warn("WebGL2RenderingContext.getFragDataLocation interface mocked in the Previewer. How this interface works on the" +
377        " Previewer may be different from that on a real device.")
378      return paramMock.paramNumberMock;
379    },
380    uniform1ui: function (...args) {
381      console.warn("WebGL2RenderingContext.uniform1ui interface mocked in the Previewer. How this interface works on the" +
382        " Previewer may be different from that on a real device.")
383    },
384    uniform2ui: function (...args) {
385      console.warn("WebGL2RenderingContext.uniform2ui interface mocked in the Previewer. How this interface works on the" +
386        " Previewer may be different from that on a real device.")
387    },
388    uniform3ui: function (...args) {
389      console.warn("WebGL2RenderingContext.uniform3ui interface mocked in the Previewer. How this interface works on the" +
390        " Previewer may be different from that on a real device.")
391    },
392    uniform4ui: function (...args) {
393      console.warn("WebGL2RenderingContext.uniform4ui interface mocked in the Previewer. How this interface works on the" +
394        " Previewer may be different from that on a real device.")
395    },
396    uniform1uiv: function (...args) {
397      console.warn("WebGL2RenderingContext.uniform1uiv interface mocked in the Previewer. How this interface works on the" +
398        " Previewer may be different from that on a real device.")
399    },
400    uniform2uiv: function (...args) {
401      console.warn("WebGL2RenderingContext.uniform2uiv interface mocked in the Previewer. How this interface works on the" +
402        " Previewer may be different from that on a real device.")
403    },
404    uniform3uiv: function (...args) {
405      console.warn("WebGL2RenderingContext.uniform3uiv interface mocked in the Previewer. How this interface works on the" +
406        " Previewer may be different from that on a real device.")
407    },
408    uniform4uiv: function (...args) {
409      console.warn("WebGL2RenderingContext.uniform4uiv interface mocked in the Previewer. How this interface works on the" +
410        " Previewer may be different from that on a real device.")
411    },
412    uniformMatrix3x2fv: function (...args) {
413      console.warn("WebGL2RenderingContext.uniformMatrix3x2fv interface mocked in the Previewer. How this interface works on the" +
414        " Previewer may be different from that on a real device.")
415    },
416    uniformMatrix4x2fv: function (...args) {
417      console.warn("WebGL2RenderingContext.uniformMatrix4x2fv interface mocked in the Previewer. How this interface works on the" +
418        " Previewer may be different from that on a real device.")
419    },
420    uniformMatrix2x3fv: function (...args) {
421      console.warn("WebGL2RenderingContext.uniformMatrix2x3fv interface mocked in the Previewer. How this interface works on the" +
422        " Previewer may be different from that on a real device.")
423    },
424    uniformMatrix4x3fv: function (...args) {
425      console.warn("WebGL2RenderingContext.uniformMatrix4x3fv interface mocked in the Previewer. How this interface works on the" +
426        " Previewer may be different from that on a real device.")
427    },
428    uniformMatrix2x4fv: function (...args) {
429      console.warn("WebGL2RenderingContext.uniformMatrix2x4fv interface mocked in the Previewer. How this interface works on the" +
430        " Previewer may be different from that on a real device.")
431    },
432    uniformMatrix3x4fv: function (...args) {
433      console.warn("WebGL2RenderingContext.uniformMatrix3x4fv interface mocked in the Previewer. How this interface works on the" +
434        " Previewer may be different from that on a real device.")
435    },
436    vertexAttribI4i: function (...args) {
437      console.warn("WebGL2RenderingContext.vertexAttribI4i interface mocked in the Previewer. How this interface works on the" +
438        " Previewer may be different from that on a real device.")
439    },
440    vertexAttribI4iv: function (...args) {
441      console.warn("WebGL2RenderingContext.vertexAttribI4iv interface mocked in the Previewer. How this interface works on the" +
442        " Previewer may be different from that on a real device.")
443    },
444    vertexAttribI4ui: function (...args) {
445      console.warn("WebGL2RenderingContext.vertexAttribI4ui interface mocked in the Previewer. How this interface works on the" +
446        " Previewer may be different from that on a real device.")
447    },
448    vertexAttribI4uiv: function (...args) {
449      console.warn("WebGL2RenderingContext.vertexAttribI4uiv interface mocked in the Previewer. How this interface works on the" +
450        " Previewer may be different from that on a real device.")
451    },
452    vertexAttribIPointer: function (...args) {
453      console.warn("WebGL2RenderingContext.vertexAttribIPointer interface mocked in the Previewer. How this interface works on the" +
454        " Previewer may be different from that on a real device.")
455    },
456    vertexAttribDivisor: function (...args) {
457      console.warn("WebGL2RenderingContext.vertexAttribDivisor interface mocked in the Previewer. How this interface works on the" +
458        " Previewer may be different from that on a real device.")
459    },
460    drawArraysInstanced: function (...args) {
461      console.warn("WebGL2RenderingContext.drawArraysInstanced interface mocked in the Previewer. How this interface works on the" +
462        " Previewer may be different from that on a real device.")
463    },
464    drawElementsInstanced: function (...args) {
465      console.warn("WebGL2RenderingContext.drawElementsInstanced interface mocked in the Previewer. How this interface works on the" +
466        " Previewer may be different from that on a real device.")
467    },
468    drawRangeElements: function (...args) {
469      console.warn("WebGL2RenderingContext.drawRangeElements interface mocked in the Previewer. How this interface works on the" +
470        " Previewer may be different from that on a real device.")
471    },
472    drawBuffers: function (...args) {
473      console.warn("WebGL2RenderingContext.drawBuffers interface mocked in the Previewer. How this interface works on the" +
474        " Previewer may be different from that on a real device.")
475    },
476    clearBufferfv: function (...args) {
477      console.warn("WebGL2RenderingContext.clearBufferfv interface mocked in the Previewer. How this interface works on the" +
478        " Previewer may be different from that on a real device.")
479    },
480    clearBufferiv: function (...args) {
481      console.warn("WebGL2RenderingContext.clearBufferiv interface mocked in the Previewer. How this interface works on the" +
482        " Previewer may be different from that on a real device.")
483    },
484    clearBufferuiv: function (...args) {
485      console.warn("WebGL2RenderingContext.clearBufferuiv interface mocked in the Previewer. How this interface works on the" +
486        " Previewer may be different from that on a real device.")
487    },
488    clearBufferfi: function (...args) {
489      console.warn("WebGL2RenderingContext.clearBufferfi interface mocked in the Previewer. How this interface works on the" +
490        " Previewer may be different from that on a real device.")
491    },
492    createQuery: function (...args) {
493      console.warn("WebGL2RenderingContext.createQuery interface mocked in the Previewer. How this interface works on the" +
494        " Previewer may be different from that on a real device.")
495      return WebGLQuery;
496    },
497    deleteQuery: function (...args) {
498      console.warn("WebGL2RenderingContext.deleteQuery interface mocked in the Previewer. How this interface works on the" +
499        " Previewer may be different from that on a real device.")
500    },
501    isQuery: function (...args) {
502      console.warn("WebGL2RenderingContext.isQuery interface mocked in the Previewer. How this interface works on the" +
503        " Previewer may be different from that on a real device.")
504      return paramMock.paramBooleanMock;
505    },
506    beginQuery: function (...args) {
507      console.warn("WebGL2RenderingContext.beginQuery interface mocked in the Previewer. How this interface works on the" +
508        " Previewer may be different from that on a real device.")
509    },
510    endQuery: function (...args) {
511      console.warn("WebGL2RenderingContext.endQuery interface mocked in the Previewer. How this interface works on the" +
512        " Previewer may be different from that on a real device.")
513    },
514    getQuery: function (...args) {
515      console.warn("WebGL2RenderingContext.getQuery interface mocked in the Previewer. How this interface works on the" +
516        " Previewer may be different from that on a real device.")
517      return WebGLQuery;
518    },
519    getQueryParameter: function (...args) {
520      console.warn("WebGL2RenderingContext.getQueryParameter interface mocked in the Previewer. How this interface works on the" +
521        " Previewer may be different from that on a real device.")
522      if (args[1] == GL_QUERY_RESULT) {
523        return paramMock.paramNumberMock;
524      } else if (args[1] == GL_QUERY_RESULT_AVAILABLE) {
525        return paramMock.paramBooleanMock;
526      }
527    },
528    createSampler: function (...args) {
529      console.warn("WebGL2RenderingContext.createSampler interface mocked in the Previewer. How this interface works on the" +
530        " Previewer may be different from that on a real device.")
531      return WebGLSampler;
532    },
533    deleteSampler: function (...args) {
534      console.warn("WebGL2RenderingContext.deleteSampler interface mocked in the Previewer. How this interface works on the" +
535        " Previewer may be different from that on a real device.")
536    },
537    isSampler: function (...args) {
538      console.warn("WebGL2RenderingContext.isSampler interface mocked in the Previewer. How this interface works on the" +
539        " Previewer may be different from that on a real device.")
540      return paramMock.paramBooleanMock;
541    },
542
543    bindSampler: function (...args) {
544      console.warn("WebGL2RenderingContext.bindSampler interface mocked in the Previewer. How this interface works on the" +
545        " Previewer may be different from that on a real device.")
546    },
547    samplerParameteri: function (...args) {
548      console.warn("WebGL2RenderingContext.samplerParameteri interface mocked in the Previewer. How this interface works on the" +
549        " Previewer may be different from that on a real device.")
550    },
551    samplerParameterf: function (...args) {
552      console.warn("WebGL2RenderingContext.samplerParameterf interface mocked in the Previewer. How this interface works on the" +
553        " Previewer may be different from that on a real device.")
554    },
555    getSamplerParameter: function (...args) {
556      console.warn("WebGL2RenderingContext.getSamplerParameter interface mocked in the Previewer. How this interface works on the" +
557        " Previewer may be different from that on a real device.")
558      if (args[1] == GL_TEXTURE_MAX_LOD || args[1] == GL_TEXTURE_MIN_LOD) {
559        return glParamMock.paramDoubleMock;
560      } else {
561        return paramMock.paramNumberMock;
562      }
563    },
564    fenceSync: function (...args) {
565      console.warn("WebGL2RenderingContext.fenceSync interface mocked in the Previewer. How this interface works on the" +
566        " Previewer may be different from that on a real device.")
567      return WebGLSync;
568    },
569    isSync: function (...args) {
570      console.warn("WebGL2RenderingContext.isSync interface mocked in the Previewer. How this interface works on the" +
571        " Previewer may be different from that on a real device.")
572      return paramMock.paramBooleanMock;
573    },
574    deleteSync: function (...args) {
575      console.warn("WebGL2RenderingContext.deleteSync interface mocked in the Previewer. How this interface works on the" +
576        " Previewer may be different from that on a real device.")
577    },
578    clientWaitSync: function (...args) {
579      console.warn("WebGL2RenderingContext.clientWaitSync interface mocked in the Previewer. How this interface works on the" +
580        " Previewer may be different from that on a real device.")
581      return paramMock.paramNumberMock;
582    },
583    waitSync: function (...args) {
584      console.warn("WebGL2RenderingContext.waitSync interface mocked in the Previewer. How this interface works on the" +
585        " Previewer may be different from that on a real device.")
586    },
587    getSyncParameter: function (...args) {
588      console.warn("WebGL2RenderingContext.getSyncParameter interface mocked in the Previewer. How this interface works on the" +
589        " Previewer may be different from that on a real device.")
590      return glParamMock.paramAnyMock;
591    },
592    createTransformFeedback: function (...args) {
593      console.warn("WebGL2RenderingContext.createTransformFeedback interface mocked in the Previewer. How this interface works on the" +
594        " Previewer may be different from that on a real device.")
595      return WebGLTransformFeedback;
596    },
597    deleteTransformFeedback: function (...args) {
598      console.warn("WebGL2RenderingContext.deleteTransformFeedback interface mocked in the Previewer. How this interface works on the" +
599        " Previewer may be different from that on a real device.")
600    },
601    isTransformFeedback: function (...args) {
602      console.warn("WebGL2RenderingContext.isTransformFeedback interface mocked in the Previewer. How this interface works on the" +
603        " Previewer may be different from that on a real device.")
604      return paramMock.paramBooleanMock;
605    },
606    bindTransformFeedback: function (...args) {
607      console.warn("WebGL2RenderingContext.bindTransformFeedback interface mocked in the Previewer. How this interface works on the" +
608        " Previewer may be different from that on a real device.")
609    },
610    beginTransformFeedback: function (...args) {
611      console.warn("WebGL2RenderingContext.beginTransformFeedback interface mocked in the Previewer. How this interface works on the" +
612        " Previewer may be different from that on a real device.")
613    },
614    endTransformFeedback: function (...args) {
615      console.warn("WebGL2RenderingContext.endTransformFeedback interface mocked in the Previewer. How this interface works on the" +
616        " Previewer may be different from that on a real device.")
617    },
618    transformFeedbackVaryings: function (...args) {
619      console.warn("WebGL2RenderingContext.transformFeedbackVaryings interface mocked in the Previewer. How this interface works on the" +
620        " Previewer may be different from that on a real device.")
621    },
622    getTransformFeedbackVarying: function (...args) {
623      console.warn("WebGL2RenderingContext.getTransformFeedbackVarying interface mocked in the Previewer. How this interface works on the" +
624        " Previewer may be different from that on a real device.")
625      return WebGLActiveInfo;
626    },
627    pauseTransformFeedback: function (...args) {
628      console.warn("WebGL2RenderingContext.pauseTransformFeedback interface mocked in the Previewer. How this interface works on the" +
629        " Previewer may be different from that on a real device.")
630    },
631    resumeTransformFeedback: function (...args) {
632      console.warn("WebGL2RenderingContext.resumeTransformFeedback interface mocked in the Previewer. How this interface works on the" +
633        " Previewer may be different from that on a real device.")
634    },
635    bindBufferBase: function (...args) {
636      console.warn("WebGL2RenderingContext.bindBufferBase interface mocked in the Previewer. How this interface works on the" +
637        " Previewer may be different from that on a real device.")
638    },
639    bindBufferRange: function (...args) {
640      console.warn("WebGL2RenderingContext.bindBufferRange interface mocked in the Previewer. How this interface works on the" +
641        " Previewer may be different from that on a real device.")
642    },
643    getIndexedParameter: function (...args) {
644      console.warn("WebGL2RenderingContext.getIndexedParameter interface mocked in the Previewer. How this interface works on the" +
645        " Previewer may be different from that on a real device.")
646      return glParamMock.paramAnyMock;
647    },
648    getUniformIndices: function (...args) {
649      console.warn("WebGL2RenderingContext.getUniformIndices interface mocked in the Previewer. How this interface works on the" +
650        " Previewer may be different from that on a real device.")
651      return glParamMock.uintArray;
652    },
653    getActiveUniforms: function (...args) {
654      console.warn("WebGL2RenderingContext.getActiveUniforms interface mocked in the Previewer. How this interface works on the" +
655        " Previewer may be different from that on a real device.")
656      return glParamMock.paramAnyMock;
657    },
658    getUniformBlockIndex: function (...args) {
659      console.warn("WebGL2RenderingContext.getUniformBlockIndex interface mocked in the Previewer. How this interface works on the" +
660        " Previewer may be different from that on a real device.")
661      return paramMock.paramNumberMock;
662    },
663    getActiveUniformBlockParameter: function (...args) {
664      console.warn("WebGL2RenderingContext.getActiveUniformBlockParameter interface mocked in the Previewer. How this interface works on the" +
665        " Previewer may be different from that on a real device.")
666      return glParamMock.paramAnyMock;
667    },
668    getActiveUniformBlockName: function (...args) {
669      console.warn("WebGL2RenderingContext.getActiveUniformBlockName interface mocked in the Previewer. How this interface works on the" +
670        " Previewer may be different from that on a real device.")
671      return paramMock.paramStringMock;
672    },
673    uniformBlockBinding: function (...args) {
674      console.warn("WebGL2RenderingContext.uniformBlockBinding interface mocked in the Previewer. How this interface works on the" +
675        " Previewer may be different from that on a real device.")
676    },
677    createVertexArray: function (...args) {
678      console.warn("WebGL2RenderingContext.createVertexArray interface mocked in the Previewer. How this interface works on the" +
679        " Previewer may be different from that on a real device.")
680      return WebGLVertexArrayObject;
681    },
682    deleteVertexArray: function (...args) {
683      console.warn("WebGL2RenderingContext.deleteVertexArray interface mocked in the Previewer. How this interface works on the" +
684        " Previewer may be different from that on a real device.")
685    },
686    isVertexArray: function (...args) {
687      console.warn("WebGL2RenderingContext.isVertexArray interface mocked in the Previewer. How this interface works on the" +
688        " Previewer may be different from that on a real device.")
689      return paramMock.paramBooleanMock;
690    },
691    bindVertexArray: function (...args) {
692      console.warn("WebGL2RenderingContext.bindVertexArray interface mocked in the Previewer. How this interface works on the" +
693        " Previewer may be different from that on a real device.")
694    },
695    bufferData: function (...args) {
696      console.warn("WebGL2RenderingContext.bufferData interface mocked in the Previewer. How this interface works on the" +
697        " Previewer may be different from that on a real device.")
698    },
699    bufferSubData: function (...args) {
700      console.warn("WebGL2RenderingContext.bufferSubData interface mocked in the Previewer. How this interface works on the" +
701        " Previewer may be different from that on a real device.")
702    },
703    texImage2D: function (...args) {
704      console.warn("WebGL2RenderingContext.texImage2D interface mocked in the Previewer. How this interface works on the" +
705        " Previewer may be different from that on a real device.")
706    },
707    texSubImage2D: function (...args) {
708      console.warn("WebGL2RenderingContext.texSubImage2D interface mocked in the Previewer. How this interface works on the" +
709        " Previewer may be different from that on a real device.")
710    },
711    compressedTexImage2D: function (...args) {
712      console.warn("WebGL2RenderingContext.compressedTexImage2D interface mocked in the Previewer. How this interface works on the" +
713        " Previewer may be different from that on a real device.")
714    },
715    compressedTexSubImage2D: function (...args) {
716      console.warn("WebGL2RenderingContext.compressedTexSubImage2D interface mocked in the Previewer. How this interface works on the" +
717        " Previewer may be different from that on a real device.")
718    },
719    uniform1fv: function (...args) {
720      console.warn("WebGL2RenderingContext.uniform1fv interface mocked in the Previewer. How this interface works on the" +
721        " Previewer may be different from that on a real device.")
722    },
723    uniform2fv: function (...args) {
724      console.warn("WebGL2RenderingContext.uniform2fv interface mocked in the Previewer. How this interface works on the" +
725        " Previewer may be different from that on a real device.")
726    },
727    uniform3fv: function (...args) {
728      console.warn("WebGL2RenderingContext.uniform3fv interface mocked in the Previewer. How this interface works on the" +
729        " Previewer may be different from that on a real device.")
730    },
731    uniform4fv: function (...args) {
732      console.warn("WebGL2RenderingContext.uniform4fv interface mocked in the Previewer. How this interface works on the" +
733        " Previewer may be different from that on a real device.")
734    },
735    uniform1iv: function (...args) {
736      console.warn("WebGL2RenderingContext.uniform1iv interface mocked in the Previewer. How this interface works on the" +
737        " Previewer may be different from that on a real device.")
738    },
739    uniform2iv: function (...args) {
740      console.warn("WebGL2RenderingContext.uniform2iv interface mocked in the Previewer. How this interface works on the" +
741        " Previewer may be different from that on a real device.")
742    },
743    uniform3iv: function (...args) {
744      console.warn("WebGL2RenderingContext.uniform3iv interface mocked in the Previewer. How this interface works on the" +
745        " Previewer may be different from that on a real device.")
746    },
747    uniform4iv: function (...args) {
748      console.warn("WebGL2RenderingContext.uniform4iv interface mocked in the Previewer. How this interface works on the" +
749        " Previewer may be different from that on a real device.")
750    },
751    uniformMatrix2fv: function (...args) {
752      console.warn("WebGL2RenderingContext.uniformMatrix2fv interface mocked in the Previewer. How this interface works on the" +
753        " Previewer may be different from that on a real device.")
754    },
755    uniformMatrix3fv: function (...args) {
756      console.warn("WebGL2RenderingContext.uniformMatrix3fv interface mocked in the Previewer. How this interface works on the" +
757        " Previewer may be different from that on a real device.")
758    },
759    uniformMatrix4fv: function (...args) {
760      console.warn("WebGL2RenderingContext.uniformMatrix4fv interface mocked in the Previewer. How this interface works on the" +
761        " Previewer may be different from that on a real device.")
762    },
763    readPixels: function (...args) {
764      console.warn("WebGL2RenderingContext.readPixels interface mocked in the Previewer. How this interface works on the" +
765        " Previewer may be different from that on a real device.")
766    }
767  }
768  return WebGL2RenderingContext;
769
770}