forked from serjIII/threejsSDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Constants.html
3952 lines (3950 loc) · 271 KB
/
Constants.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html><html lang="en-US" prefix="og: https://ogp.me/ns#"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link rel="icon" href="/favicon-48x48.cbbd161b.png"/><link rel="apple-touch-icon" href="/apple-touch-icon.6803c6f0.png"/><meta name="theme-color" content="#ffffff"/><link rel="manifest" href="/manifest.56b1cedc.json"/><link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="MDN Web Docs"/><title>WebGL constants - Web APIs | MDN</title><link rel="alternate" title="WebGL の定数" href="https://developer.mozilla.org/ja/docs/Web/API/WebGL_API/Constants" hreflang="ja"/><link rel="alternate" title="WebGL 相关常量" href="https://developer.mozilla.org/zh-CN/docs/Web/API/WebGL_API/Constants" hreflang="zh"/><link rel="alternate" title="WebGL constants" href="https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants" hreflang="en"/><link rel="alternate" type="application/rss+xml" title="MDN Blog RSS Feed" href="/en-US/blog/rss.xml" hreflang="en" /><meta name="robots" content="index, follow"><meta name="description" content="The WebGL API provides several constants that are passed into or returned by functions. All constants are of type GLenum."/><meta property="og:url" content="https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants"/><meta property="og:title" content="WebGL constants - Web APIs | MDN"/><meta property="og:locale" content="en-US"/><meta property="og:description" content="The WebGL API provides several constants that are passed into or returned by functions. All constants are of type GLenum."/><meta property="og:image" content="https://developer.mozilla.org/mdn-social-share.cd6c4a5a.png"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:creator" content="MozDevNet"/><link rel="canonical" href="https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants"/><style media="print">.article-actions-container,.document-toc-container,.language-menu,.main-menu-toggle,.mdn-cta-container,.on-github,.page-footer,.place,.sidebar,.top-banner,.top-navigation-main,ul.prev-next{display:none!important}.main-page-content,.main-page-content pre{padding:2px}.main-page-content pre{border-left-width:2px}</style><script src="/static/js/ga.js" defer=""></script><script defer="defer" src="/static/js/main.8f7f874e.js"></script><link href="/static/css/main.76ba4ef8.css" rel="stylesheet"></head><body><script>document.body.addEventListener("load",(t=>{t.target.classList.contains("interactive")&&t.target.setAttribute("data-readystate","complete")}),{capture:!0});const c={light:"#ffffff",dark:"#1b1b1b"};if(window&&document.documentElement)try{const t=window.localStorage.getItem("theme");t&&(document.documentElement.className=t,document.documentElement.style.backgroundColor=c[t])}catch(t){console.warn("Unable to read theme from localStorage",t)}</script><div id="root"><ul id="nav-access" class="a11y-nav"><li><a id="skip-main" href="#content">Skip to main content</a></li><li><a id="skip-search" href="#top-nav-search-input">Skip to search</a></li><li><a id="skip-select-language" href="#languages-switcher-button">Skip to select language</a></li></ul><div class="page-wrapper category-api document-page"><div class="top-banner loading"><section class="place top container"></section></div><div class="main-document-header-container"><header class="top-navigation
"><div class="container "><div class="top-navigation-wrap"><a href="/en-US/" class="logo" aria-label="MDN homepage"><svg id="mdn-docs-logo" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 694.9 104.4" style="enable-background:new 0 0 694.9 104.4" xml:space="preserve" role="img"><title>MDN Web Docs</title><path d="M40.3 0 11.7 92.1H0L28.5 0h11.8zm10.4 0v92.1H40.3V0h10.4zM91 0 62.5 92.1H50.8L79.3 0H91zm10.4 0v92.1H91V0h10.4z" class="logo-m"></path><path d="M627.9 95.6h67v8.8h-67v-8.8z" class="logo-_"></path><path d="M367 42h-4l-10.7 30.8h-5.5l-10.8-26h-.4l-10.5 26h-5.2L308.7 42h-3.8v-5.6H323V42h-6.5l6.8 20.4h.4l10.3-26h4.7l11.2 26h.5l5.7-20.3h-6.2v-5.6H367V42zm34.9 20c-.4 3.2-2 5.9-4.7 8.2-2.8 2.3-6.5 3.4-11.3 3.4-5.4 0-9.7-1.6-13.1-4.7-3.3-3.2-5-7.7-5-13.7 0-5.7 1.6-10.3 4.7-14s7.4-5.5 12.9-5.5c5.1 0 9.1 1.6 11.9 4.7s4.3 6.9 4.3 11.3c0 1.5-.2 3-.5 4.7h-25.6c.3 7.7 4 11.6 10.9 11.6 2.9 0 5.1-.7 6.5-2 1.5-1.4 2.5-3 3-4.9l6 .9zM394 51.3c.2-2.4-.4-4.7-1.8-6.9s-3.8-3.3-7-3.3c-3.1 0-5.3 1-6.9 3-1.5 2-2.5 4.4-2.8 7.2H394zm51 2.4c0 5-1.3 9.5-4 13.7s-6.9 6.2-12.7 6.2c-6 0-10.3-2.2-12.7-6.7-.1.4-.2 1.4-.4 2.9s-.3 2.5-.4 2.9h-7.3c.3-1.7.6-3.5.8-5.3.3-1.8.4-3.7.4-5.5V22.3h-6v-5.6H416v27c1.1-2.2 2.7-4.1 4.7-5.7 2-1.6 4.8-2.4 8.4-2.4 4.6 0 8.4 1.6 11.4 4.7 3 3.2 4.5 7.6 4.5 13.4zm-7.7.6c0-4.2-1-7.4-3-9.5-2-2.2-4.4-3.3-7.4-3.3-3.4 0-6 1.2-8 3.7-1.9 2.4-2.9 5-3 7.7V57c0 3 1 5.6 3 7.7s4.5 3.1 7.6 3.1c3.6 0 6.3-1.3 8.1-3.9 1.8-2.7 2.7-5.9 2.7-9.6zm69.2 18.5h-13.2v-7.2c-1.2 2.2-2.8 4.1-4.9 5.6-2.1 1.6-4.8 2.4-8.3 2.4-4.8 0-8.7-1.6-11.6-4.9-2.9-3.2-4.3-7.7-4.3-13.3 0-5 1.3-9.6 4-13.7 2.6-4.1 6.9-6.2 12.8-6.2 5.7 0 9.8 2.2 12.3 6.5V22.3h-8.6v-5.6h15.8v50.6h6v5.5zM493.2 56v-4.4c-.1-3-1.2-5.5-3.2-7.3s-4.4-2.8-7.2-2.8c-3.6 0-6.3 1.3-8.2 3.9-1.9 2.6-2.8 5.8-2.8 9.6 0 4.1 1 7.3 3 9.5s4.5 3.3 7.4 3.3c3.2 0 5.8-1.3 7.8-3.8 2.1-2.6 3.1-5.3 3.2-8zm53.1-1.4c0 5.6-1.8 10.2-5.3 13.7s-8.2 5.3-13.9 5.3-10.1-1.7-13.4-5.1c-3.3-3.4-5-7.9-5-13.5 0-5.3 1.6-9.9 4.7-13.7 3.2-3.8 7.9-5.7 14.2-5.7s11 1.9 14.1 5.7c3 3.7 4.6 8.1 4.6 13.3zm-7.7-.2c0-4-1-7.2-3-9.5s-4.8-3.5-8.2-3.5c-3.6 0-6.4 1.2-8.3 3.7s-2.9 5.6-2.9 9.5c0 3.7.9 6.8 2.8 9.4 1.9 2.6 4.6 3.9 8.3 3.9 3.6 0 6.4-1.3 8.4-3.8 1.9-2.6 2.9-5.8 2.9-9.7zm45 5.8c-.4 3.2-1.9 6.3-4.4 9.1-2.5 2.9-6.4 4.3-11.8 4.3-5.2 0-9.4-1.6-12.6-4.8-3.2-3.2-4.8-7.7-4.8-13.7 0-5.5 1.6-10.1 4.7-13.9 3.2-3.8 7.6-5.7 13.2-5.7 2.3 0 4.6.3 6.7.8 2.2.5 4.2 1.5 6.2 2.9l1.5 9.5-5.9.7-1.3-6.1c-2.1-1.2-4.5-1.8-7.2-1.8-3.5 0-6.1 1.2-7.7 3.7-1.7 2.5-2.5 5.7-2.5 9.6 0 4.1.9 7.3 2.7 9.5 1.8 2.3 4.4 3.4 7.8 3.4 5.2 0 8.2-2.9 9.2-8.8l6.2 1.3zm34.7 1.9c0 3.6-1.5 6.5-4.6 8.5s-7 3-11.7 3c-5.7 0-10.6-1.2-14.6-3.6l1.2-8.8 5.7.6-.2 4.7c1.1.5 2.3.9 3.6 1.1s2.6.3 3.9.3c2.4 0 4.5-.4 6.5-1.3 1.9-.9 2.9-2.2 2.9-4.1 0-1.8-.8-3.1-2.3-3.8s-3.5-1.3-5.8-1.7-4.6-.9-6.9-1.4c-2.3-.6-4.2-1.6-5.7-2.9-1.6-1.4-2.3-3.5-2.3-6.3 0-4.1 1.5-6.9 4.6-8.5s6.4-2.4 9.9-2.4c2.6 0 5 .3 7.2.9 2.2.6 4.3 1.4 6.1 2.4l.8 8.8-5.8.7-.8-5.7c-2.3-1-4.7-1.6-7.2-1.6-2.1 0-3.7.4-5.1 1.1-1.3.8-2 2-2 3.8 0 1.7.8 2.9 2.3 3.6 1.5.7 3.4 1.2 5.7 1.6 2.2.4 4.5.8 6.7 1.4 2.2.6 4.1 1.6 5.7 3 1.4 1.6 2.2 3.7 2.2 6.6zM197.6 73.2h-17.1v-5.5h3.8V51.9c0-3.7-.7-6.3-2.1-7.9-1.4-1.6-3.3-2.3-5.7-2.3-3.2 0-5.6 1.1-7.2 3.4s-2.4 4.6-2.5 6.9v15.6h6v5.5h-17.1v-5.5h3.8V51.9c0-3.8-.7-6.4-2.1-7.9-1.4-1.5-3.3-2.3-5.6-2.3-3.2 0-5.5 1.1-7.2 3.3-1.6 2.2-2.4 4.5-2.5 6.9v15.8h6.9v5.5h-20.2v-5.5h6V42.4h-6.1v-5.6h13.4v6.4c1.2-2.1 2.7-3.8 4.7-5.2 2-1.3 4.4-2 7.3-2s5.3.7 7.5 2.1c2.2 1.4 3.7 3.5 4.5 6.4 1.1-2.5 2.7-4.5 4.9-6.1s4.8-2.4 7.9-2.4c3.5 0 6.5 1.1 8.9 3.3s3.7 5.6 3.7 10.2v18.2h6.1v5.5zm42.5 0h-13.2V66c-1.2 2.2-2.8 4.1-4.9 5.6-2.1 1.6-4.8 2.4-8.3 2.4-4.8 0-8.7-1.6-11.6-4.9-2.9-3.2-4.3-7.7-4.3-13.3 0-5 1.3-9.6 4-13.7 2.6-4.1 6.9-6.2 12.8-6.2s9.8 2.2 12.3 6.5V22.7h-8.6v-5.6h15.8v50.6h6v5.5zm-13.3-16.8V52c-.1-3-1.2-5.5-3.2-7.3s-4.4-2.8-7.2-2.8c-3.6 0-6.3 1.3-8.2 3.9-1.9 2.6-2.8 5.8-2.8 9.6 0 4.1 1 7.3 3 9.5s4.5 3.3 7.4 3.3c3.2 0 5.8-1.3 7.8-3.8 2.1-2.6 3.1-5.3 3.2-8zm61.5 16.8H269v-5.5h6V51.9c0-3.7-.7-6.3-2.2-7.9-1.4-1.6-3.4-2.3-5.7-2.3-3.1 0-5.6 1-7.4 3s-2.8 4.4-2.9 7v15.9h6v5.5h-19.3v-5.5h6V42.4h-6.2v-5.6h13.6V43c2.6-4.6 6.8-6.9 12.7-6.9 3.6 0 6.7 1.1 9.2 3.3s3.7 5.6 3.7 10.2v18.2h6v5.4h-.2z" class="logo-text"></path></svg></a><button title="Open main menu" type="button" class="button action has-icon main-menu-toggle" aria-haspopup="menu" aria-label="Open main menu" aria-expanded="false"><span class="button-wrap"><span class="icon icon-menu "></span><span class="visually-hidden">Open main menu</span></span></button></div><div class="top-navigation-main"><nav class="main-nav" aria-label="Main menu"><ul class="main-menu nojs"><li class="top-level-entry-container"><button type="button" id="references-button" class="top-level-entry menu-toggle" aria-controls="references-menu" aria-expanded="false">References</button><a href="/en-US/docs/Web" class="top-level-entry">References</a><ul id="references-menu" class="submenu references hidden inline-submenu-lg" aria-labelledby="references-button"><li class="apis-link-container mobile-only "><a href="/en-US/docs/Web" class="submenu-item "><div class="submenu-icon"></div><div class="submenu-content-container"><div class="submenu-item-heading">Overview / Web Technology</div><p class="submenu-item-description">Web technology reference for developers</p></div></a></li><li class="html-link-container "><a href="/en-US/docs/Web/HTML" class="submenu-item "><div class="submenu-icon html"></div><div class="submenu-content-container"><div class="submenu-item-heading">HTML</div><p class="submenu-item-description">Structure of content on the web</p></div></a></li><li class="css-link-container "><a href="/en-US/docs/Web/CSS" class="submenu-item "><div class="submenu-icon css"></div><div class="submenu-content-container"><div class="submenu-item-heading">CSS</div><p class="submenu-item-description">Code used to describe document style</p></div></a></li><li class="javascript-link-container "><a href="/en-US/docs/Web/JavaScript" class="submenu-item "><div class="submenu-icon javascript"></div><div class="submenu-content-container"><div class="submenu-item-heading">JavaScript</div><p class="submenu-item-description">General-purpose scripting language</p></div></a></li><li class="http-link-container "><a href="/en-US/docs/Web/HTTP" class="submenu-item "><div class="submenu-icon http"></div><div class="submenu-content-container"><div class="submenu-item-heading">HTTP</div><p class="submenu-item-description">Protocol for transmitting web resources</p></div></a></li><li class="apis-link-container "><a href="/en-US/docs/Web/API" class="submenu-item "><div class="submenu-icon apis"></div><div class="submenu-content-container"><div class="submenu-item-heading">Web APIs</div><p class="submenu-item-description">Interfaces for building web applications</p></div></a></li><li class="apis-link-container "><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions" class="submenu-item "><div class="submenu-icon"></div><div class="submenu-content-container"><div class="submenu-item-heading">Web Extensions</div><p class="submenu-item-description">Developing extensions for web browsers</p></div></a></li><li class="apis-link-container desktop-only "><a href="/en-US/docs/Web" class="submenu-item "><div class="submenu-icon"></div><div class="submenu-content-container"><div class="submenu-item-heading">Web Technology</div><p class="submenu-item-description">Web technology reference for developers</p></div></a></li></ul></li><li class="top-level-entry-container"><button type="button" id="guides-button" class="top-level-entry menu-toggle" aria-controls="guides-menu" aria-expanded="false">Guides</button><a href="/en-US/docs/Learn" class="top-level-entry">Guides</a><ul id="guides-menu" class="submenu guides hidden inline-submenu-lg" aria-labelledby="guides-button"><li class="apis-link-container mobile-only "><a href="/en-US/docs/Learn" class="submenu-item "><div class="submenu-icon learn"></div><div class="submenu-content-container"><div class="submenu-item-heading">Overview / MDN Learning Area</div><p class="submenu-item-description">Learn web development</p></div></a></li><li class="apis-link-container desktop-only "><a href="/en-US/docs/Learn" class="submenu-item "><div class="submenu-icon learn"></div><div class="submenu-content-container"><div class="submenu-item-heading">MDN Learning Area</div><p class="submenu-item-description">Learn web development</p></div></a></li><li class="html-link-container "><a href="/en-US/docs/Learn/HTML" class="submenu-item "><div class="submenu-icon html"></div><div class="submenu-content-container"><div class="submenu-item-heading">HTML</div><p class="submenu-item-description">Learn to structure web content with HTML</p></div></a></li><li class="css-link-container "><a href="/en-US/docs/Learn/CSS" class="submenu-item "><div class="submenu-icon css"></div><div class="submenu-content-container"><div class="submenu-item-heading">CSS</div><p class="submenu-item-description">Learn to style content using CSS</p></div></a></li><li class="javascript-link-container "><a href="/en-US/docs/Learn/JavaScript" class="submenu-item "><div class="submenu-icon javascript"></div><div class="submenu-content-container"><div class="submenu-item-heading">JavaScript</div><p class="submenu-item-description">Learn to run scripts in the browser</p></div></a></li><li class=" "><a href="/en-US/docs/Web/Accessibility" class="submenu-item "><div class="submenu-icon"></div><div class="submenu-content-container"><div class="submenu-item-heading">Accessibility</div><p class="submenu-item-description">Learn to make the web accessible to all</p></div></a></li></ul></li><li class="top-level-entry-container"><button type="button" id="mdn-plus-button" class="top-level-entry menu-toggle" aria-controls="mdn-plus-menu" aria-expanded="false">Plus</button><a href="/en-US/plus" class="top-level-entry">Plus</a><ul id="mdn-plus-menu" class="submenu mdn-plus hidden inline-submenu-lg" aria-labelledby="mdn-plus-button"><li class=" "><a href="/en-US/plus" class="submenu-item "><div class="submenu-icon"></div><div class="submenu-content-container"><div class="submenu-item-heading">Overview</div><p class="submenu-item-description">A customized MDN experience</p></div></a></li><li class=" "><a href="/en-US/plus/ai-help" class="submenu-item "><div class="submenu-icon"></div><div class="submenu-content-container"><div class="submenu-item-heading">AI Help (beta)</div><p class="submenu-item-description">Get real-time assistance and support</p></div></a></li><li class=" "><a href="/en-US/plus/updates" class="submenu-item "><div class="submenu-icon"></div><div class="submenu-content-container"><div class="submenu-item-heading">Updates</div><p class="submenu-item-description">All browser compatibility updates at a glance</p></div></a></li><li class=" "><a href="/en-US/plus/docs/features/overview" class="submenu-item "><div class="submenu-icon"></div><div class="submenu-content-container"><div class="submenu-item-heading">Documentation</div><p class="submenu-item-description">Learn how to use MDN Plus</p></div></a></li><li class=" "><a href="/en-US/plus/docs/faq" class="submenu-item "><div class="submenu-icon"></div><div class="submenu-content-container"><div class="submenu-item-heading">FAQ</div><p class="submenu-item-description">Frequently asked questions about MDN Plus</p></div></a></li></ul></li><li class="top-level-entry-container"><a class="top-level-entry menu-link" href="/en-US/blog/">Blog</a></li><li class="top-level-entry-container"><a class="top-level-entry menu-link" href="/en-US/play">Play <sup class="new">New</sup></a></li><li class="top-level-entry-container"><a class="top-level-entry menu-link" href="/en-US/plus/ai-help/">AI Help <sup class="new beta">Beta</sup></a></li></ul></nav><div class="header-search"><form action="/en-US/search" class="search-form search-widget" id="top-nav-search-form" role="search"><label id="top-nav-search-label" for="top-nav-search-input" class="visually-hidden">Search MDN</label><input aria-activedescendant="" aria-autocomplete="list" aria-controls="top-nav-search-menu" aria-expanded="false" aria-labelledby="top-nav-search-label" autoComplete="off" id="top-nav-search-input" role="combobox" type="search" class="search-input-field" name="q" placeholder=" " required="" value=""/><button type="button" class="button action has-icon clear-search-button"><span class="button-wrap"><span class="icon icon-cancel "></span><span class="visually-hidden">Clear search input</span></span></button><button type="submit" class="button action has-icon search-button"><span class="button-wrap"><span class="icon icon-search "></span><span class="visually-hidden">Search</span></span></button><div id="top-nav-search-menu" role="listbox" aria-labelledby="top-nav-search-label"></div></form></div><div class="theme-switcher-menu"><button type="button" class="button action has-icon theme-switcher-menu small" aria-haspopup="menu"><span class="button-wrap"><span class="icon icon-theme-os-default "></span>Theme</span></button></div><ul class="auth-container"><li><a href="/users/fxa/login/authenticate/?next=%2Fen-US%2Fdocs%2FWeb%2FAPI%2FWebGL_API%2FConstants" class="signin-link" rel="nofollow">Log in</a></li><li><a class="button primary mdn-plus-subscribe-link" href="/en-US/plus"><span class="button-wrap">Get MDN Plus</span></a></li></ul></div></div></header><div class="article-actions-container"><div class="container"><button type="button" class="button action has-icon sidebar-button" aria-label="Expand sidebar" aria-expanded="false" aria-controls="sidebar-quicklinks"><span class="button-wrap"><span class="icon icon-sidebar "></span></span></button><nav class="breadcrumbs-container" aria-label="Breadcrumb"><ol typeof="BreadcrumbList" vocab="https://schema.org/" aria-label="breadcrumbs"><li property="itemListElement" typeof="ListItem"><a class="breadcrumb" property="item" typeof="WebPage" href="/en-US/docs/Web"><span property="name">References</span></a><meta property="position" content="1"/></li><li property="itemListElement" typeof="ListItem"><a class="breadcrumb" property="item" typeof="WebPage" href="/en-US/docs/Web/API"><span property="name">Web APIs</span></a><meta property="position" content="2"/></li><li property="itemListElement" typeof="ListItem"><a class="breadcrumb" property="item" typeof="WebPage" href="/en-US/docs/Web/API/WebGL_API"><span property="name">WebGL: 2D and 3D graphics for the web</span></a><meta property="position" content="3"/></li><li property="itemListElement" typeof="ListItem"><a class="breadcrumb-current-page" property="item" typeof="WebPage" href="/en-US/docs/Web/API/WebGL_API/Constants"><span property="name">WebGL constants</span></a><meta property="position" content="4"/></li></ol></nav><div class="article-actions"><button type="button" class="button action has-icon article-actions-toggle" aria-label="Article actions"><span class="button-wrap"><span class="icon icon-ellipses "></span><span class="article-actions-dialog-heading">Article Actions</span></span></button><ul class="article-actions-entries"><li class="article-actions-entry"><div class="languages-switcher-menu open-on-focus-within"><button id="languages-switcher-button" type="button" class="button action small has-icon languages-switcher-menu" aria-haspopup="menu"><span class="button-wrap"><span class="icon icon-language "></span>English (US)</span></button></div></li></ul></div></div></div></div><div class="main-wrapper"><div class="sidebar-container"><aside id="sidebar-quicklinks" class="sidebar" data-macro="DefaultAPISidebar"><button type="button" class="button action backdrop" aria-label="Collapse sidebar"><span class="button-wrap"></span></button><nav aria-label="Related Topics" class="sidebar-inner"><header class="sidebar-actions"><section class="sidebar-filter-container"><div class="sidebar-filter "><label id="sidebar-filter-label" class="sidebar-filter-label" for="sidebar-filter-input"><span class="icon icon-filter"></span><span class="visually-hidden">Filter sidebar</span></label><input id="sidebar-filter-input" autoComplete="off" class="sidebar-filter-input-field false" type="text" placeholder="Filter" value=""/><button type="button" class="button action has-icon clear-sidebar-filter-button"><span class="button-wrap"><span class="icon icon-cancel "></span><span class="visually-hidden">Clear filter input</span></span></button></div></section></header><div class="sidebar-inner-nav"><div class="in-nav-toc"><div class="document-toc-container"><section class="document-toc"><header><h2 class="document-toc-heading">In this article</h2></header><ul class="document-toc-list"><li class="document-toc-item "><a class="document-toc-link" href="#table_of_contents">Table of contents</a></li><li class="document-toc-item "><a class="document-toc-link" href="#standard_webgl_1_constants">Standard WebGL 1 constants</a></li><li class="document-toc-item "><a class="document-toc-link" href="#additional_constants_defined_webgl_2">Additional constants defined WebGL 2</a></li><li class="document-toc-item "><a class="document-toc-link" href="#constants_defined_in_webgl_extensions">Constants defined in WebGL extensions</a></li><li class="document-toc-item "><a class="document-toc-link" href="#specifications">Specifications</a></li><li class="document-toc-item "><a class="document-toc-link" href="#see_also">See also</a></li></ul></section></div></div><div class="sidebar-body"><ol><li><strong><a href="/en-US/docs/Web/API/WebGL_API">WebGL API</a></strong></li><li class="toggle"><details open=""><summary>Guides</summary><ol><li><em><a href="/en-US/docs/Web/API/WebGL_API/Constants" aria-current="page">WebGL constants</a></em></li><li><a href="/en-US/docs/Web/API/WebGL_API/Types">WebGL types</a></li><li><a href="/en-US/docs/Web/API/WebGL_API/WebGL_model_view_projection">WebGL model view projection</a></li><li><a href="/en-US/docs/Web/API/WebGL_API/WebGL_best_practices">WebGL best practices</a></li><li><a href="/en-US/docs/Web/API/WebGL_API/By_example">WebGL by example</a></li><li><a href="/en-US/docs/Web/API/WebGL_API/Basic_2D_animation_example">A basic 2D WebGL animation example</a></li><li><a href="/en-US/docs/Web/API/WebGL_API/Compressed_texture_formats">Compressed texture formats</a></li><li><a href="/en-US/docs/Web/API/WebGL_API/Data">Data in WebGL</a></li><li><a href="/en-US/docs/Web/API/WebGL_API/Matrix_math_for_the_web">Matrix math for the web</a></li><li><a href="/en-US/docs/Web/API/WebGL_API/Using_Extensions">Using WebGL extensions</a></li></ol></details></li><li class="toggle"><details open=""><summary>Tutorial</summary><ol><li><a href="/en-US/docs/Web/API/WebGL_API/Tutorial">WebGL tutorial</a></li><li><a href="/en-US/docs/Web/API/WebGL_API/Tutorial/Getting_started_with_WebGL">Getting started with WebGL</a></li><li><a href="/en-US/docs/Web/API/WebGL_API/Tutorial/Adding_2D_content_to_a_WebGL_context">Adding 2D content to a WebGL context</a></li><li><a href="/en-US/docs/Web/API/WebGL_API/Tutorial/Using_shaders_to_apply_color_in_WebGL">Using shaders to apply color in WebGL</a></li><li><a href="/en-US/docs/Web/API/WebGL_API/Tutorial/Animating_objects_with_WebGL">Animating objects with WebGL</a></li><li><a href="/en-US/docs/Web/API/WebGL_API/Tutorial/Creating_3D_objects_using_WebGL">Creating 3D objects using WebGL</a></li><li><a href="/en-US/docs/Web/API/WebGL_API/Tutorial/Using_textures_in_WebGL">Using textures in WebGL</a></li><li><a href="/en-US/docs/Web/API/WebGL_API/Tutorial/Lighting_in_WebGL">Lighting in WebGL</a></li><li><a href="/en-US/docs/Web/API/WebGL_API/Tutorial/Animating_textures_in_WebGL">Animating textures in WebGL</a></li></ol></details></li><li class="toggle"><details open=""><summary>Interfaces</summary><ol><li><a href="/en-US/docs/Web/API/WebGLRenderingContext"><code>WebGLRenderingContext</code></a></li><li><a href="/en-US/docs/Web/API/WebGLBuffer"><code>WebGLBuffer</code></a></li><li><a href="/en-US/docs/Web/API/WebGLFramebuffer"><code>WebGLFramebuffer</code></a></li><li><a href="/en-US/docs/Web/API/WebGLRenderbuffer"><code>WebGLRenderbuffer</code></a></li><li><a href="/en-US/docs/Web/API/WebGLObject"><code>WebGLObject</code></a></li><li><a href="/en-US/docs/Web/API/WebGLProgram"><code>WebGLProgram</code></a></li><li><a href="/en-US/docs/Web/API/WebGLShader"><code>WebGLShader</code></a></li><li><a href="/en-US/docs/Web/API/WebGLTexture"><code>WebGLTexture</code></a></li><li><a href="/en-US/docs/Web/API/WebGLUniformLocation"><code>WebGLUniformLocation</code></a></li><li><a href="/en-US/docs/Web/API/WebGLActiveInfo"><code>WebGLActiveInfo</code></a></li><li><a href="/en-US/docs/Web/API/WebGLShaderPrecisionFormat"><code>WebGLShaderPrecisionFormat</code></a></li><li><a href="/en-US/docs/Web/API/WebGLContextEvent"><code>WebGLContextEvent</code></a></li><li><a href="/en-US/docs/Web/API/WebGLQuery"><code>WebGLQuery</code></a></li><li><a href="/en-US/docs/Web/API/WebGLSampler"><code>WebGLSampler</code></a></li><li><a href="/en-US/docs/Web/API/WebGLSync"><code>WebGLSync</code></a></li><li><a href="/en-US/docs/Web/API/WebGLTransformFeedback"><code>WebGLTransformFeedback</code></a></li><li><a href="/en-US/docs/Web/API/WebGLVertexArrayObject"><code>WebGLVertexArrayObject</code></a></li><li><a href="/en-US/docs/Web/API/WebGL2RenderingContext"><code>WebGL2RenderingContext</code></a></li><li><a href="/en-US/docs/Web/API/WEBGL_compressed_texture_s3tc"><code>WEBGL_compressed_texture_s3tc</code></a></li><li><a href="/en-US/docs/Web/API/WEBGL_compressed_texture_s3tc_srgb"><code>WEBGL_compressed_texture_s3tc_srgb</code></a></li><li><a href="/en-US/docs/Web/API/WEBGL_compressed_texture_etc1"><code>WEBGL_compressed_texture_etc1</code></a></li><li><a href="/en-US/docs/Web/API/WEBGL_compressed_texture_pvrtc"><code>WEBGL_compressed_texture_pvrtc</code></a></li><li><a href="/en-US/docs/Web/API/WEBGL_debug_renderer_info"><code>WEBGL_debug_renderer_info</code></a></li><li><a href="/en-US/docs/Web/API/WEBGL_debug_shaders"><code>WEBGL_debug_shaders</code></a></li><li><a href="/en-US/docs/Web/API/WEBGL_depth_texture"><code>WEBGL_depth_texture</code></a></li><li><a href="/en-US/docs/Web/API/OES_element_index_uint"><code>OES_element_index_uint</code></a></li><li><a href="/en-US/docs/Web/API/EXT_frag_depth"><code>EXT_frag_depth</code></a></li><li><a href="/en-US/docs/Web/API/WEBGL_lose_context"><code>WEBGL_lose_context</code></a></li><li><a href="/en-US/docs/Web/API/EXT_texture_filter_anisotropic"><code>EXT_texture_filter_anisotropic</code></a></li><li><a href="/en-US/docs/Web/API/EXT_sRGB"><code>EXT_sRGB</code></a></li><li><a href="/en-US/docs/Web/API/OES_standard_derivatives"><code>OES_standard_derivatives</code></a></li><li><a href="/en-US/docs/Web/API/OES_texture_float"><code>OES_texture_float</code></a></li><li><a href="/en-US/docs/Web/API/WEBGL_draw_buffers"><code>WEBGL_draw_buffers</code></a></li><li><a href="/en-US/docs/Web/API/OES_texture_float_linear"><code>OES_texture_float_linear</code></a></li><li><a href="/en-US/docs/Web/API/EXT_shader_texture_lod"><code>EXT_shader_texture_lod</code></a></li><li><a href="/en-US/docs/Web/API/OES_texture_half_float"><code>OES_texture_half_float</code></a></li><li><a href="/en-US/docs/Web/API/OES_texture_half_float_linear"><code>OES_texture_half_float_linear</code></a></li><li><a href="/en-US/docs/Web/API/WEBGL_color_buffer_float"><code>WEBGL_color_buffer_float</code></a></li><li><a href="/en-US/docs/Web/API/EXT_color_buffer_half_float"><code>EXT_color_buffer_half_float</code></a></li><li><a href="/en-US/docs/Web/API/OES_vertex_array_object"><code>OES_vertex_array_object</code></a></li><li><a href="/en-US/docs/Web/API/ANGLE_instanced_arrays"><code>ANGLE_instanced_arrays</code></a></li><li><a href="/en-US/docs/Web/API/EXT_blend_minmax"><code>EXT_blend_minmax</code></a></li><li><a href="/en-US/docs/Web/API/EXT_disjoint_timer_query"><code>EXT_disjoint_timer_query</code></a></li><li><a href="/en-US/docs/Web/API/OES_draw_buffers_indexed"><code>OES_draw_buffers_indexed</code></a></li></ol></details></li><li class="toggle"><details open=""><summary>Events</summary><ol><li><a href="/en-US/docs/Web/API/HTMLCanvasElement/webglcontextcreationerror_event"><code>HTMLCanvasElement</code>: <code>webglcontextcreationerror</code></a></li><li><a href="/en-US/docs/Web/API/HTMLCanvasElement/webglcontextlost_event"><code>HTMLCanvasElement</code>: <code>webglcontextlost</code></a></li><li><a href="/en-US/docs/Web/API/HTMLCanvasElement/webglcontextrestored_event"><code>HTMLCanvasElement</code>: <code>webglcontextrestored</code></a></li></ol></details></li></ol></div></div><section class="place side"></section></nav></aside><div class="toc-container"><aside class="toc"><nav><div class="document-toc-container"><section class="document-toc"><header><h2 class="document-toc-heading">In this article</h2></header><ul class="document-toc-list"><li class="document-toc-item "><a class="document-toc-link" href="#table_of_contents">Table of contents</a></li><li class="document-toc-item "><a class="document-toc-link" href="#standard_webgl_1_constants">Standard WebGL 1 constants</a></li><li class="document-toc-item "><a class="document-toc-link" href="#additional_constants_defined_webgl_2">Additional constants defined WebGL 2</a></li><li class="document-toc-item "><a class="document-toc-link" href="#constants_defined_in_webgl_extensions">Constants defined in WebGL extensions</a></li><li class="document-toc-item "><a class="document-toc-link" href="#specifications">Specifications</a></li><li class="document-toc-item "><a class="document-toc-link" href="#see_also">See also</a></li></ul></section></div></nav></aside><section class="place side"></section></div></div><main id="content" class="main-content "><article class="main-page-content" lang="en-US"><header><h1>WebGL constants</h1></header><div class="section-content"><p>The <a href="/en-US/docs/Web/API/WebGL_API">WebGL API</a> provides several constants that are passed into or returned by functions. All constants are of type <a href="/en-US/docs/Web/API/WebGL_API/Types" title="GLenum"><code>GLenum</code></a>.</p>
<p>Standard WebGL constants are installed on the <a href="/en-US/docs/Web/API/WebGLRenderingContext"><code>WebGLRenderingContext</code></a> and <a href="/en-US/docs/Web/API/WebGL2RenderingContext"><code>WebGL2RenderingContext</code></a> objects, so that you use them as <code>gl.CONSTANT_NAME</code>:</p>
<div class="code-example"><p class="example-header"><span class="language-name">js</span></p><pre class="brush: js notranslate" data-signature="Z0APEZ9veiZVGJXWflP42115TzlebcPkF7jm1NWdqWo="><code><span class="token keyword">const</span> canvas <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span><span class="token string">"myCanvas"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> gl <span class="token operator">=</span> canvas<span class="token punctuation">.</span><span class="token function">getContext</span><span class="token punctuation">(</span><span class="token string">"webgl"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
gl<span class="token punctuation">.</span><span class="token function">getParameter</span><span class="token punctuation">(</span>gl<span class="token punctuation">.</span><span class="token constant">LINE_WIDTH</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div>
<p>Some constants are also provided by <a href="/en-US/docs/Web/API/WebGL_API/Using_Extensions">WebGL extensions</a>. A <a href="#constants_defined_in_webgl_extensions">list</a> is provided below.</p>
<div class="code-example"><p class="example-header"><span class="language-name">js</span></p><pre class="brush: js notranslate" data-signature="GQ5TGpHpQvgfcYWaAfdf6ohvouO8j3DdbuDfEnwOLms="><code><span class="token keyword">const</span> debugInfo <span class="token operator">=</span> gl<span class="token punctuation">.</span><span class="token function">getExtension</span><span class="token punctuation">(</span><span class="token string">"WEBGL_debug_renderer_info"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> vendor <span class="token operator">=</span> gl<span class="token punctuation">.</span><span class="token function">getParameter</span><span class="token punctuation">(</span>debugInfo<span class="token punctuation">.</span><span class="token constant">UNMASKED_VENDOR_WEBGL</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div>
<p>The <a href="/en-US/docs/Web/API/WebGL_API/Tutorial">WebGL tutorial</a> has more information, examples, and resources on how to get started with WebGL.</p></div><section aria-labelledby="table_of_contents"><h2 id="table_of_contents"><a href="#table_of_contents">Table of contents</a></h2><div class="section-content"><ul>
<li><a href="#standard_webgl_1_constants">Standard WebGL 1 constants</a></li>
<li><a href="#additional_constants_defined_webgl_2">Standard WebGL 2 constants</a></li>
<li><a href="#constants_defined_in_webgl_extensions">WebGL extension constants</a></li>
</ul></div></section><section aria-labelledby="standard_webgl_1_constants"><h2 id="standard_webgl_1_constants"><a href="#standard_webgl_1_constants">Standard WebGL 1 constants</a></h2><div class="section-content"><p>These constants are defined on the <a href="/en-US/docs/Web/API/WebGLRenderingContext"><code>WebGLRenderingContext</code></a> interface.</p></div></section><section aria-labelledby="clearing_buffers"><h3 id="clearing_buffers"><a href="#clearing_buffers">Clearing buffers</a></h3><div class="section-content"><p>Constants passed to <a href="/en-US/docs/Web/API/WebGLRenderingContext/clear"><code>WebGLRenderingContext.clear()</code></a> to clear buffer masks.</p>
<figure class="table-container"><table>
<thead>
<tr>
<th>Constant name</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>DEPTH_BUFFER_BIT</code></td>
<td>0x00000100</td>
<td>Passed to <code>clear</code> to clear the current depth buffer.</td>
</tr>
<tr>
<td><code>STENCIL_BUFFER_BIT</code></td>
<td>0x00000400</td>
<td>Passed to <code>clear</code> to clear the current stencil buffer.</td>
</tr>
<tr>
<td><code>COLOR_BUFFER_BIT</code></td>
<td>0x00004000</td>
<td>Passed to <code>clear</code> to clear the current color buffer.</td>
</tr>
</tbody>
</table></figure></div></section><section aria-labelledby="rendering_primitives"><h3 id="rendering_primitives"><a href="#rendering_primitives">Rendering primitives</a></h3><div class="section-content"><p>Constants passed to <a href="/en-US/docs/Web/API/WebGLRenderingContext/drawElements"><code>WebGLRenderingContext.drawElements()</code></a> or <a href="/en-US/docs/Web/API/WebGLRenderingContext/drawArrays"><code>WebGLRenderingContext.drawArrays()</code></a> to specify what kind of primitive to render.</p>
<figure class="table-container"><table class="no-markdown">
<thead>
<tr>
<th scope="col">Constant name</th>
<th scope="col">Value</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>POINTS</code></td>
<td>0x0000</td>
<td>
Passed to <code>drawElements</code> or <code>drawArrays</code> to draw
single points.
</td>
</tr>
<tr>
<td><code>LINES</code></td>
<td>0x0001</td>
<td>
Passed to <code>drawElements</code> or <code>drawArrays</code> to draw
lines. Each vertex connects to the one after it.
</td>
</tr>
<tr>
<td><code>LINE_LOOP</code></td>
<td>0x0002</td>
<td>
Passed to <code>drawElements</code> or <code>drawArrays</code> to draw
lines. Each set of two vertices is treated as a separate line segment.
</td>
</tr>
<tr>
<td><code>LINE_STRIP</code></td>
<td>0x0003</td>
<td>
Passed to <code>drawElements</code> or <code>drawArrays</code> to draw a
connected group of line segments from the first vertex to the last.
</td>
</tr>
<tr>
<td><code>TRIANGLES</code></td>
<td>0x0004</td>
<td>
Passed to <code>drawElements</code> or <code>drawArrays</code> to draw
triangles. Each set of three vertices creates a separate triangle.
</td>
</tr>
<tr>
<td><code>TRIANGLE_STRIP</code></td>
<td>0x0005</td>
<td>
Passed to <code>drawElements</code> or <code>drawArrays</code> to draw a
connected group of triangles.
</td>
</tr>
<tr>
<td><code>TRIANGLE_FAN</code></td>
<td>0x0006</td>
<td>
Passed to <code>drawElements</code> or <code>drawArrays</code> to draw a
connected group of triangles. Each vertex connects to the previous and
the first vertex in the fan.
</td>
</tr>
</tbody>
</table></figure></div></section><section aria-labelledby="blending_modes"><h3 id="blending_modes"><a href="#blending_modes">Blending modes</a></h3><div class="section-content"><p>Constants passed to <a href="/en-US/docs/Web/API/WebGLRenderingContext/blendFunc"><code>WebGLRenderingContext.blendFunc()</code></a> or <a href="/en-US/docs/Web/API/WebGLRenderingContext/blendFuncSeparate"><code>WebGLRenderingContext.blendFuncSeparate()</code></a> to specify the blending mode (for both, RGB and alpha, or separately).</p>
<figure class="table-container"><table class="no-markdown">
<thead>
<tr>
<th scope="col">Constant name</th>
<th scope="col">Value</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>ZERO</code></td>
<td>0</td>
<td>
Passed to <code>blendFunc</code> or <code>blendFuncSeparate</code> to
turn off a component.
</td>
</tr>
<tr>
<td><code>ONE</code></td>
<td>1</td>
<td>
Passed to <code>blendFunc</code> or <code>blendFuncSeparate</code> to
turn on a component.
</td>
</tr>
<tr>
<td><code>SRC_COLOR</code></td>
<td>0x0300</td>
<td>
Passed to <code>blendFunc</code> or <code>blendFuncSeparate</code> to
multiply a component by the source elements color.
</td>
</tr>
<tr>
<td><code>ONE_MINUS_SRC_COLOR</code></td>
<td>0x0301</td>
<td>
Passed to <code>blendFunc</code> or <code>blendFuncSeparate</code> to
multiply a component by one minus the source elements color.
</td>
</tr>
<tr>
<td><code>SRC_ALPHA</code></td>
<td>0x0302</td>
<td>
Passed to <code>blendFunc</code> or <code>blendFuncSeparate</code> to
multiply a component by the source's alpha.
</td>
</tr>
<tr>
<td><code>ONE_MINUS_SRC_ALPHA</code></td>
<td>0x0303</td>
<td>
Passed to <code>blendFunc</code> or <code>blendFuncSeparate</code> to
multiply a component by one minus the source's alpha.
</td>
</tr>
<tr>
<td><code>DST_ALPHA</code></td>
<td>0x0304</td>
<td>
Passed to <code>blendFunc</code> or <code>blendFuncSeparate</code> to
multiply a component by the destination's alpha.
</td>
</tr>
<tr>
<td><code>ONE_MINUS_DST_ALPHA</code></td>
<td>0x0305</td>
<td>
Passed to <code>blendFunc</code> or <code>blendFuncSeparate</code> to
multiply a component by one minus the destination's alpha.
</td>
</tr>
<tr>
<td><code>DST_COLOR</code></td>
<td>0x0306</td>
<td>
Passed to <code>blendFunc</code> or <code>blendFuncSeparate</code> to
multiply a component by the destination's color.
</td>
</tr>
<tr>
<td><code>ONE_MINUS_DST_COLOR</code></td>
<td>0x0307</td>
<td>
Passed to <code>blendFunc</code> or <code>blendFuncSeparate</code> to
multiply a component by one minus the destination's color.
</td>
</tr>
<tr>
<td><code>SRC_ALPHA_SATURATE</code></td>
<td>0x0308</td>
<td>
Passed to <code>blendFunc</code> or <code>blendFuncSeparate</code> to
multiply a component by the minimum of source's alpha or one minus the
destination's alpha.
</td>
</tr>
<tr>
<td><code>CONSTANT_COLOR</code></td>
<td>0x8001</td>
<td>
Passed to <code>blendFunc</code> or <code>blendFuncSeparate</code> to
specify a constant color blend function.
</td>
</tr>
<tr>
<td><code>ONE_MINUS_CONSTANT_COLOR</code></td>
<td>0x8002</td>
<td>
Passed to <code>blendFunc</code> or <code>blendFuncSeparate</code> to
specify one minus a constant color blend function.
</td>
</tr>
<tr>
<td><code>CONSTANT_ALPHA</code></td>
<td>0x8003</td>
<td>
Passed to <code>blendFunc</code> or <code>blendFuncSeparate</code> to
specify a constant alpha blend function.
</td>
</tr>
<tr>
<td><code>ONE_MINUS_CONSTANT_ALPHA</code></td>
<td>0x8004</td>
<td>
Passed to <code>blendFunc</code> or <code>blendFuncSeparate</code> to
specify one minus a constant alpha blend function.
</td>
</tr>
</tbody>
</table></figure></div></section><section aria-labelledby="blending_equations"><h3 id="blending_equations"><a href="#blending_equations">Blending equations</a></h3><div class="section-content"><p>Constants passed to <a href="/en-US/docs/Web/API/WebGLRenderingContext/blendEquation"><code>WebGLRenderingContext.blendEquation()</code></a> or <a href="/en-US/docs/Web/API/WebGLRenderingContext/blendEquationSeparate"><code>WebGLRenderingContext.blendEquationSeparate()</code></a> to control how the blending is calculated (for both, RGB and alpha, or separately).</p>
<figure class="table-container"><table class="no-markdown">
<thead>
<tr>
<th scope="col">Constant name</th>
<th scope="col">Value</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>FUNC_ADD</code></td>
<td>0x8006</td>
<td>
Passed to <code>blendEquation</code> or
<code>blendEquationSeparate</code> to set an addition blend function.
</td>
</tr>
<tr>
<td><code>FUNC_SUBTRACT</code></td>
<td>0x800A</td>
<td>
Passed to <code>blendEquation</code> or
<code>blendEquationSeparate</code> to specify a subtraction blend
function (source - destination).
</td>
</tr>
<tr>
<td><code>FUNC_REVERSE_SUBTRACT</code></td>
<td>0x800B</td>
<td>
Passed to <code>blendEquation</code> or
<code>blendEquationSeparate</code> to specify a reverse subtraction
blend function (destination - source).
</td>
</tr>
</tbody>
</table></figure></div></section><section aria-labelledby="getting_gl_parameter_information"><h3 id="getting_gl_parameter_information"><a href="#getting_gl_parameter_information">Getting GL parameter information</a></h3><div class="section-content"><p>Constants passed to <a href="/en-US/docs/Web/API/WebGLRenderingContext/getParameter"><code>WebGLRenderingContext.getParameter()</code></a> to specify what information to return.</p>
<figure class="table-container"><table class="no-markdown">
<thead>
<tr>
<th scope="col">Constant name</th>
<th scope="col">Value</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>BLEND_EQUATION</code></td>
<td>0x8009</td>
<td>
Passed to <code>getParameter</code> to get the current RGB blend
function.
</td>
</tr>
<tr>
<td><code>BLEND_EQUATION_RGB</code></td>
<td>0x8009</td>
<td>
Passed to <code>getParameter</code> to get the current RGB blend
function. Same as BLEND_EQUATION
</td>
</tr>
<tr>
<td><code>BLEND_EQUATION_ALPHA</code></td>
<td>0x883D</td>
<td>
Passed to <code>getParameter</code> to get the current alpha blend
function. Same as BLEND_EQUATION
</td>
</tr>
<tr>
<td><code>BLEND_DST_RGB</code></td>
<td>0x80C8</td>
<td>
Passed to <code>getParameter</code> to get the current destination RGB
blend function.
</td>
</tr>
<tr>
<td><code>BLEND_SRC_RGB</code></td>
<td>0x80C9</td>
<td>
Passed to <code>getParameter</code> to get the current destination RGB
blend function.
</td>
</tr>
<tr>
<td><code>BLEND_DST_ALPHA</code></td>
<td>0x80CA</td>
<td>
Passed to <code>getParameter</code> to get the current destination alpha
blend function.
</td>
</tr>
<tr>
<td><code>BLEND_SRC_ALPHA</code></td>
<td>0x80CB</td>
<td>
Passed to <code>getParameter</code> to get the current source alpha
blend function.
</td>
</tr>
<tr>
<td><code>BLEND_COLOR</code></td>
<td>0x8005</td>
<td>Passed to <code>getParameter</code> to return a the current blend color.</td>
</tr>
<tr>
<td><code>ARRAY_BUFFER_BINDING</code></td>
<td>0x8894</td>
<td>Passed to <code>getParameter</code> to get the array buffer binding.</td>
</tr>
<tr>
<td><code>ELEMENT_ARRAY_BUFFER_BINDING</code></td>
<td>0x8895</td>
<td>
Passed to <code>getParameter</code> to get the current element array
buffer.
</td>
</tr>
<tr>
<td><code>LINE_WIDTH</code></td>
<td>0x0B21</td>
<td>
Passed to <code>getParameter</code> to get the current
<code>lineWidth</code> (set by the <code>lineWidth</code> method).
</td>
</tr>
<tr>
<td><code>ALIASED_POINT_SIZE_RANGE</code></td>
<td>0x846D</td>
<td>
Passed to <code>getParameter</code> to get the current size of a point
drawn with <code>gl.POINTS</code>
</td>
</tr>
<tr>
<td><code>ALIASED_LINE_WIDTH_RANGE</code></td>
<td>0x846E</td>
<td>
Passed to <code>getParameter</code> to get the range of available widths
for a line. Returns a length-2 array with the lo value at 0, and hight
at 1.
</td>
</tr>
<tr>
<td><code>CULL_FACE_MODE</code></td>
<td>0x0B45</td>
<td>
Passed to <code>getParameter</code> to get the current value of
<code>cullFace</code>. Should return <code>FRONT</code>,
<code>BACK</code>, or <code>FRONT_AND_BACK</code>
</td>
</tr>
<tr>
<td><code>FRONT_FACE</code></td>
<td>0x0B46</td>
<td>
Passed to <code>getParameter</code> to determine the current value of
<code>frontFace</code>. Should return <code>CW</code> or
<code>CCW</code>.
</td>
</tr>
<tr>
<td><code>DEPTH_RANGE</code></td>
<td>0x0B70</td>
<td>
Passed to <code>getParameter</code> to return a length-2 array of floats
giving the current depth range.
</td>
</tr>
<tr>
<td><code>DEPTH_WRITEMASK</code></td>
<td>0x0B72</td>
<td>
Passed to <code>getParameter</code> to determine if the depth write mask
is enabled.
</td>
</tr>
<tr>
<td><code>DEPTH_CLEAR_VALUE</code></td>
<td>0x0B73</td>
<td>
Passed to <code>getParameter</code> to determine the current depth clear
value.
</td>
</tr>
<tr>
<td><code>DEPTH_FUNC</code></td>
<td>0x0B74</td>
<td>
Passed to <code>getParameter</code> to get the current depth function.
Returns <code>NEVER</code>, <code>ALWAYS</code>, <code>LESS</code>,
<code>EQUAL</code>, <code>LEQUAL</code>, <code>GREATER</code>,
<code>GEQUAL</code>, or <code>NOTEQUAL</code>.
</td>
</tr>
<tr>
<td><code>STENCIL_CLEAR_VALUE</code></td>
<td>0x0B91</td>
<td>
Passed to <code>getParameter</code> to get the value the stencil will be
cleared to.
</td>
</tr>
<tr>
<td><code>STENCIL_FUNC</code></td>
<td>0x0B92</td>
<td>
Passed to <code>getParameter</code> to get the current stencil function.
Returns <code>NEVER</code>, <code>ALWAYS</code>, <code>LESS</code>,
<code>EQUAL</code>, <code>LEQUAL</code>, <code>GREATER</code>,
<code>GEQUAL</code>, or <code>NOTEQUAL</code>.
</td>
</tr>
<tr>
<td><code>STENCIL_FAIL</code></td>
<td>0x0B94</td>
<td>
Passed to <code>getParameter</code> to get the current stencil fail
function. Should return <code>KEEP</code>, <code>REPLACE</code>,
<code>INCR</code>, <code>DECR</code>, <code>INVERT</code>,
<code>INCR_WRAP</code>, or <code>DECR_WRAP</code>.
</td>
</tr>
<tr>
<td><code>STENCIL_PASS_DEPTH_FAIL</code></td>
<td>0x0B95</td>
<td>
Passed to <code>getParameter</code> to get the current stencil fail
function should the depth buffer test fail. Should return
<code>KEEP</code>, <code>REPLACE</code>, <code>INCR</code>,
<code>DECR</code>, <code>INVERT</code>, <code>INCR_WRAP</code>, or
<code>DECR_WRAP</code>.
</td>
</tr>
<tr>
<td><code>STENCIL_PASS_DEPTH_PASS</code></td>
<td>0x0B96</td>
<td>
Passed to <code>getParameter</code> to get the current stencil fail
function should the depth buffer test pass. Should return KEEP, REPLACE,
INCR, DECR, INVERT, INCR_WRAP, or DECR_WRAP.
</td>
</tr>
<tr>
<td><code>STENCIL_REF</code></td>
<td>0x0B97</td>
<td>
Passed to <code>getParameter</code> to get the reference value used for
stencil tests.
</td>
</tr>
<tr>
<td><code>STENCIL_VALUE_MASK</code></td>
<td>0x0B93</td>
<td></td>
</tr>
<tr>
<td><code>STENCIL_WRITEMASK</code></td>
<td>0x0B98</td>
<td></td>
</tr>
<tr>
<td><code>STENCIL_BACK_FUNC</code></td>
<td>0x8800</td>
<td></td>
</tr>
<tr>
<td><code>STENCIL_BACK_FAIL</code></td>
<td>0x8801</td>
<td></td>
</tr>
<tr>
<td><code>STENCIL_BACK_PASS_DEPTH_FAIL</code></td>
<td>0x8802</td>
<td></td>
</tr>
<tr>
<td><code>STENCIL_BACK_PASS_DEPTH_PASS</code></td>
<td>0x8803</td>
<td></td>
</tr>
<tr>
<td><code>STENCIL_BACK_REF</code></td>
<td>0x8CA3</td>
<td></td>
</tr>
<tr>
<td><code>STENCIL_BACK_VALUE_MASK</code></td>
<td>0x8CA4</td>
<td></td>
</tr>
<tr>
<td><code>STENCIL_BACK_WRITEMASK</code></td>
<td>0x8CA5</td>
<td></td>
</tr>
<tr>
<td><code>VIEWPORT</code></td>
<td>0x0BA2</td>
<td>
Returns an <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array"><code>Int32Array</code></a> with four elements for the
current viewport dimensions.
</td>
</tr>
<tr>
<td><code>SCISSOR_BOX</code></td>
<td>0x0C10</td>
<td>
Returns an <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array"><code>Int32Array</code></a> with four elements for the
current scissor box dimensions.
</td>
</tr>
<tr>
<td><code>COLOR_CLEAR_VALUE</code></td>
<td>0x0C22</td>
<td></td>
</tr>
<tr>
<td><code>COLOR_WRITEMASK</code></td>
<td>0x0C23</td>
<td></td>
</tr>
<tr>
<td><code>UNPACK_ALIGNMENT</code></td>
<td>0x0CF5</td>
<td></td>
</tr>
<tr>
<td><code>PACK_ALIGNMENT</code></td>
<td>0x0D05</td>
<td></td>
</tr>
<tr>
<td><code>MAX_TEXTURE_SIZE</code></td>
<td>0x0D33</td>
<td></td>
</tr>
<tr>
<td><code>MAX_VIEWPORT_DIMS</code></td>
<td>0x0D3A</td>
<td></td>
</tr>
<tr>
<td><code>SUBPIXEL_BITS</code></td>
<td>0x0D50</td>
<td></td>
</tr>
<tr>
<td><code>RED_BITS</code></td>
<td>0x0D52</td>
<td></td>
</tr>
<tr>
<td><code>GREEN_BITS</code></td>
<td>0x0D53</td>
<td></td>
</tr>
<tr>
<td><code>BLUE_BITS</code></td>
<td>0x0D54</td>
<td></td>
</tr>
<tr>
<td><code>ALPHA_BITS</code></td>
<td>0x0D55</td>
<td></td>
</tr>
<tr>
<td><code>DEPTH_BITS</code></td>
<td>0x0D56</td>
<td></td>
</tr>
<tr>
<td><code>STENCIL_BITS</code></td>
<td>0x0D57</td>
<td></td>
</tr>
<tr>
<td><code>POLYGON_OFFSET_UNITS</code></td>
<td>0x2A00</td>
<td></td>
</tr>
<tr>
<td><code>POLYGON_OFFSET_FACTOR</code></td>
<td>0x8038</td>
<td></td>
</tr>
<tr>
<td><code>TEXTURE_BINDING_2D</code></td>
<td>0x8069</td>
<td></td>
</tr>
<tr>
<td><code>SAMPLE_BUFFERS</code></td>
<td>0x80A8</td>
<td></td>
</tr>
<tr>
<td><code>SAMPLES</code></td>
<td>0x80A9</td>
<td></td>
</tr>
<tr>
<td><code>SAMPLE_COVERAGE_VALUE</code></td>
<td>0x80AA</td>
<td></td>
</tr>
<tr>
<td><code>SAMPLE_COVERAGE_INVERT</code></td>
<td>0x80AB</td>
<td></td>
</tr>
<tr>
<td><code>COMPRESSED_TEXTURE_FORMATS</code></td>
<td>0x86A3</td>
<td></td>
</tr>
<tr>
<td><code>VENDOR</code></td>
<td>0x1F00</td>
<td></td>
</tr>
<tr>
<td><code>RENDERER</code></td>
<td>0x1F01</td>
<td></td>
</tr>
<tr>
<td><code>VERSION</code></td>
<td>0x1F02</td>
<td></td>
</tr>
<tr>
<td><code>IMPLEMENTATION_COLOR_READ_TYPE</code></td>
<td>0x8B9A</td>
<td></td>
</tr>
<tr>
<td><code>IMPLEMENTATION_COLOR_READ_FORMAT</code></td>
<td>0x8B9B</td>
<td></td>
</tr>
<tr>
<td><code>BROWSER_DEFAULT_WEBGL</code></td>
<td>0x9244</td>
<td></td>
</tr>
</tbody>
</table></figure></div></section><section aria-labelledby="buffers"><h3 id="buffers"><a href="#buffers">Buffers</a></h3><div class="section-content"><p>Constants passed to <a href="/en-US/docs/Web/API/WebGLRenderingContext/bufferData"><code>WebGLRenderingContext.bufferData()</code></a>, <a href="/en-US/docs/Web/API/WebGLRenderingContext/bufferSubData"><code>WebGLRenderingContext.bufferSubData()</code></a>, <a href="/en-US/docs/Web/API/WebGLRenderingContext/bindBuffer"><code>WebGLRenderingContext.bindBuffer()</code></a>, or <a href="/en-US/docs/Web/API/WebGLRenderingContext/getBufferParameter"><code>WebGLRenderingContext.getBufferParameter()</code></a>.</p>
<figure class="table-container"><table class="no-markdown">
<thead>
<tr>
<th scope="col">Constant name</th>
<th scope="col">Value</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>STATIC_DRAW</code></td>
<td>0x88E4</td>
<td>
Passed to <code>bufferData</code> as a hint about whether the contents
of the buffer are likely to be used often and not change often.
</td>
</tr>
<tr>
<td><code>STREAM_DRAW</code></td>
<td>0x88E0</td>
<td>
Passed to <code>bufferData</code> as a hint about whether the contents
of the buffer are likely to not be used often.
</td>
</tr>
<tr>
<td><code>DYNAMIC_DRAW</code></td>
<td>0x88E8</td>
<td>
Passed to <code>bufferData</code> as a hint about whether the contents
of the buffer are likely to be used often and change often.
</td>
</tr>
<tr>
<td><code>ARRAY_BUFFER</code></td>
<td>0x8892</td>
<td>
Passed to <code>bindBuffer</code> or <code>bufferData</code> to specify
the type of buffer being used.
</td>
</tr>
<tr>
<td><code>ELEMENT_ARRAY_BUFFER</code></td>
<td>0x8893</td>
<td>
Passed to <code>bindBuffer</code> or <code>bufferData</code> to specify
the type of buffer being used.
</td>
</tr>
<tr>
<td><code>BUFFER_SIZE</code></td>
<td>0x8764</td>
<td>Passed to <code>getBufferParameter</code> to get a buffer's size.</td>
</tr>
<tr>
<td><code>BUFFER_USAGE</code></td>
<td>0x8765</td>
<td>
Passed to <code>getBufferParameter</code> to get the hint for the buffer
passed in when it was created.
</td>
</tr>
</tbody>
</table></figure></div></section><section aria-labelledby="vertex_attributes"><h3 id="vertex_attributes"><a href="#vertex_attributes">Vertex attributes</a></h3><div class="section-content"><p>Constants passed to <a href="/en-US/docs/Web/API/WebGLRenderingContext/getVertexAttrib"><code>WebGLRenderingContext.getVertexAttrib()</code></a>.</p>
<figure class="table-container"><table>
<thead>
<tr>
<th>Constant name</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>CURRENT_VERTEX_ATTRIB</code></td>
<td>0x8626</td>
<td>Passed to <code>getVertexAttrib</code> to read back the current vertex attribute.</td>
</tr>
<tr>
<td><code>VERTEX_ATTRIB_ARRAY_ENABLED</code></td>
<td>0x8622</td>
<td></td>
</tr>
<tr>
<td><code>VERTEX_ATTRIB_ARRAY_SIZE</code></td>
<td>0x8623</td>
<td></td>
</tr>
<tr>
<td><code>VERTEX_ATTRIB_ARRAY_STRIDE</code></td>
<td>0x8624</td>
<td></td>
</tr>
<tr>
<td><code>VERTEX_ATTRIB_ARRAY_TYPE</code></td>
<td>0x8625</td>
<td></td>
</tr>
<tr>
<td><code>VERTEX_ATTRIB_ARRAY_NORMALIZED</code></td>
<td>0x886A</td>
<td></td>
</tr>
<tr>
<td><code>VERTEX_ATTRIB_ARRAY_POINTER</code></td>
<td>0x8645</td>
<td></td>
</tr>
<tr>
<td><code>VERTEX_ATTRIB_ARRAY_BUFFER_BINDING</code></td>
<td>0x889F</td>
<td></td>
</tr>
</tbody>
</table></figure></div></section><section aria-labelledby="culling"><h3 id="culling"><a href="#culling">Culling</a></h3><div class="section-content"><p>Constants passed to <a href="/en-US/docs/Web/API/WebGLRenderingContext/cullFace"><code>WebGLRenderingContext.cullFace()</code></a>.</p>
<figure class="table-container"><table class="no-markdown">
<thead>
<tr>
<th scope="col">Constant name</th>
<th scope="col">Value</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>CULL_FACE</code></td>
<td>0x0B44</td>
<td>
Passed to <code>enable</code>/<code>disable</code> to turn on/off
culling. Can also be used with <code>getParameter</code> to find the
current culling method.
</td>
</tr>
<tr>
<td><code>FRONT</code></td>
<td>0x0404</td>
<td>
Passed to <code>cullFace</code> to specify that only front faces should
be culled.
</td>
</tr>
<tr>
<td><code>BACK</code></td>
<td>0x0405</td>
<td>
Passed to <code>cullFace</code> to specify that only back faces should
be culled.
</td>
</tr>
<tr>
<td><code>FRONT_AND_BACK</code></td>
<td>0x0408</td>
<td>
Passed to <code>cullFace</code> to specify that front and back faces
should be culled.
</td>
</tr>
</tbody>
</table></figure></div></section><section aria-labelledby="enabling_and_disabling"><h3 id="enabling_and_disabling"><a href="#enabling_and_disabling">Enabling and disabling</a></h3><div class="section-content"><p>Constants passed to <a href="/en-US/docs/Web/API/WebGLRenderingContext/enable"><code>WebGLRenderingContext.enable()</code></a> or <a href="/en-US/docs/Web/API/WebGLRenderingContext/disable"><code>WebGLRenderingContext.disable()</code></a>.</p>
<figure class="table-container"><table class="no-markdown">
<thead>
<tr>
<th scope="col">Constant name</th>
<th scope="col">Value</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>BLEND</code></td>
<td>0x0BE2</td>
<td>
Passed to <code>enable</code>/<code>disable</code> to turn on/off
blending. Can also be used with <code>getParameter</code> to find the
current blending method.
</td>
</tr>
<tr>
<td><code>DEPTH_TEST</code></td>
<td>0x0B71</td>
<td>
Passed to <code>enable</code>/<code>disable</code> to turn on/off the
depth test. Can also be used with <code>getParameter</code> to query the
depth test.
</td>
</tr>
<tr>
<td><code>DITHER</code></td>
<td>0x0BD0</td>
<td>
Passed to <code>enable</code>/<code>disable</code> to turn on/off
dithering. Can also be used with <code>getParameter</code> to find the
current dithering method.
</td>
</tr>
<tr>
<td><code>POLYGON_OFFSET_FILL</code></td>
<td>0x8037</td>
<td>
Passed to <code>enable</code>/<code>disable</code> to turn on/off the
polygon offset. Useful for rendering hidden-line images, decals, and or
solids with highlighted edges. Can also be used with
<code>getParameter</code> to query the scissor test.
</td>
</tr>
<tr>
<td><code>SAMPLE_ALPHA_TO_COVERAGE</code></td>
<td>0x809E</td>
<td>
Passed to <code>enable</code>/<code>disable</code> to turn on/off the
alpha to coverage. Used in multi-sampling alpha channels.
</td>
</tr>
<tr>
<td><code>SAMPLE_COVERAGE</code></td>
<td>0x80A0</td>
<td>
Passed to <code>enable</code>/<code>disable</code> to turn on/off the
sample coverage. Used in multi-sampling.
</td>
</tr>
<tr>
<td><code>SCISSOR_TEST</code></td>
<td>0x0C11</td>
<td>
Passed to <code>enable</code>/<code>disable</code> to turn on/off the
scissor test. Can also be used with <code>getParameter</code> to query
the scissor test.
</td>
</tr>
<tr>
<td><code>STENCIL_TEST</code></td>
<td>0x0B90</td>
<td>
Passed to <code>enable</code>/<code>disable</code> to turn on/off the
stencil test. Can also be used with <code>getParameter</code> to query
the stencil test.
</td>
</tr>
</tbody>
</table></figure></div></section><section aria-labelledby="errors"><h3 id="errors"><a href="#errors">Errors</a></h3><div class="section-content"><p>Constants returned from <a href="/en-US/docs/Web/API/WebGLRenderingContext/getError"><code>WebGLRenderingContext.getError()</code></a>.</p>
<figure class="table-container"><table>
<thead>
<tr>
<th>Constant name</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>NO_ERROR</code></td>
<td>0</td>
<td>Returned from <code>getError</code>.</td>
</tr>
<tr>
<td><code>INVALID_ENUM</code></td>
<td>0x0500</td>
<td>Returned from <code>getError</code>.</td>
</tr>
<tr>
<td><code>INVALID_VALUE</code></td>
<td>0x0501</td>
<td>Returned from <code>getError</code>.</td>
</tr>
<tr>
<td><code>INVALID_OPERATION</code></td>
<td>0x0502</td>
<td>Returned from <code>getError</code>.</td>
</tr>
<tr>
<td><code>OUT_OF_MEMORY</code></td>
<td>0x0505</td>
<td>Returned from <code>getError</code>.</td>
</tr>
<tr>
<td><code>CONTEXT_LOST_WEBGL</code></td>
<td>0x9242</td>
<td>Returned from <code>getError</code>.</td>
</tr>
</tbody>
</table></figure></div></section><section aria-labelledby="front_face_directions"><h3 id="front_face_directions"><a href="#front_face_directions">Front face directions</a></h3><div class="section-content"><p>Constants passed to <a href="/en-US/docs/Web/API/WebGLRenderingContext/frontFace"><code>WebGLRenderingContext.frontFace()</code></a>.</p>
<figure class="table-container"><table>
<thead>
<tr>
<th>Constant name</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>CW</code></td>
<td>0x0900</td>
<td>Passed to <code>frontFace</code> to specify the front face of a polygon is drawn in the clockwise direction</td>
</tr>
<tr>
<td><code>CCW</code></td>
<td>0x0901</td>
<td>Passed to <code>frontFace</code> to specify the front face of a polygon is drawn in the counter clockwise direction</td>
</tr>
</tbody>
</table></figure></div></section><section aria-labelledby="hints"><h3 id="hints"><a href="#hints">Hints</a></h3><div class="section-content"><p>Constants passed to <a href="/en-US/docs/Web/API/WebGLRenderingContext/hint"><code>WebGLRenderingContext.hint()</code></a></p>
<figure class="table-container"><table class="no-markdown">
<thead>