View Javadoc
1   /*
2    * Copyright (c) 2002-2026 Gargoyle Software Inc.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * https://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  package org.htmlunit.javascript.host.canvas;
16  
17  import static org.htmlunit.javascript.configuration.SupportedBrowser.CHROME;
18  import static org.htmlunit.javascript.configuration.SupportedBrowser.EDGE;
19  
20  import org.htmlunit.javascript.HtmlUnitScriptable;
21  import org.htmlunit.javascript.JavaScriptEngine;
22  import org.htmlunit.javascript.configuration.JsxClass;
23  import org.htmlunit.javascript.configuration.JsxConstant;
24  import org.htmlunit.javascript.configuration.JsxConstructor;
25  
26  /**
27   * A JavaScript object for {@code WebGLRenderingContext}.
28   *
29   * @author Ahmed Ashour
30   * @author Ronald Brill
31   *
32   * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext">MDN Documentation</a>
33   */
34  @JsxClass
35  public class WebGLRenderingContext extends HtmlUnitScriptable {
36  
37      /** The constant {@code DEPTH_BUFFER_BIT}. */
38      @JsxConstant
39      public static final int DEPTH_BUFFER_BIT = 0x0100;
40      /** The constant {@code STENCIL_BUFFER_BIT}. */
41      @JsxConstant
42      public static final int STENCIL_BUFFER_BIT = 0x0400;
43      /** The constant {@code COLOR_BUFFER_BIT}. */
44      @JsxConstant
45      public static final int COLOR_BUFFER_BIT = 0x4000;
46  
47      /** The constant {@code POINTS}. */
48      @JsxConstant
49      public static final int POINTS = 0x0;
50      /** The constant {@code LINES}. */
51      @JsxConstant
52      public static final int LINES = 0x0001;
53      /** The constant {@code LINE_LOOP}. */
54      @JsxConstant
55      public static final int LINE_LOOP = 0x0002;
56      /** The constant {@code LINE_STRIP}. */
57      @JsxConstant
58      public static final int LINE_STRIP = 0x0003;
59      /** The constant {@code TRIANGLES}. */
60      @JsxConstant
61      public static final int TRIANGLES = 0x0004;
62      /** The constant {@code TRIANGLE_STRIP}. */
63      @JsxConstant
64      public static final int TRIANGLE_STRIP = 0x0005;
65      /** The constant {@code TRIANGLE_FAN}. */
66      @JsxConstant
67      public static final int TRIANGLE_FAN = 0x0006;
68  
69      /** The constant {@code ZERO}. */
70      @JsxConstant
71      public static final int ZERO = 0x0;
72      /** The constant {@code ONE}. */
73      @JsxConstant
74      public static final int ONE = 0x0001;
75      /** The constant {@code SRC_COLOR}. */
76      @JsxConstant
77      public static final int SRC_COLOR = 0x0300;
78      /** The constant {@code ONE_MINUS_SRC_COLOR}. */
79      @JsxConstant
80      public static final int ONE_MINUS_SRC_COLOR = 0x0301;
81      /** The constant {@code SRC_ALPHA}. */
82      @JsxConstant
83      public static final int SRC_ALPHA = 0x0302;
84      /** The constant {@code ONE_MINUS_SRC_ALPHA}. */
85      @JsxConstant
86      public static final int ONE_MINUS_SRC_ALPHA = 0x0303;
87      /** The constant {@code DST_ALPHA}. */
88      @JsxConstant
89      public static final int DST_ALPHA = 0x0304;
90      /** The constant {@code ONE_MINUS_DST_ALPHA}. */
91      @JsxConstant
92      public static final int ONE_MINUS_DST_ALPHA = 0x0305;
93      /** The constant {@code DST_COLOR}. */
94      @JsxConstant
95      public static final int DST_COLOR = 0x0306;
96      /** The constant {@code ONE_MINUS_DST_COLOR}. */
97      @JsxConstant
98      public static final int ONE_MINUS_DST_COLOR = 0x0307;
99      /** The constant {@code SRC_ALPHA_SATURATE}. */
100     @JsxConstant
101     public static final int SRC_ALPHA_SATURATE = 0x0308;
102     /** The constant {@code CONSTANT_COLOR}. */
103     @JsxConstant
104     public static final int CONSTANT_COLOR = 0x8001;
105     /** The constant {@code ONE_MINUS_CONSTANT_COLOR}. */
106     @JsxConstant
107     public static final int ONE_MINUS_CONSTANT_COLOR = 0x8002;
108     /** The constant {@code CONSTANT_ALPHA}. */
109     @JsxConstant
110     public static final int CONSTANT_ALPHA = 0x8003;
111     /** The constant {@code ONE_MINUS_CONSTANT_ALPHA}. */
112     @JsxConstant
113     public static final int ONE_MINUS_CONSTANT_ALPHA = 0x8004;
114 
115     /** The constant {@code FUNC_ADD}. */
116     @JsxConstant
117     public static final int FUNC_ADD = 0x8006;
118     /** The constant {@code FUNC_REVERSE_SUBTRACT}. */
119     @JsxConstant
120     public static final int FUNC_REVERSE_SUBTRACT = 0x800B;
121 
122     /** The constant {@code BLEND_EQUATION}. */
123     @JsxConstant
124     public static final int BLEND_EQUATION = 0x8009;
125     /** The constant {@code BLEND_EQUATION_RGB}. */
126     @JsxConstant
127     public static final int BLEND_EQUATION_RGB = 0x8009;
128     /** The constant {@code BLEND_EQUATION_ALPHA}. */
129     @JsxConstant
130     public static final int BLEND_EQUATION_ALPHA = 0x883D;
131     /** The constant {@code BLEND_DST_RGB}. */
132     @JsxConstant
133     public static final int BLEND_DST_RGB = 0x80C8;
134 
135     /** The constant {@code NO_ERROR}. */
136     @JsxConstant
137     public static final int NO_ERROR = 0x0;
138     /** The constant {@code NONE}. */
139     @JsxConstant
140     public static final int NONE = 0x0;
141     /** The constant {@code NEVER}. */
142     @JsxConstant
143     public static final int NEVER = 0x0200;
144     /** The constant {@code LESS}. */
145     @JsxConstant
146     public static final int LESS = 0x0201;
147     /** The constant {@code EQUAL}. */
148     @JsxConstant
149     public static final int EQUAL = 0x0202;
150     /** The constant {@code LEQUAL}. */
151     @JsxConstant
152     public static final int LEQUAL = 0x0203;
153     /** The constant {@code GREATER}. */
154     @JsxConstant
155     public static final int GREATER = 0x0204;
156     /** The constant {@code NOTEQUAL}. */
157     @JsxConstant
158     public static final int NOTEQUAL = 0x0205;
159     /** The constant {@code GEQUAL}. */
160     @JsxConstant
161     public static final int GEQUAL = 0x0206;
162     /** The constant {@code ALWAYS}. */
163     @JsxConstant
164     public static final int ALWAYS = 0x0207;
165     /** The constant {@code FRONT}. */
166     @JsxConstant
167     public static final int FRONT = 0x0404;
168     /** The constant {@code BACK}. */
169     @JsxConstant
170     public static final int BACK = 0x0405;
171     /** The constant {@code FRONT_AND_BACK}. */
172     @JsxConstant
173     public static final int FRONT_AND_BACK = 0x0408;
174     /** The constant {@code INVALID_ENUM}. */
175     @JsxConstant
176     public static final int INVALID_ENUM = 0x0500;
177     /** The constant {@code INVALID_VALUE}. */
178     @JsxConstant
179     public static final int INVALID_VALUE = 0x0501;
180     /** The constant {@code INVALID_OPERATION}. */
181     @JsxConstant
182     public static final int INVALID_OPERATION = 0x0502;
183     /** The constant {@code OUT_OF_MEMORY}. */
184     @JsxConstant
185     public static final int OUT_OF_MEMORY = 0x0505;
186     /** The constant {@code INVALID_FRAMEBUFFER_OPERATION}. */
187     @JsxConstant
188     public static final int INVALID_FRAMEBUFFER_OPERATION = 0x0506;
189     /** The constant {@code CW}. */
190     @JsxConstant
191     public static final int CW = 0x0900;
192     /** The constant {@code CCW}. */
193     @JsxConstant
194     public static final int CCW = 0x0901;
195     /** The constant {@code LINE_WIDTH}. */
196     @JsxConstant
197     public static final int LINE_WIDTH = 0x0B21;
198     /** The constant {@code CULL_FACE}. */
199     @JsxConstant
200     public static final int CULL_FACE = 0x0B44;
201     /** The constant {@code CULL_FACE_MODE}. */
202     @JsxConstant
203     public static final int CULL_FACE_MODE = 0x0B45;
204     /** The constant {@code FRONT_FACE}. */
205     @JsxConstant
206     public static final int FRONT_FACE = 0x0B46;
207     /** The constant {@code DEPTH_RANGE}. */
208     @JsxConstant
209     public static final int DEPTH_RANGE = 0x0B70;
210     /** The constant {@code DEPTH_TEST}. */
211     @JsxConstant
212     public static final int DEPTH_TEST = 0x0B71;
213     /** The constant {@code DEPTH_WRITEMASK}. */
214     @JsxConstant
215     public static final int DEPTH_WRITEMASK = 0x0B72;
216     /** The constant {@code DEPTH_CLEAR_VALUE}. */
217     @JsxConstant
218     public static final int DEPTH_CLEAR_VALUE = 0x0B73;
219     /** The constant {@code DEPTH_FUNC}. */
220     @JsxConstant
221     public static final int DEPTH_FUNC = 0x0B74;
222     /** The constant {@code STENCIL_TEST}. */
223     @JsxConstant
224     public static final int STENCIL_TEST = 0x0B90;
225     /** The constant {@code STENCIL_CLEAR_VALUE}. */
226     @JsxConstant
227     public static final int STENCIL_CLEAR_VALUE = 0x0B91;
228     /** The constant {@code STENCIL_FUNC}. */
229     @JsxConstant
230     public static final int STENCIL_FUNC = 0x0B92;
231     /** The constant {@code STENCIL_VALUE_MASK}. */
232     @JsxConstant
233     public static final int STENCIL_VALUE_MASK = 0x0B93;
234     /** The constant {@code STENCIL_FAIL}. */
235     @JsxConstant
236     public static final int STENCIL_FAIL = 0x0B94;
237     /** The constant {@code STENCIL_PASS_DEPTH_FAIL}. */
238     @JsxConstant
239     public static final int STENCIL_PASS_DEPTH_FAIL = 0x0B95;
240     /** The constant {@code STENCIL_PASS_DEPTH_PASS}. */
241     @JsxConstant
242     public static final int STENCIL_PASS_DEPTH_PASS = 0x0B96;
243     /** The constant {@code STENCIL_REF}. */
244     @JsxConstant
245     public static final int STENCIL_REF = 0x0B97;
246     /** The constant {@code STENCIL_WRITEMASK}. */
247     @JsxConstant
248     public static final int STENCIL_WRITEMASK = 0x0B98;
249     /** The constant {@code VIEWPORT}. */
250     @JsxConstant
251     public static final int VIEWPORT = 0x0BA2;
252     /** The constant {@code DITHER}. */
253     @JsxConstant
254     public static final int DITHER = 0x0BD0;
255     /** The constant {@code BLEND}. */
256     @JsxConstant
257     public static final int BLEND = 0x0BE2;
258     /** The constant {@code SCISSOR_BOX}. */
259     @JsxConstant
260     public static final int SCISSOR_BOX = 0x0C10;
261     /** The constant {@code SCISSOR_TEST}. */
262     @JsxConstant
263     public static final int SCISSOR_TEST = 0x0C11;
264     /** The constant {@code COLOR_CLEAR_VALUE}. */
265     @JsxConstant
266     public static final int COLOR_CLEAR_VALUE = 0x0C22;
267     /** The constant {@code COLOR_WRITEMASK}. */
268     @JsxConstant
269     public static final int COLOR_WRITEMASK = 0x0C23;
270     /** The constant {@code UNPACK_ALIGNMENT}. */
271     @JsxConstant
272     public static final int UNPACK_ALIGNMENT = 0x0Cf5;
273     /** The constant {@code PACK_ALIGNMENT}. */
274     @JsxConstant
275     public static final int PACK_ALIGNMENT = 0x0D05;
276     /** The constant {@code MAX_TEXTURE_SIZE}. */
277     @JsxConstant
278     public static final int MAX_TEXTURE_SIZE = 0x0D33;
279     /** The constant {@code MAX_VIEWPORT_DIMS}. */
280     @JsxConstant
281     public static final int MAX_VIEWPORT_DIMS = 0x0D3A;
282     /** The constant {@code SUBPIXEL_BITS}. */
283     @JsxConstant
284     public static final int SUBPIXEL_BITS = 0x0D50;
285     /** The constant {@code RED_BITS}. */
286     @JsxConstant
287     public static final int RED_BITS = 0x0D52;
288     /** The constant {@code GREEN_BITS}. */
289     @JsxConstant
290     public static final int GREEN_BITS = 0x0D53;
291     /** The constant {@code BLUE_BITS}. */
292     @JsxConstant
293     public static final int BLUE_BITS = 0x0D54;
294     /** The constant {@code ALPHA_BITS}. */
295     @JsxConstant
296     public static final int ALPHA_BITS = 0x0D55;
297     /** The constant {@code DEPTH_BITS}. */
298     @JsxConstant
299     public static final int DEPTH_BITS = 0x0D56;
300     /** The constant {@code STENCIL_BITS}. */
301     @JsxConstant
302     public static final int STENCIL_BITS = 0x0D57;
303     /** The constant {@code TEXTURE_2D}. */
304     @JsxConstant
305     public static final int TEXTURE_2D = 0x0DE1;
306     /** The constant {@code DONT_CARE}. */
307     @JsxConstant
308     public static final int DONT_CARE = 0x1100;
309     /** The constant {@code FASTEST}. */
310     @JsxConstant
311     public static final int FASTEST = 0x1101;
312     /** The constant {@code NICEST}. */
313     @JsxConstant
314     public static final int NICEST = 0x1102;
315     /** The constant {@code BYTE}. */
316     @JsxConstant
317     public static final int BYTE = 0x1400;
318     /** The constant {@code UNSIGNED_BYTE}. */
319     @JsxConstant
320     public static final int UNSIGNED_BYTE = 0x1401;
321     /** The constant {@code SHORT}. */
322     @JsxConstant
323     public static final int SHORT = 0x1402;
324     /** The constant {@code UNSIGNED_SHORT}. */
325     @JsxConstant
326     public static final int UNSIGNED_SHORT = 0x1403;
327     /** The constant {@code INT}. */
328     @JsxConstant
329     public static final int INT = 0x1404;
330     /** The constant {@code UNSIGNED_INT}. */
331     @JsxConstant
332     public static final int UNSIGNED_INT = 0x1405;
333     /** The constant {@code FLOAT}. */
334     @JsxConstant
335     public static final int FLOAT = 0x1406;
336     /** The constant {@code INVERT}. */
337     @JsxConstant
338     public static final int INVERT = 0x150A;
339     /** The constant {@code TEXTURE}. */
340     @JsxConstant
341     public static final int TEXTURE = 0x1702;
342     /** The constant {@code DEPTH_COMPONENT}. */
343     @JsxConstant
344     public static final int DEPTH_COMPONENT = 0x1902;
345     /** The constant {@code ALPHA}. */
346     @JsxConstant
347     public static final int ALPHA = 0x1906;
348     /** The constant {@code RGB}. */
349     @JsxConstant
350     public static final int RGB = 0x1907;
351     /** The constant {@code RGBA}. */
352     @JsxConstant
353     public static final int RGBA = 0x1908;
354     /** The constant {@code LUMINANCE}. */
355     @JsxConstant
356     public static final int LUMINANCE = 0x1909;
357     /** The constant {@code LUMINANCE_ALPHA}. */
358     @JsxConstant
359     public static final int LUMINANCE_ALPHA = 0x190A;
360     /** The constant {@code KEEP}. */
361     @JsxConstant
362     public static final int KEEP = 0x1E00;
363     /** The constant {@code REPLACE}. */
364     @JsxConstant
365     public static final int REPLACE = 0x1E01;
366     /** The constant {@code INCR}. */
367     @JsxConstant
368     public static final int INCR = 0x1E02;
369     /** The constant {@code DECR}. */
370     @JsxConstant
371     public static final int DECR = 0x1E03;
372     /** The constant {@code VENDOR}. */
373     @JsxConstant
374     public static final int VENDOR = 0x1F00;
375     /** The constant {@code RENDERER}. */
376     @JsxConstant
377     public static final int RENDERER = 0x1F01;
378     /** The constant {@code VERSION}. */
379     @JsxConstant
380     public static final int VERSION = 0x1F02;
381     /** The constant {@code NEAREST}. */
382     @JsxConstant
383     public static final int NEAREST = 0x2600;
384     /** The constant {@code LINEAR}. */
385     @JsxConstant
386     public static final int LINEAR = 0x2601;
387     /** The constant {@code NEAREST_MIPMAP_NEAREST}. */
388     @JsxConstant
389     public static final int NEAREST_MIPMAP_NEAREST = 0x2700;
390     /** The constant {@code LINEAR_MIPMAP_NEAREST}. */
391     @JsxConstant
392     public static final int LINEAR_MIPMAP_NEAREST = 0x2701;
393     /** The constant {@code NEAREST_MIPMAP_LINEAR}. */
394     @JsxConstant
395     public static final int NEAREST_MIPMAP_LINEAR = 0x2702;
396     /** The constant {@code LINEAR_MIPMAP_LINEAR}. */
397     @JsxConstant
398     public static final int LINEAR_MIPMAP_LINEAR = 0x2703;
399     /** The constant {@code TEXTURE_MAG_FILTER}. */
400     @JsxConstant
401     public static final int TEXTURE_MAG_FILTER = 0x2800;
402     /** The constant {@code TEXTURE_MIN_FILTER}. */
403     @JsxConstant
404     public static final int TEXTURE_MIN_FILTER = 0x2801;
405     /** The constant {@code TEXTURE_WRAP_S}. */
406     @JsxConstant
407     public static final int TEXTURE_WRAP_S = 0x2802;
408     /** The constant {@code TEXTURE_WRAP_T}. */
409     @JsxConstant
410     public static final int TEXTURE_WRAP_T = 0x2803;
411     /** The constant {@code REPEAT}. */
412     @JsxConstant
413     public static final int REPEAT = 0x2901;
414     /** The constant {@code POLYGON_OFFSET_UNITS}. */
415     @JsxConstant
416     public static final int POLYGON_OFFSET_UNITS = 0x2A00;
417     /** The constant {@code BLEND_COLOR}. */
418     @JsxConstant
419     public static final int BLEND_COLOR = 0x8005;
420     /** The constant {@code FUNC_SUBTRACT}. */
421     @JsxConstant
422     public static final int FUNC_SUBTRACT = 0x800A;
423     /** The constant {@code UNSIGNED_SHORT_4_4_4_4}. */
424     @JsxConstant
425     public static final int UNSIGNED_SHORT_4_4_4_4 = 0x8033;
426     /** The constant {@code UNSIGNED_SHORT_5_5_5_1}. */
427     @JsxConstant
428     public static final int UNSIGNED_SHORT_5_5_5_1 = 0x8034;
429     /** The constant {@code POLYGON_OFFSET_FILL}. */
430     @JsxConstant
431     public static final int POLYGON_OFFSET_FILL = 0x8037;
432     /** The constant {@code POLYGON_OFFSET_FACTOR}. */
433     @JsxConstant
434     public static final int POLYGON_OFFSET_FACTOR = 0x8038;
435     /** The constant {@code RGBA4}. */
436     @JsxConstant
437     public static final int RGBA4 = 0x8056;
438     /** The constant {@code RGB8}. */
439     @JsxConstant({CHROME, EDGE})
440     public static final int RGB8 = 0x8051;
441     /** The constant {@code RGB5_A1}. */
442     @JsxConstant
443     public static final int RGB5_A1 = 0x8057;
444     /** The constant {@code RGBA8}. */
445     @JsxConstant({CHROME, EDGE})
446     public static final int RGBA8 = 0x8058;
447     /** The constant {@code TEXTURE_BINDING_2D}. */
448     @JsxConstant
449     public static final int TEXTURE_BINDING_2D = 0x8069;
450     /** The constant {@code SAMPLE_ALPHA_TO_COVERAGE}. */
451     @JsxConstant
452     public static final int SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
453     /** The constant {@code SAMPLE_COVERAGE}. */
454     @JsxConstant
455     public static final int SAMPLE_COVERAGE = 0x80A0;
456     /** The constant {@code SAMPLE_BUFFERS}. */
457     @JsxConstant
458     public static final int SAMPLE_BUFFERS = 0x80A8;
459     /** The constant {@code SAMPLES}. */
460     @JsxConstant
461     public static final int SAMPLES = 0x80A9;
462     /** The constant {@code SAMPLE_COVERAGE_VALUE}. */
463     @JsxConstant
464     public static final int SAMPLE_COVERAGE_VALUE = 0x80AA;
465     /** The constant {@code SAMPLE_COVERAGE_INVERT}. */
466     @JsxConstant
467     public static final int SAMPLE_COVERAGE_INVERT = 0x80AB;
468     /** The constant {@code BLEND_SRC_RGB}. */
469     @JsxConstant
470     public static final int BLEND_SRC_RGB = 0x80C9;
471     /** The constant {@code BLEND_DST_ALPHA}. */
472     @JsxConstant
473     public static final int BLEND_DST_ALPHA = 0x80CA;
474     /** The constant {@code BLEND_SRC_ALPHA}. */
475     @JsxConstant
476     public static final int BLEND_SRC_ALPHA = 0x80CB;
477     /** The constant {@code CLAMP_TO_EDGE}. */
478     @JsxConstant
479     public static final int CLAMP_TO_EDGE = 0x812F;
480     /** The constant {@code GENERATE_MIPMAP_HINT}. */
481     @JsxConstant
482     public static final int GENERATE_MIPMAP_HINT = 0x8192;
483     /** The constant {@code DEPTH_COMPONENT16}. */
484     @JsxConstant
485     public static final int DEPTH_COMPONENT16 = 0x81A5;
486     /** The constant {@code DEPTH_STENCIL_ATTACHMENT}. */
487     @JsxConstant
488     public static final int DEPTH_STENCIL_ATTACHMENT = 0x821A;
489     /** The constant {@code UNSIGNED_SHORT_5_6_5}. */
490     @JsxConstant
491     public static final int UNSIGNED_SHORT_5_6_5 = 0x8363;
492     /** The constant {@code MIRRORED_REPEAT}. */
493     @JsxConstant
494     public static final int MIRRORED_REPEAT = 0x8370;
495     /** The constant {@code ALIASED_POINT_SIZE_RANGE}. */
496     @JsxConstant
497     public static final int ALIASED_POINT_SIZE_RANGE = 0x846D;
498     /** The constant {@code ALIASED_LINE_WIDTH_RANGE}. */
499     @JsxConstant
500     public static final int ALIASED_LINE_WIDTH_RANGE = 0x846E;
501     /** The constant {@code TEXTURE0}. */
502     @JsxConstant
503     public static final int TEXTURE0 = 0x84C0;
504     /** The constant {@code TEXTURE1}. */
505     @JsxConstant
506     public static final int TEXTURE1 = 0x84C1;
507     /** The constant {@code TEXTURE2}. */
508     @JsxConstant
509     public static final int TEXTURE2 = 0x84C2;
510     /** The constant {@code TEXTURE3}. */
511     @JsxConstant
512     public static final int TEXTURE3 = 0x84C3;
513     /** The constant {@code TEXTURE4}. */
514     @JsxConstant
515     public static final int TEXTURE4 = 0x84C4;
516     /** The constant {@code TEXTURE5}. */
517     @JsxConstant
518     public static final int TEXTURE5 = 0x84C5;
519     /** The constant {@code TEXTURE6}. */
520     @JsxConstant
521     public static final int TEXTURE6 = 0x84C6;
522     /** The constant {@code TEXTURE7}. */
523     @JsxConstant
524     public static final int TEXTURE7 = 0x84C7;
525     /** The constant {@code TEXTURE8}. */
526     @JsxConstant
527     public static final int TEXTURE8 = 0x84C8;
528     /** The constant {@code TEXTURE9}. */
529     @JsxConstant
530     public static final int TEXTURE9 = 0x84C9;
531     /** The constant {@code TEXTURE10}. */
532     @JsxConstant
533     public static final int TEXTURE10 = 0x84CA;
534     /** The constant {@code TEXTURE11}. */
535     @JsxConstant
536     public static final int TEXTURE11 = 0x84CB;
537     /** The constant {@code TEXTURE12}. */
538     @JsxConstant
539     public static final int TEXTURE12 = 0x84CC;
540     /** The constant {@code TEXTURE13}. */
541     @JsxConstant
542     public static final int TEXTURE13 = 0x84CD;
543     /** The constant {@code TEXTURE14}. */
544     @JsxConstant
545     public static final int TEXTURE14 = 0x84CE;
546     /** The constant {@code TEXTURE15}. */
547     @JsxConstant
548     public static final int TEXTURE15 = 0x84CF;
549     /** The constant {@code TEXTURE16}. */
550     @JsxConstant
551     public static final int TEXTURE16 = 0x84D0;
552     /** The constant {@code TEXTURE17}. */
553     @JsxConstant
554     public static final int TEXTURE17 = 0x84D1;
555     /** The constant {@code TEXTURE18}. */
556     @JsxConstant
557     public static final int TEXTURE18 = 0x84D2;
558     /** The constant {@code TEXTURE19}. */
559     @JsxConstant
560     public static final int TEXTURE19 = 0x84D3;
561     /** The constant {@code TEXTURE20}. */
562     @JsxConstant
563     public static final int TEXTURE20 = 0x84D4;
564     /** The constant {@code TEXTURE21}. */
565     @JsxConstant
566     public static final int TEXTURE21 = 0x84D5;
567     /** The constant {@code TEXTURE22}. */
568     @JsxConstant
569     public static final int TEXTURE22 = 0x84D6;
570     /** The constant {@code TEXTURE23}. */
571     @JsxConstant
572     public static final int TEXTURE23 = 0x84D7;
573     /** The constant {@code TEXTURE24}. */
574     @JsxConstant
575     public static final int TEXTURE24 = 0x84D8;
576     /** The constant {@code TEXTURE25}. */
577     @JsxConstant
578     public static final int TEXTURE25 = 0x84D9;
579     /** The constant {@code TEXTURE26}. */
580     @JsxConstant
581     public static final int TEXTURE26 = 0x84DA;
582     /** The constant {@code TEXTURE27}. */
583     @JsxConstant
584     public static final int TEXTURE27 = 0x84DB;
585     /** The constant {@code TEXTURE28}. */
586     @JsxConstant
587     public static final int TEXTURE28 = 0x84DC;
588     /** The constant {@code TEXTURE29}. */
589     @JsxConstant
590     public static final int TEXTURE29 = 0x84DD;
591     /** The constant {@code TEXTURE30}. */
592     @JsxConstant
593     public static final int TEXTURE30 = 0x84DE;
594     /** The constant {@code TEXTURE31}. */
595     @JsxConstant
596     public static final int TEXTURE31 = 0x84DF;
597     /** The constant {@code ACTIVE_TEXTURE}. */
598     @JsxConstant
599     public static final int ACTIVE_TEXTURE = 0x84E0;
600     /** The constant {@code MAX_RENDERBUFFER_SIZE}. */
601     @JsxConstant
602     public static final int MAX_RENDERBUFFER_SIZE = 0x84E8;
603     /** The constant {@code DEPTH_STENCIL}. */
604     @JsxConstant
605     public static final int DEPTH_STENCIL = 0x84F9;
606     /** The constant {@code INCR_WRAP}. */
607     @JsxConstant
608     public static final int INCR_WRAP = 0x8507;
609     /** The constant {@code DECR_WRAP}. */
610     @JsxConstant
611     public static final int DECR_WRAP = 0x8508;
612     /** The constant {@code TEXTURE_CUBE_MAP}. */
613     @JsxConstant
614     public static final int TEXTURE_CUBE_MAP = 0x8513;
615     /** The constant {@code TEXTURE_BINDING_CUBE_MAP}. */
616     @JsxConstant
617     public static final int TEXTURE_BINDING_CUBE_MAP = 0x8514;
618     /** The constant {@code TEXTURE_CUBE_MAP_POSITIVE_X}. */
619     @JsxConstant
620     public static final int TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;
621     /** The constant {@code TEXTURE_CUBE_MAP_NEGATIVE_X}. */
622     @JsxConstant
623     public static final int TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;
624     /** The constant {@code TEXTURE_CUBE_MAP_POSITIVE_Y}. */
625     @JsxConstant
626     public static final int TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;
627     /** The constant {@code TEXTURE_CUBE_MAP_NEGATIVE_Y}. */
628     @JsxConstant
629     public static final int TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;
630     /** The constant {@code TEXTURE_CUBE_MAP_POSITIVE_Z}. */
631     @JsxConstant
632     public static final int TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;
633     /** The constant {@code TEXTURE_CUBE_MAP_NEGATIVE_Z}. */
634     @JsxConstant
635     public static final int TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;
636     /** The constant {@code MAX_CUBE_MAP_TEXTURE_SIZE}. */
637     @JsxConstant
638     public static final int MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;
639     /** The constant {@code VERTEX_ATTRIB_ARRAY_ENABLED}. */
640     @JsxConstant
641     public static final int VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622;
642     /** The constant {@code VERTEX_ATTRIB_ARRAY_SIZE}. */
643     @JsxConstant
644     public static final int VERTEX_ATTRIB_ARRAY_SIZE = 0x8623;
645     /** The constant {@code VERTEX_ATTRIB_ARRAY_STRIDE}. */
646     @JsxConstant
647     public static final int VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624;
648     /** The constant {@code VERTEX_ATTRIB_ARRAY_TYPE}. */
649     @JsxConstant
650     public static final int VERTEX_ATTRIB_ARRAY_TYPE = 0x8625;
651     /** The constant {@code CURRENT_VERTEX_ATTRIB}. */
652     @JsxConstant
653     public static final int CURRENT_VERTEX_ATTRIB = 0x8626;
654     /** The constant {@code VERTEX_ATTRIB_ARRAY_POINTER}. */
655     @JsxConstant
656     public static final int VERTEX_ATTRIB_ARRAY_POINTER = 0x8645;
657     /** The constant {@code COMPRESSED_TEXTURE_FORMATS}. */
658     @JsxConstant
659     public static final int COMPRESSED_TEXTURE_FORMATS = 0x86A3;
660     /** The constant {@code BUFFER_SIZE}. */
661     @JsxConstant
662     public static final int BUFFER_SIZE = 0x8764;
663     /** The constant {@code BUFFER_USAGE}. */
664     @JsxConstant
665     public static final int BUFFER_USAGE = 0x8765;
666     /** The constant {@code STENCIL_BACK_FUNC}. */
667     @JsxConstant
668     public static final int STENCIL_BACK_FUNC = 0x8800;
669     /** The constant {@code STENCIL_BACK_FAIL}. */
670     @JsxConstant
671     public static final int STENCIL_BACK_FAIL = 0x8801;
672     /** The constant {@code STENCIL_BACK_PASS_DEPTH_FAIL}. */
673     @JsxConstant
674     public static final int STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802;
675     /** The constant {@code STENCIL_BACK_PASS_DEPTH_PASS}. */
676     @JsxConstant
677     public static final int STENCIL_BACK_PASS_DEPTH_PASS = 0x8803;
678     /** The constant {@code MAX_VERTEX_ATTRIBS}. */
679     @JsxConstant
680     public static final int MAX_VERTEX_ATTRIBS = 0x8869;
681     /** The constant {@code VERTEX_ATTRIB_ARRAY_NORMALIZED}. */
682     @JsxConstant
683     public static final int VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;
684     /** The constant {@code MAX_TEXTURE_IMAGE_UNITS}. */
685     @JsxConstant
686     public static final int MAX_TEXTURE_IMAGE_UNITS = 0x8872;
687     /** The constant {@code ARRAY_BUFFER}. */
688     @JsxConstant
689     public static final int ARRAY_BUFFER = 0x8892;
690     /** The constant {@code ELEMENT_ARRAY_BUFFER}. */
691     @JsxConstant
692     public static final int ELEMENT_ARRAY_BUFFER = 0x8893;
693     /** The constant {@code ARRAY_BUFFER_BINDING}. */
694     @JsxConstant
695     public static final int ARRAY_BUFFER_BINDING = 0x8894;
696     /** The constant {@code ELEMENT_ARRAY_BUFFER_BINDING}. */
697     @JsxConstant
698     public static final int ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;
699     /** The constant {@code VERTEX_ATTRIB_ARRAY_BUFFER_BINDING}. */
700     @JsxConstant
701     public static final int VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;
702     /** The constant {@code STREAM_DRAW}. */
703     @JsxConstant
704     public static final int STREAM_DRAW = 0x88E0;
705     /** The constant {@code STATIC_DRAW}. */
706     @JsxConstant
707     public static final int STATIC_DRAW = 0x88E4;
708     /** The constant {@code DYNAMIC_DRAW}. */
709     @JsxConstant
710     public static final int DYNAMIC_DRAW = 0x88E8;
711     /** The constant {@code FRAGMENT_SHADER}. */
712     @JsxConstant
713     public static final int FRAGMENT_SHADER = 0x8B30;
714     /** The constant {@code VERTEX_SHADER}. */
715     @JsxConstant
716     public static final int VERTEX_SHADER = 0x8B31;
717     /** The constant {@code MAX_VERTEX_TEXTURE_IMAGE_UNITS}. */
718     @JsxConstant
719     public static final int MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C;
720     /** The constant {@code MAX_COMBINED_TEXTURE_IMAGE_UNITS}. */
721     @JsxConstant
722     public static final int MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D;
723     /** The constant {@code SHADER_TYPE}. */
724     @JsxConstant
725     public static final int SHADER_TYPE = 0x8B4F;
726     /** The constant {@code FLOAT_VEC2}. */
727     @JsxConstant
728     public static final int FLOAT_VEC2 = 0x8B50;
729     /** The constant {@code FLOAT_VEC3}. */
730     @JsxConstant
731     public static final int FLOAT_VEC3 = 0x8B51;
732     /** The constant {@code FLOAT_VEC4}. */
733     @JsxConstant
734     public static final int FLOAT_VEC4 = 0x8B52;
735     /** The constant {@code INT_VEC2}. */
736     @JsxConstant
737     public static final int INT_VEC2 = 0x8B53;
738     /** The constant {@code INT_VEC3}. */
739     @JsxConstant
740     public static final int INT_VEC3 = 0x8B54;
741     /** The constant {@code INT_VEC4}. */
742     @JsxConstant
743     public static final int INT_VEC4 = 0x8B55;
744     /** The constant {@code BOOL}. */
745     @JsxConstant
746     public static final int BOOL = 0x8B56;
747     /** The constant {@code BOOL_VEC2}. */
748     @JsxConstant
749     public static final int BOOL_VEC2 = 0x8B57;
750     /** The constant {@code BOOL_VEC3}. */
751     @JsxConstant
752     public static final int BOOL_VEC3 = 0x8B58;
753     /** The constant {@code BOOL_VEC4}. */
754     @JsxConstant
755     public static final int BOOL_VEC4 = 0x8B59;
756     /** The constant {@code FLOAT_MAT2}. */
757     @JsxConstant
758     public static final int FLOAT_MAT2 = 0x8B5A;
759     /** The constant {@code FLOAT_MAT3}. */
760     @JsxConstant
761     public static final int FLOAT_MAT3 = 0x8B5B;
762     /** The constant {@code FLOAT_MAT4}. */
763     @JsxConstant
764     public static final int FLOAT_MAT4 = 0x8B5C;
765     /** The constant {@code SAMPLER_2D}. */
766     @JsxConstant
767     public static final int SAMPLER_2D = 0x8B5E;
768     /** The constant {@code SAMPLER_CUBE}. */
769     @JsxConstant
770     public static final int SAMPLER_CUBE = 0x8B60;
771     /** The constant {@code DELETE_STATUS}. */
772     @JsxConstant
773     public static final int DELETE_STATUS = 0x8B80;
774     /** The constant {@code COMPILE_STATUS}. */
775     @JsxConstant
776     public static final int COMPILE_STATUS = 0x8B81;
777     /** The constant {@code LINK_STATUS}. */
778     @JsxConstant
779     public static final int LINK_STATUS = 0x8B82;
780     /** The constant {@code VALIDATE_STATUS}. */
781     @JsxConstant
782     public static final int VALIDATE_STATUS = 0x8B83;
783     /** The constant {@code ATTACHED_SHADERS}. */
784     @JsxConstant
785     public static final int ATTACHED_SHADERS = 0x8B85;
786     /** The constant {@code ACTIVE_UNIFORMS}. */
787     @JsxConstant
788     public static final int ACTIVE_UNIFORMS = 0x8B86;
789     /** The constant {@code ACTIVE_ATTRIBUTES}. */
790     @JsxConstant
791     public static final int ACTIVE_ATTRIBUTES = 0x8B89;
792     /** The constant {@code SHADING_LANGUAGE_VERSION}. */
793     @JsxConstant
794     public static final int SHADING_LANGUAGE_VERSION = 0x8B8C;
795     /** The constant {@code CURRENT_PROGRAM}. */
796     @JsxConstant
797     public static final int CURRENT_PROGRAM = 0x8B8D;
798     /** The constant {@code IMPLEMENTATION_COLOR_READ_TYPE}. */
799     @JsxConstant
800     public static final int IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A;
801     /** The constant {@code IMPLEMENTATION_COLOR_READ_FORMAT}. */
802     @JsxConstant
803     public static final int IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B;
804     /** The constant {@code STENCIL_BACK_REF}. */
805     @JsxConstant
806     public static final int STENCIL_BACK_REF = 0x8CA3;
807     /** The constant {@code STENCIL_BACK_VALUE_MASK}. */
808     @JsxConstant
809     public static final int STENCIL_BACK_VALUE_MASK = 0x8CA4;
810     /** The constant {@code STENCIL_BACK_WRITEMASK}. */
811     @JsxConstant
812     public static final int STENCIL_BACK_WRITEMASK = 0x8CA5;
813     /** The constant {@code FRAMEBUFFER_BINDING}. */
814     @JsxConstant
815     public static final int FRAMEBUFFER_BINDING = 0x8CA6;
816     /** The constant {@code RENDERBUFFER_BINDING}. */
817     @JsxConstant
818     public static final int RENDERBUFFER_BINDING = 0x8CA7;
819     /** The constant {@code FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}. */
820     @JsxConstant
821     public static final int FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0;
822     /** The constant {@code FRAMEBUFFER_ATTACHMENT_OBJECT_NAME}. */
823     @JsxConstant
824     public static final int FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1;
825     /** The constant {@code FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL}. */
826     @JsxConstant
827     public static final int FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2;
828     /** The constant {@code FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE}. */
829     @JsxConstant
830     public static final int FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3;
831     /** The constant {@code FRAMEBUFFER_COMPLETE}. */
832     @JsxConstant
833     public static final int FRAMEBUFFER_COMPLETE = 0x8CD5;
834     /** The constant {@code FRAMEBUFFER_INCOMPLETE_ATTACHMENT}. */
835     @JsxConstant
836     public static final int FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6;
837     /** The constant {@code FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT}. */
838     @JsxConstant
839     public static final int FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7;
840     /** The constant {@code FRAMEBUFFER_INCOMPLETE_DIMENSIONS}. */
841     @JsxConstant
842     public static final int FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9;
843     /** The constant {@code FRAMEBUFFER_UNSUPPORTED}. */
844     @JsxConstant
845     public static final int FRAMEBUFFER_UNSUPPORTED = 0x8CDD;
846     /** The constant {@code COLOR_ATTACHMENT0}. */
847     @JsxConstant
848     public static final int COLOR_ATTACHMENT0 = 0x8ce0;
849     /** The constant {@code DEPTH_ATTACHMENT}. */
850     @JsxConstant
851     public static final int DEPTH_ATTACHMENT = 0x8D00;
852     /** The constant {@code STENCIL_ATTACHMENT}. */
853     @JsxConstant
854     public static final int STENCIL_ATTACHMENT = 0x8D20;
855     /** The constant {@code FRAMEBUFFER}. */
856     @JsxConstant
857     public static final int FRAMEBUFFER = 0x8D40;
858     /** The constant {@code RENDERBUFFER}. */
859     @JsxConstant
860     public static final int RENDERBUFFER = 0x8D41;
861     /** The constant {@code RENDERBUFFER_WIDTH}. */
862     @JsxConstant
863     public static final int RENDERBUFFER_WIDTH = 0x8D42;
864     /** The constant {@code RENDERBUFFER_HEIGHT}. */
865     @JsxConstant
866     public static final int RENDERBUFFER_HEIGHT = 0x8D43;
867     /** The constant {@code RENDERBUFFER_INTERNAL_FORMAT}. */
868     @JsxConstant
869     public static final int RENDERBUFFER_INTERNAL_FORMAT = 0x8D44;
870     /** The constant {@code STENCIL_INDEX8}. */
871     @JsxConstant
872     public static final int STENCIL_INDEX8 = 0x8D48;
873     /** The constant {@code RENDERBUFFER_RED_SIZE}. */
874     @JsxConstant
875     public static final int RENDERBUFFER_RED_SIZE = 0x8D50;
876     /** The constant {@code RENDERBUFFER_GREEN_SIZE}. */
877     @JsxConstant
878     public static final int RENDERBUFFER_GREEN_SIZE = 0x8D51;
879     /** The constant {@code RENDERBUFFER_BLUE_SIZE}. */
880     @JsxConstant
881     public static final int RENDERBUFFER_BLUE_SIZE = 0x8D52;
882     /** The constant {@code RENDERBUFFER_ALPHA_SIZE}. */
883     @JsxConstant
884     public static final int RENDERBUFFER_ALPHA_SIZE = 0x8D53;
885     /** The constant {@code RENDERBUFFER_DEPTH_SIZE}. */
886     @JsxConstant
887     public static final int RENDERBUFFER_DEPTH_SIZE = 0x8D54;
888     /** The constant {@code RENDERBUFFER_STENCIL_SIZE}. */
889     @JsxConstant
890     public static final int RENDERBUFFER_STENCIL_SIZE = 0x8D55;
891     /** The constant {@code RGB565}. */
892     @JsxConstant
893     public static final int RGB565 = 0x8D62;
894     /** The constant {@code LOW_FLOAT}. */
895     @JsxConstant
896     public static final int LOW_FLOAT = 0x8DF0;
897     /** The constant {@code MEDIUM_FLOAT}. */
898     @JsxConstant
899     public static final int MEDIUM_FLOAT = 0x8DF1;
900     /** The constant {@code HIGH_FLOAT}. */
901     @JsxConstant
902     public static final int HIGH_FLOAT = 0x8DF2;
903     /** The constant {@code LOW_INT}. */
904     @JsxConstant
905     public static final int LOW_INT = 0x8DF3;
906     /** The constant {@code MEDIUM_INT}. */
907     @JsxConstant
908     public static final int MEDIUM_INT = 0x8DF4;
909     /** The constant {@code HIGH_INT}. */
910     @JsxConstant
911     public static final int HIGH_INT = 0x8DF5;
912     /** The constant {@code MAX_VERTEX_UNIFORM_VECTORS}. */
913     @JsxConstant
914     public static final int MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB;
915     /** The constant {@code MAX_VARYING_VECTORS}. */
916     @JsxConstant
917     public static final int MAX_VARYING_VECTORS = 0x8DFC;
918     /** The constant {@code MAX_FRAGMENT_UNIFORM_VECTORS}. */
919     @JsxConstant
920     public static final int MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD;
921     /** The constant {@code UNPACK_FLIP_Y_WEBGL}. */
922     @JsxConstant
923     public static final int UNPACK_FLIP_Y_WEBGL = 0x9240;
924     /** The constant {@code UNPACK_PREMULTIPLY_ALPHA_WEBGL}. */
925     @JsxConstant
926     public static final int UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241;
927     /** The constant {@code CONTEXT_LOST_WEBGL}. */
928     @JsxConstant
929     public static final int CONTEXT_LOST_WEBGL = 0x9242;
930     /** The constant {@code UNPACK_COLORSPACE_CONVERSION_WEBGL}. */
931     @JsxConstant
932     public static final int UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243;
933     /** The constant {@code BROWSER_DEFAULT_WEBGL}. */
934     @JsxConstant
935     public static final int BROWSER_DEFAULT_WEBGL = 0x9244;
936 
937     /**
938      * Creates an instance.
939      */
940     @JsxConstructor
941     public void jsConstructor() {
942         throw JavaScriptEngine.typeErrorIllegalConstructor();
943     }
944 }