This file is indexed.

/usr/share/idl/firefox/nsIDOMWebGLRenderingContext.idl is in firefox-dev 11.0+build1-0ubuntu4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is canvas 3D.
 *
 * The Initial Developer of the Original Code is
 *   Mozilla Corporation.
 * Portions created by the Initial Developer are Copyright (C) 2009
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *   Vladimir Vukicevic <vladimir@pobox.com>
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either of the GNU General Public License Version 2 or later (the "GPL"),
 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */

#include "nsISupports.idl"
#include "nsIVariant.idl"

interface nsIDOMElement;
interface nsIDOMHTMLCanvasElement;
interface nsIPropertyBag;

// XXX should we comment out these typedefs in the C++ header?

typedef unsigned long  WebGLenum;
typedef boolean        WebGLboolean;
typedef unsigned long  WebGLbitfield;
typedef long           WebGLint;
typedef long           WebGLsizei;
typedef long           WebGLsizeiptr;
typedef unsigned long  WebGLuint;
typedef float          WebGLfloat;
typedef float          WebGLclampf;

%{C++
// for jsval
#include "jsapi.h"

namespace js {
struct ArrayBuffer;
struct TypedArray;
}

/* Avoid conflict with WinAPI */
#undef NO_ERROR
%}

[ptr] native WebGLJSObjectPtr (JSObject);

//
// OpenGL object wrappers
//

[scriptable, builtinclass, uuid(0df9f4ed-f5ff-4e51-a6ff-2bd9785a7639)]
interface nsIWebGLTexture : nsISupports
{
  [noscript] attribute WebGLuint name;
};

[scriptable, builtinclass, uuid(9eca9c32-8305-11de-b89b-000c29206271)]
interface nsIWebGLBuffer : nsISupports
{
  [noscript] attribute WebGLuint name;
};

[scriptable, builtinclass, uuid(a6a19e74-8305-11de-9ce9-000c29206271)]
interface nsIWebGLProgram : nsISupports
{
  [noscript] attribute WebGLuint name;
};

[scriptable, builtinclass, uuid(ac7440a4-8305-11de-807b-000c29206271)]
interface nsIWebGLShader : nsISupports
{
  [noscript] attribute WebGLuint name;
};

[scriptable, builtinclass, uuid(beea4b38-3094-4e8d-b6e6-8b21d07e8994)]
interface nsIWebGLShaderArray : nsISupports
{
    readonly attribute unsigned long length;
    nsIWebGLShader item(in unsigned long index);
};

[scriptable, builtinclass, uuid(bce8be60-8305-11de-9f3c-000c29206271)]
interface nsIWebGLFramebuffer : nsISupports
{
  [noscript] attribute WebGLuint name;
};

[scriptable, builtinclass, uuid(c82eacd0-8305-11de-9de9-000c29206271)]
interface nsIWebGLRenderbuffer : nsISupports
{
  [noscript] attribute WebGLuint name;
};

[scriptable, builtinclass, uuid(a85d4fd0-5b9f-4cb8-aeee-5a2c5c5bad76)]
interface nsIWebGLActiveInfo : nsISupports
{
    readonly attribute WebGLint size;
    readonly attribute WebGLenum type;
    readonly attribute DOMString name;
};

[scriptable, builtinclass, uuid(76265e93-2e8f-40ca-b25b-eea5995e9641)]
interface nsIWebGLShaderPrecisionFormat : nsISupports
{
    readonly attribute WebGLint rangeMin;
    readonly attribute WebGLint rangeMax;
    readonly attribute WebGLint precision;
};

[scriptable, builtinclass, uuid(d38b0467-623e-4c82-9140-5f14a3bd1bad)]
interface nsIWebGLUniformLocation : nsISupports
{
    [noscript] attribute WebGLint location;
};

/* Base class for all WebGL extensions, and for those without
 * any additional tokens/methods.
 */
[scriptable, builtinclass, uuid(70814f32-a5c5-4b95-83d5-ac653bac3316)]
interface nsIWebGLExtension : nsISupports
{
};

/* Classes that extend on nsIWebGLExtension and provide
 * extra tokens, functions, etc.
 */
[scriptable, builtinclass, uuid(3de3dfd9-864a-4e4c-989b-2977eaa80b7b)]
interface nsIWebGLExtensionStandardDerivatives : nsIWebGLExtension
{
  //
  //  CONSTANTS
  //

  /* Fragment shader hint */
  const WebGLenum FRAGMENT_SHADER_DERIVATIVE_HINT_OES   = 0x8B8B;
};

[scriptable, uuid(b0afc2eb-0895-4509-98de-5c383d160694)]
interface nsIWebGLExtensionLoseContext : nsIWebGLExtension
{
  void loseContext();
  void restoreContext();
};

[scriptable, builtinclass, uuid(ef15ae85-4670-4dc4-848d-51ca81e8397a)]
interface nsIDOMWebGLRenderingContext : nsISupports
{
  //
  //  CONSTANTS
  //

  /* ClearBufferMask */
  const unsigned long DEPTH_BUFFER_BIT               = 0x00000100;
  const unsigned long STENCIL_BUFFER_BIT             = 0x00000400;
  const unsigned long COLOR_BUFFER_BIT               = 0x00004000;

  /* BeginMode */
  const unsigned long POINTS                         = 0x0000;
  const unsigned long LINES                          = 0x0001;
  const unsigned long LINE_LOOP                      = 0x0002;
  const unsigned long LINE_STRIP                     = 0x0003;
  const unsigned long TRIANGLES                      = 0x0004;
  const unsigned long TRIANGLE_STRIP                 = 0x0005;
  const unsigned long TRIANGLE_FAN                   = 0x0006;

  /* BlendingFactorDest */
  const unsigned long ZERO                           = 0;
  const unsigned long ONE                            = 1;
  const unsigned long SRC_COLOR                      = 0x0300;
  const unsigned long ONE_MINUS_SRC_COLOR            = 0x0301;
  const unsigned long SRC_ALPHA                      = 0x0302;
  const unsigned long ONE_MINUS_SRC_ALPHA            = 0x0303;
  const unsigned long DST_ALPHA                      = 0x0304;
  const unsigned long ONE_MINUS_DST_ALPHA            = 0x0305;

  /* BlendingFactorSrc */
  /*      GL_ZERO */
  /*      GL_ONE */
  const unsigned long DST_COLOR                      = 0x0306;
  const unsigned long ONE_MINUS_DST_COLOR            = 0x0307;
  const unsigned long SRC_ALPHA_SATURATE             = 0x0308;
  /*      GL_SRC_ALPHA */
  /*      GL_ONE_MINUS_SRC_ALPHA */
  /*      GL_DST_ALPHA */
  /*      GL_ONE_MINUS_DST_ALPHA */

  /* BlendEquationSeparate */
  const unsigned long FUNC_ADD                       = 0x8006;
  const unsigned long BLEND_EQUATION                 = 0x8009;
  const unsigned long BLEND_EQUATION_RGB             = 0x8009;   /* same as BLEND_EQUATION */
  const unsigned long BLEND_EQUATION_ALPHA           = 0x883D;

  /* BlendSubtract */
  const unsigned long FUNC_SUBTRACT                  = 0x800A;
  const unsigned long FUNC_REVERSE_SUBTRACT          = 0x800B;

  /* Separate Blend Functions */
  const unsigned long BLEND_DST_RGB                  = 0x80C8;
  const unsigned long BLEND_SRC_RGB                  = 0x80C9;
  const unsigned long BLEND_DST_ALPHA                = 0x80CA;
  const unsigned long BLEND_SRC_ALPHA                = 0x80CB;
  const unsigned long CONSTANT_COLOR                 = 0x8001;
  const unsigned long ONE_MINUS_CONSTANT_COLOR       = 0x8002;
  const unsigned long CONSTANT_ALPHA                 = 0x8003;
  const unsigned long ONE_MINUS_CONSTANT_ALPHA       = 0x8004;
  const unsigned long BLEND_COLOR                    = 0x8005;

  /* Buffer Objects */
  const unsigned long ARRAY_BUFFER                   = 0x8892;
  const unsigned long ELEMENT_ARRAY_BUFFER           = 0x8893;
  const unsigned long ARRAY_BUFFER_BINDING           = 0x8894;
  const unsigned long ELEMENT_ARRAY_BUFFER_BINDING   = 0x8895;

  const unsigned long STREAM_DRAW                    = 0x88E0;
  const unsigned long STATIC_DRAW                    = 0x88E4;
  const unsigned long DYNAMIC_DRAW                   = 0x88E8;

  const unsigned long BUFFER_SIZE                    = 0x8764;
  const unsigned long BUFFER_USAGE                   = 0x8765;

  const unsigned long CURRENT_VERTEX_ATTRIB          = 0x8626;

  /* CullFaceMode */
  const unsigned long FRONT                          = 0x0404;
  const unsigned long BACK                           = 0x0405;
  const unsigned long FRONT_AND_BACK                 = 0x0408;

  /* DepthFunction */
  /*      GL_NEVER */
  /*      GL_LESS */
  /*      GL_EQUAL */
  /*      GL_LEQUAL */
  /*      GL_GREATER */
  /*      GL_NOTEQUAL */
  /*      GL_GEQUAL */
  /*      GL_ALWAYS */

  /* EnableCap */
  const unsigned long TEXTURE_2D                     = 0x0DE1;
  const unsigned long CULL_FACE                      = 0x0B44;
  const unsigned long BLEND                          = 0x0BE2;
  const unsigned long DITHER                         = 0x0BD0;
  const unsigned long STENCIL_TEST                   = 0x0B90;
  const unsigned long DEPTH_TEST                     = 0x0B71;
  const unsigned long SCISSOR_TEST                   = 0x0C11;
  const unsigned long POLYGON_OFFSET_FILL            = 0x8037;
  const unsigned long SAMPLE_ALPHA_TO_COVERAGE       = 0x809E;
  const unsigned long SAMPLE_COVERAGE                = 0x80A0;

  /* ErrorCode */
  const unsigned long NO_ERROR                       = 0;
  const unsigned long INVALID_ENUM                   = 0x0500;
  const unsigned long INVALID_VALUE                  = 0x0501;
  const unsigned long INVALID_OPERATION              = 0x0502;
  const unsigned long OUT_OF_MEMORY                  = 0x0505;

  /* FrontFaceDirection */
  const unsigned long CW                             = 0x0900;
  const unsigned long CCW                            = 0x0901;

  /* GetPName */
  const unsigned long LINE_WIDTH                     = 0x0B21;
  const unsigned long ALIASED_POINT_SIZE_RANGE       = 0x846D;
  const unsigned long ALIASED_LINE_WIDTH_RANGE       = 0x846E;
  const unsigned long CULL_FACE_MODE                 = 0x0B45;
  const unsigned long FRONT_FACE                     = 0x0B46;
  const unsigned long DEPTH_RANGE                    = 0x0B70;
  const unsigned long DEPTH_WRITEMASK                = 0x0B72;
  const unsigned long DEPTH_CLEAR_VALUE              = 0x0B73;
  const unsigned long DEPTH_FUNC                     = 0x0B74;
  const unsigned long STENCIL_CLEAR_VALUE            = 0x0B91;
  const unsigned long STENCIL_FUNC                   = 0x0B92;
  const unsigned long STENCIL_FAIL                   = 0x0B94;
  const unsigned long STENCIL_PASS_DEPTH_FAIL        = 0x0B95;
  const unsigned long STENCIL_PASS_DEPTH_PASS        = 0x0B96;
  const unsigned long STENCIL_REF                    = 0x0B97;
  const unsigned long STENCIL_VALUE_MASK             = 0x0B93;
  const unsigned long STENCIL_WRITEMASK              = 0x0B98;
  const unsigned long STENCIL_BACK_FUNC              = 0x8800;
  const unsigned long STENCIL_BACK_FAIL              = 0x8801;
  const unsigned long STENCIL_BACK_PASS_DEPTH_FAIL   = 0x8802;
  const unsigned long STENCIL_BACK_PASS_DEPTH_PASS   = 0x8803;
  const unsigned long STENCIL_BACK_REF               = 0x8CA3;
  const unsigned long STENCIL_BACK_VALUE_MASK        = 0x8CA4;
  const unsigned long STENCIL_BACK_WRITEMASK         = 0x8CA5;
  // This is defined using a scriptable helper in nsDOMClassInfo.h,
  // because otherwise the case conflicts with the viewport()
  // method.  WebIDL is case-sensitive, but our current IDL parser
  // is not.  Once this is fixed, the WebGL context can go back to
  // using nsDOMGenericSH instead of nsWebGLViewportHandlerSH.
  // It is not visible to non-JS languages, but the constant value
  // can just be used.
  //const unsigned long VIEWPORT                       = 0x0BA2;
  const unsigned long SCISSOR_BOX                    = 0x0C10;
  /*      GL_SCISSOR_TEST */
  const unsigned long COLOR_CLEAR_VALUE              = 0x0C22;
  const unsigned long COLOR_WRITEMASK                = 0x0C23;
  const unsigned long UNPACK_ALIGNMENT               = 0x0CF5;
  const unsigned long PACK_ALIGNMENT                 = 0x0D05;
  const unsigned long MAX_TEXTURE_SIZE               = 0x0D33;
  const unsigned long MAX_VIEWPORT_DIMS              = 0x0D3A;
  const unsigned long SUBPIXEL_BITS                  = 0x0D50;
  const unsigned long RED_BITS                       = 0x0D52;
  const unsigned long GREEN_BITS                     = 0x0D53;
  const unsigned long BLUE_BITS                      = 0x0D54;
  const unsigned long ALPHA_BITS                     = 0x0D55;
  const unsigned long DEPTH_BITS                     = 0x0D56;
  const unsigned long STENCIL_BITS                   = 0x0D57;
  const unsigned long POLYGON_OFFSET_UNITS           = 0x2A00;
  /*      GL_POLYGON_OFFSET_FILL */
  const unsigned long POLYGON_OFFSET_FACTOR          = 0x8038;
  const unsigned long TEXTURE_BINDING_2D             = 0x8069;
  const unsigned long SAMPLE_BUFFERS                 = 0x80A8;
  const unsigned long SAMPLES                        = 0x80A9;
  const unsigned long SAMPLE_COVERAGE_VALUE          = 0x80AA;
  const unsigned long SAMPLE_COVERAGE_INVERT         = 0x80AB;

  /* GetTextureParameter */
  /*      GL_TEXTURE_MAG_FILTER */
  /*      GL_TEXTURE_MIN_FILTER */
  /*      GL_TEXTURE_WRAP_S */
  /*      GL_TEXTURE_WRAP_T */

  const unsigned long NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2;
  const unsigned long COMPRESSED_TEXTURE_FORMATS     = 0x86A3;

  /* HintMode */
  const unsigned long DONT_CARE                      = 0x1100;
  const unsigned long FASTEST                        = 0x1101;
  const unsigned long NICEST                         = 0x1102;

  /* HintTarget */
  const unsigned long GENERATE_MIPMAP_HINT            = 0x8192;

  /* DataType */
  const unsigned long BYTE                           = 0x1400;
  const unsigned long UNSIGNED_BYTE                  = 0x1401;
  const unsigned long SHORT                          = 0x1402;
  const unsigned long UNSIGNED_SHORT                 = 0x1403;
  const unsigned long INT                            = 0x1404;
  const unsigned long UNSIGNED_INT                   = 0x1405;
  const unsigned long FLOAT                          = 0x1406;

  /* PixelFormat */
  const unsigned long DEPTH_COMPONENT                = 0x1902;
  const unsigned long ALPHA                          = 0x1906;
  const unsigned long RGB                            = 0x1907;
  const unsigned long RGBA                           = 0x1908;
  const unsigned long LUMINANCE                      = 0x1909;
  const unsigned long LUMINANCE_ALPHA                = 0x190A;

  /* PixelType */
  /*      GL_UNSIGNED_BYTE */
  const unsigned long UNSIGNED_SHORT_4_4_4_4         = 0x8033;
  const unsigned long UNSIGNED_SHORT_5_5_5_1         = 0x8034;
  const unsigned long UNSIGNED_SHORT_5_6_5           = 0x8363;

  /* Shaders */
  const unsigned long FRAGMENT_SHADER                  = 0x8B30;
  const unsigned long VERTEX_SHADER                    = 0x8B31;
  const unsigned long MAX_VERTEX_ATTRIBS               = 0x8869;
  const unsigned long MAX_VERTEX_UNIFORM_VECTORS       = 0x8DFB;
  const unsigned long MAX_VARYING_VECTORS              = 0x8DFC;
  const unsigned long MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D;
  const unsigned long MAX_VERTEX_TEXTURE_IMAGE_UNITS   = 0x8B4C;
  const unsigned long MAX_TEXTURE_IMAGE_UNITS          = 0x8872;
  const unsigned long MAX_FRAGMENT_UNIFORM_VECTORS     = 0x8DFD;
  const unsigned long SHADER_TYPE                      = 0x8B4F;
  const unsigned long DELETE_STATUS                    = 0x8B80;
  const unsigned long LINK_STATUS                      = 0x8B82;
  const unsigned long VALIDATE_STATUS                  = 0x8B83;
  const unsigned long ATTACHED_SHADERS                 = 0x8B85;
  const unsigned long ACTIVE_UNIFORMS                  = 0x8B86;
  const unsigned long ACTIVE_ATTRIBUTES                = 0x8B89;
  const unsigned long SHADING_LANGUAGE_VERSION         = 0x8B8C;
  const unsigned long CURRENT_PROGRAM                  = 0x8B8D;

  /* StencilFunction */
  const unsigned long NEVER                          = 0x0200;
  const unsigned long LESS                           = 0x0201;
  const unsigned long EQUAL                          = 0x0202;
  const unsigned long LEQUAL                         = 0x0203;
  const unsigned long GREATER                        = 0x0204;
  const unsigned long NOTEQUAL                       = 0x0205;
  const unsigned long GEQUAL                         = 0x0206;
  const unsigned long ALWAYS                         = 0x0207;

  /* StencilOp */
  /*      GL_ZERO */
  const unsigned long KEEP                           = 0x1E00;
  const unsigned long REPLACE                        = 0x1E01;
  const unsigned long INCR                           = 0x1E02;
  const unsigned long DECR                           = 0x1E03;
  const unsigned long INVERT                         = 0x150A;
  const unsigned long INCR_WRAP                      = 0x8507;
  const unsigned long DECR_WRAP                      = 0x8508;

  /* StringName */
  const unsigned long VENDOR                         = 0x1F00;
  const unsigned long RENDERER                       = 0x1F01;
  const unsigned long VERSION                        = 0x1F02;
  const unsigned long EXTENSIONS                     = 0x1F03;

  /* TextureMagFilter */
  const unsigned long NEAREST                        = 0x2600;
  const unsigned long LINEAR                         = 0x2601;

  /* TextureMinFilter */
  /*      GL_NEAREST */
  /*      GL_LINEAR */
  const unsigned long NEAREST_MIPMAP_NEAREST         = 0x2700;
  const unsigned long LINEAR_MIPMAP_NEAREST          = 0x2701;
  const unsigned long NEAREST_MIPMAP_LINEAR          = 0x2702;
  const unsigned long LINEAR_MIPMAP_LINEAR           = 0x2703;

  /* TextureParameterName */
  const unsigned long TEXTURE_MAG_FILTER             = 0x2800;
  const unsigned long TEXTURE_MIN_FILTER             = 0x2801;
  const unsigned long TEXTURE_WRAP_S                 = 0x2802;
  const unsigned long TEXTURE_WRAP_T                 = 0x2803;

  /* TextureTarget */
  /*      GL_TEXTURE_2D */
  const unsigned long TEXTURE                        = 0x1702;

  const unsigned long TEXTURE_CUBE_MAP               = 0x8513;
  const unsigned long TEXTURE_BINDING_CUBE_MAP       = 0x8514;
  const unsigned long TEXTURE_CUBE_MAP_POSITIVE_X    = 0x8515;
  const unsigned long TEXTURE_CUBE_MAP_NEGATIVE_X    = 0x8516;
  const unsigned long TEXTURE_CUBE_MAP_POSITIVE_Y    = 0x8517;
  const unsigned long TEXTURE_CUBE_MAP_NEGATIVE_Y    = 0x8518;
  const unsigned long TEXTURE_CUBE_MAP_POSITIVE_Z    = 0x8519;
  const unsigned long TEXTURE_CUBE_MAP_NEGATIVE_Z    = 0x851A;
  const unsigned long MAX_CUBE_MAP_TEXTURE_SIZE      = 0x851C;

  /* TextureUnit */
  const unsigned long TEXTURE0                       = 0x84C0;
  const unsigned long TEXTURE1                       = 0x84C1;
  const unsigned long TEXTURE2                       = 0x84C2;
  const unsigned long TEXTURE3                       = 0x84C3;
  const unsigned long TEXTURE4                       = 0x84C4;
  const unsigned long TEXTURE5                       = 0x84C5;
  const unsigned long TEXTURE6                       = 0x84C6;
  const unsigned long TEXTURE7                       = 0x84C7;
  const unsigned long TEXTURE8                       = 0x84C8;
  const unsigned long TEXTURE9                       = 0x84C9;
  const unsigned long TEXTURE10                      = 0x84CA;
  const unsigned long TEXTURE11                      = 0x84CB;
  const unsigned long TEXTURE12                      = 0x84CC;
  const unsigned long TEXTURE13                      = 0x84CD;
  const unsigned long TEXTURE14                      = 0x84CE;
  const unsigned long TEXTURE15                      = 0x84CF;
  const unsigned long TEXTURE16                      = 0x84D0;
  const unsigned long TEXTURE17                      = 0x84D1;
  const unsigned long TEXTURE18                      = 0x84D2;
  const unsigned long TEXTURE19                      = 0x84D3;
  const unsigned long TEXTURE20                      = 0x84D4;
  const unsigned long TEXTURE21                      = 0x84D5;
  const unsigned long TEXTURE22                      = 0x84D6;
  const unsigned long TEXTURE23                      = 0x84D7;
  const unsigned long TEXTURE24                      = 0x84D8;
  const unsigned long TEXTURE25                      = 0x84D9;
  const unsigned long TEXTURE26                      = 0x84DA;
  const unsigned long TEXTURE27                      = 0x84DB;
  const unsigned long TEXTURE28                      = 0x84DC;
  const unsigned long TEXTURE29                      = 0x84DD;
  const unsigned long TEXTURE30                      = 0x84DE;
  const unsigned long TEXTURE31                      = 0x84DF;
  const unsigned long ACTIVE_TEXTURE                 = 0x84E0;

  /* TextureWrapMode */
  const unsigned long REPEAT                         = 0x2901;
  const unsigned long CLAMP_TO_EDGE                  = 0x812F;
  const unsigned long MIRRORED_REPEAT                = 0x8370;

  /* Uniform Types */
  const unsigned long FLOAT_VEC2                     = 0x8B50;
  const unsigned long FLOAT_VEC3                     = 0x8B51;
  const unsigned long FLOAT_VEC4                     = 0x8B52;
  const unsigned long INT_VEC2                       = 0x8B53;
  const unsigned long INT_VEC3                       = 0x8B54;
  const unsigned long INT_VEC4                       = 0x8B55;
  const unsigned long BOOL                           = 0x8B56;
  const unsigned long BOOL_VEC2                      = 0x8B57;
  const unsigned long BOOL_VEC3                      = 0x8B58;
  const unsigned long BOOL_VEC4                      = 0x8B59;
  const unsigned long FLOAT_MAT2                     = 0x8B5A;
  const unsigned long FLOAT_MAT3                     = 0x8B5B;
  const unsigned long FLOAT_MAT4                     = 0x8B5C;
  const unsigned long SAMPLER_2D                     = 0x8B5E;
  const unsigned long SAMPLER_CUBE                   = 0x8B60;

  /* Vertex Arrays */
  const unsigned long VERTEX_ATTRIB_ARRAY_ENABLED        = 0x8622;
  const unsigned long VERTEX_ATTRIB_ARRAY_SIZE           = 0x8623;
  const unsigned long VERTEX_ATTRIB_ARRAY_STRIDE         = 0x8624;
  const unsigned long VERTEX_ATTRIB_ARRAY_TYPE           = 0x8625;
  const unsigned long VERTEX_ATTRIB_ARRAY_NORMALIZED     = 0x886A;
  const unsigned long VERTEX_ATTRIB_ARRAY_POINTER        = 0x8645;
  const unsigned long VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;

  /* Shader Source */
  const unsigned long COMPILE_STATUS                 = 0x8B81;
  const unsigned long SHADER_COMPILER                = 0x8DFA;

  /* Shader Precision-Specified Types */
  const unsigned long LOW_FLOAT                      = 0x8DF0;
  const unsigned long MEDIUM_FLOAT                   = 0x8DF1;
  const unsigned long HIGH_FLOAT                     = 0x8DF2;
  const unsigned long LOW_INT                        = 0x8DF3;
  const unsigned long MEDIUM_INT                     = 0x8DF4;
  const unsigned long HIGH_INT                       = 0x8DF5;

  /* Framebuffer Object. */
  const unsigned long FRAMEBUFFER                    = 0x8D40;
  const unsigned long RENDERBUFFER                   = 0x8D41;

  const unsigned long RGBA4                          = 0x8056;
  const unsigned long RGB5_A1                        = 0x8057;
  const unsigned long RGB565                         = 0x8D62;
  const unsigned long DEPTH_COMPONENT16              = 0x81A5;
  const unsigned long STENCIL_INDEX                  = 0x1901;
  const unsigned long STENCIL_INDEX8                 = 0x8D48;
  const unsigned long DEPTH_STENCIL                  = 0x84F9;

  const unsigned long RENDERBUFFER_WIDTH             = 0x8D42;
  const unsigned long RENDERBUFFER_HEIGHT            = 0x8D43;
  const unsigned long RENDERBUFFER_INTERNAL_FORMAT   = 0x8D44;
  const unsigned long RENDERBUFFER_RED_SIZE          = 0x8D50;
  const unsigned long RENDERBUFFER_GREEN_SIZE        = 0x8D51;
  const unsigned long RENDERBUFFER_BLUE_SIZE         = 0x8D52;
  const unsigned long RENDERBUFFER_ALPHA_SIZE        = 0x8D53;
  const unsigned long RENDERBUFFER_DEPTH_SIZE        = 0x8D54;
  const unsigned long RENDERBUFFER_STENCIL_SIZE      = 0x8D55;

  const unsigned long FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE           = 0x8CD0;
  const unsigned long FRAMEBUFFER_ATTACHMENT_OBJECT_NAME           = 0x8CD1;
  const unsigned long FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL         = 0x8CD2;
  const unsigned long FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3;

  const unsigned long COLOR_ATTACHMENT0              = 0x8CE0;
  const unsigned long DEPTH_ATTACHMENT               = 0x8D00;
  const unsigned long STENCIL_ATTACHMENT             = 0x8D20;
  const unsigned long DEPTH_STENCIL_ATTACHMENT       = 0x821A;

  const unsigned long NONE                           = 0;

  const unsigned long FRAMEBUFFER_COMPLETE                      = 0x8CD5;
  const unsigned long FRAMEBUFFER_INCOMPLETE_ATTACHMENT         = 0x8CD6;
  const unsigned long FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7;
  const unsigned long FRAMEBUFFER_INCOMPLETE_DIMENSIONS         = 0x8CD9;
  const unsigned long FRAMEBUFFER_UNSUPPORTED                   = 0x8CDD;

  const unsigned long FRAMEBUFFER_BINDING            = 0x8CA6;
  const unsigned long RENDERBUFFER_BINDING           = 0x8CA7;
  const unsigned long MAX_RENDERBUFFER_SIZE          = 0x84E8;

  const unsigned long INVALID_FRAMEBUFFER_OPERATION  = 0x0506;

  const unsigned long UNPACK_FLIP_Y_WEBGL            = 0x9240;
  const unsigned long UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241;
  const unsigned long CONTEXT_LOST_WEBGL             = 0x9242;
  const unsigned long UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243;
  const unsigned long BROWSER_DEFAULT_WEBGL          = 0x9244;

  //
  //  ATTRIBUTES
  //
  readonly attribute nsIDOMHTMLCanvasElement canvas;

  //
  //  METHODS
  //
  jsval getContextAttributes();

  void activeTexture(in WebGLenum texture);
  void attachShader([optional] in nsIWebGLProgram program, [optional] in nsIWebGLShader shader);
  void bindAttribLocation(in nsIWebGLProgram program, in WebGLuint index, in DOMString name);
  void bindBuffer(in WebGLenum target, in nsIWebGLBuffer buffer);
  void bindFramebuffer(in WebGLenum target, in nsIWebGLFramebuffer framebuffer);
  void bindRenderbuffer(in WebGLenum target, in nsIWebGLRenderbuffer renderbuffer);
  void bindTexture(in WebGLenum target, in nsIWebGLTexture texture);
  void blendColor(in WebGLclampf red, in WebGLclampf green, in WebGLclampf blue, in WebGLclampf alpha);
  void blendEquation(in WebGLenum mode);
  void blendEquationSeparate(in WebGLenum modeRGB, in WebGLenum modeAlpha);
  void blendFunc(in WebGLenum sfactor, in WebGLenum dfactor);
  void blendFuncSeparate(in WebGLenum srcRGB, in WebGLenum dstRGB, in WebGLenum srcAlpha, in WebGLenum dstAlpha);

  // Modified: void glBufferData(WebGLenum target, long size, const void* data, WebGLenum usage);
  void bufferData([optional] in long dummy);
  [noscript] void bufferData_size(in WebGLenum target, in WebGLsizei size, in WebGLenum usage);
  [noscript] void bufferData_buf(in WebGLenum target, in WebGLJSObjectPtr data, in WebGLenum usage);
  [noscript] void bufferData_array(in WebGLenum target, in WebGLJSObjectPtr data, in WebGLenum usage);
  [noscript] void bufferData_null();

  void bufferSubData([optional] in long dummy);
  [noscript] void bufferSubData_buf(in WebGLenum target, in long offset, in WebGLJSObjectPtr data);
  [noscript] void bufferSubData_array(in WebGLenum target, in long offset, in WebGLJSObjectPtr data);
  [noscript] void bufferSubData_null();

  WebGLenum checkFramebufferStatus(in WebGLenum target);
  void clear(in WebGLbitfield mask);
  void clearColor(in WebGLclampf red, in WebGLclampf green, in WebGLclampf blue, in WebGLclampf alpha);
  void clearDepth(in WebGLclampf depth);
  void clearStencil(in WebGLint s);
  void colorMask(in WebGLboolean red, in WebGLboolean green, in WebGLboolean blue, in WebGLboolean alpha);
  void compileShader([optional] in nsIWebGLShader shader);

  void copyTexImage2D(in WebGLenum target, in WebGLint level, in WebGLenum internalformat, 
                      in WebGLint x, in WebGLint y, in WebGLsizei width, in WebGLsizei height, in WebGLint border);
  void copyTexSubImage2D(in WebGLenum target, in WebGLint level, in WebGLint xoffset, in WebGLint yoffset, 
                         in WebGLint x, in WebGLint y, in WebGLsizei width, in WebGLsizei height);

  nsIWebGLBuffer createBuffer();
  nsIWebGLProgram createProgram();
  nsIWebGLFramebuffer createFramebuffer();
  nsIWebGLRenderbuffer createRenderbuffer();
  nsIWebGLShader createShader(in WebGLenum type);
  nsIWebGLTexture createTexture();

  void cullFace(in WebGLenum mode);

  void deleteBuffer(in nsIWebGLBuffer buffer);
  void deleteProgram(in nsIWebGLProgram program);
  void deleteFramebuffer(in nsIWebGLFramebuffer framebuffer);
  void deleteRenderbuffer(in nsIWebGLRenderbuffer renderbuffer);
  void deleteShader(in nsIWebGLShader shader);
  void deleteTexture(in nsIWebGLTexture texture);

  void depthFunc(in WebGLenum func);
  void depthMask(in WebGLboolean flag);
  void depthRange(in WebGLclampf zNear, in WebGLclampf zFar);
  void detachShader(in nsIWebGLProgram program, in nsIWebGLShader shader);
  void disable(in WebGLenum cap);
  void disableVertexAttribArray(in WebGLuint index);
  void drawArrays(in WebGLenum mode, in WebGLint first, in WebGLsizei count);

  // Modified: void glDrawElements(WebGLenum mode, WebGLsizei count, WebGLenum type, const void* indices);
  void drawElements(in WebGLenum mode, in WebGLsizei count, in WebGLenum type, in WebGLint offset);

  void enable(in WebGLenum cap);
  void enableVertexAttribArray(in WebGLuint index);
  void finish();
  void flush();
  void framebufferRenderbuffer(in WebGLenum target, in WebGLenum attachment, in WebGLenum renderbuffertarget, 
                               in nsIWebGLRenderbuffer renderbuffer);
  void framebufferTexture2D(in WebGLenum target, in WebGLenum attachment, in WebGLenum textarget, 
                            in nsIWebGLTexture texture, in WebGLint level);
  void frontFace(in WebGLenum mode);

  void generateMipmap(in WebGLenum target);

  nsIWebGLActiveInfo getActiveAttrib(in nsIWebGLProgram program, in PRUint32 index);
  nsIWebGLActiveInfo getActiveUniform(in nsIWebGLProgram program, in PRUint32 index);

  nsIVariant getAttachedShaders(in nsIWebGLProgram program);

  WebGLint getAttribLocation(in nsIWebGLProgram program, in DOMString name);

  nsIVariant getParameter(in WebGLenum pname);

  // Modified: void glGetBufferParameteriv(WebGLenum target, WebGLenum pname, WebGLint* params);
  nsIVariant getBufferParameter(in WebGLenum target, in WebGLenum pname);

  WebGLenum getError();

  // Modified: void glGetFramebufferAttachmentParameteriv(WebGLenum target, WebGLenum attachment, WebGLenum pname, WebGLint* params);
  nsIVariant getFramebufferAttachmentParameter(in WebGLenum target, in WebGLenum attachment, in WebGLenum pname);

  // Modified: void glGetProgramiv(nsIWebGLProgram program, WebGLenum pname, WebGLint* params);
  nsIVariant getProgramParameter(in nsIWebGLProgram program, in WebGLenum pname);

  // Modified: void glGetProgramInfoLog(WebGLuint program, WebGLsizei bufsize, WebGLsizei* length, char* infolog);
  DOMString getProgramInfoLog(in nsIWebGLProgram program);

  // Modified: void glGetRenderbufferParameteriv(WebGLenum target, WebGLenum pname, WebGLint* params);
  //nsIWebGLIntArray getRenderbufferParameteriv(in WebGLenum target, in WebGLenum pname);
  nsIVariant getRenderbufferParameter(in WebGLenum target, in WebGLenum pname);

  nsIVariant getShaderParameter(in nsIWebGLShader shader, in WebGLenum pname);

  // Modified: void glGetShaderInfoLog(WebGLuint shader, WebGLsizei bufsize, WebGLsizei* length, char* infolog);
  DOMString getShaderInfoLog(in nsIWebGLShader shader);

  nsIWebGLShaderPrecisionFormat getShaderPrecisionFormat(in WebGLenum shadertype, in WebGLenum precisiontype);

  DOMString getShaderSource(in nsIWebGLShader shader);

  nsIVariant getTexParameter(in WebGLenum target, in WebGLenum pname);

  nsIVariant getUniform(in nsIWebGLProgram program, in nsIWebGLUniformLocation location);

  nsIWebGLUniformLocation getUniformLocation (in nsIWebGLProgram program, in DOMString name);

  nsIVariant getVertexAttrib(in WebGLuint index, in WebGLenum pname);

  // TBD
  // void glGetVertexAttribPointerv(WebGLuint index, WebGLenum pname, void** pointer);
  WebGLuint getVertexAttribOffset(in WebGLuint index, in WebGLenum pname);

  void hint(in WebGLenum target, in WebGLenum mode);

  WebGLboolean isBuffer(in nsIWebGLBuffer buffer);
  WebGLboolean isFramebuffer(in nsIWebGLFramebuffer framebuffer);
  WebGLboolean isProgram(in nsIWebGLProgram program);
  WebGLboolean isRenderbuffer(in nsIWebGLRenderbuffer renderbuffer);
  WebGLboolean isShader(in nsIWebGLShader shader);
  WebGLboolean isTexture(in nsIWebGLTexture texture);

  WebGLboolean isEnabled(in WebGLenum cap);
  void lineWidth(in WebGLfloat width);
  void linkProgram([optional] in nsIWebGLProgram program);
  void pixelStorei(in WebGLenum pname, in WebGLint param);
  void polygonOffset(in WebGLfloat factor, in WebGLfloat units);

  void readPixels([optional] in long dummy);
  [noscript] void readPixels_array(in WebGLint x, in WebGLint y, in WebGLsizei width, in WebGLsizei height,
                                   in WebGLenum format, in WebGLenum type, in WebGLJSObjectPtr pixels);

  //void glReleaseShaderCompiler();

  void renderbufferStorage(in WebGLenum target, in WebGLenum internalformat, in WebGLsizei width, in WebGLsizei height);
  void sampleCoverage(in WebGLclampf value, in WebGLboolean invert);
  void scissor(in WebGLint x, in WebGLint y, in WebGLsizei width, in WebGLsizei height);

  // Modified: void glShaderSource(WebGLuint shader, WebGLsizei count, const char** string, const WebGLint* length);
  void shaderSource([optional] in nsIWebGLShader shader, [optional] in DOMString source);

  void stencilFunc(in WebGLenum func, in WebGLint ref, in WebGLuint mask);
  void stencilFuncSeparate(in WebGLenum face, in WebGLenum func, in WebGLint ref, in WebGLuint mask);
  void stencilMask(in WebGLuint mask);
  void stencilMaskSeparate(in WebGLenum face, in WebGLuint mask);
  void stencilOp(in WebGLenum fail, in WebGLenum zfail, in WebGLenum zpass);
  void stencilOpSeparate(in WebGLenum face, in WebGLenum fail, in WebGLenum zfail, in WebGLenum zpass);

  void texImage2D([optional] in long dummy);
  [noscript] void texImage2D_array(in WebGLenum target, in WebGLint level, in WebGLenum internalformat,
                                   in WebGLsizei width, in WebGLsizei height,
                                   in WebGLint border, in WebGLenum format, in WebGLenum type, in WebGLJSObjectPtr pixels);
  [noscript] void texImage2D_imageData(in WebGLenum target, in WebGLint level, in WebGLenum internalformat,
                                   in WebGLsizei width, in WebGLsizei height,
                                   in WebGLint border, in WebGLenum format, in WebGLenum type, in WebGLJSObjectPtr pixels);

  // HTMLImageElement, HTMLCanvasElement, HTMLVideoElement
  [noscript] void texImage2D_dom(in WebGLenum target, in WebGLint level, in WebGLenum internalformat,
                                 in WebGLenum format, in WebGLenum type, in nsIDOMElement element);

  void texSubImage2D([optional] in long dummy);
  [noscript] void texSubImage2D_array(in WebGLenum target, in WebGLint level,
                                      in WebGLint xoffset, in WebGLint yoffset, in WebGLsizei width, in WebGLsizei height,
                                      in WebGLenum format, in WebGLenum type, in WebGLJSObjectPtr pixels);
  [noscript] void texSubImage2D_imageData(in WebGLenum target, in WebGLint level,
                                      in WebGLint xoffset, in WebGLint yoffset, in WebGLsizei width, in WebGLsizei height,
                                      in WebGLenum format, in WebGLenum type, in WebGLJSObjectPtr pixels);
  // HTMLImageElement, HTMLCanvasElement, HTMLVideoElement
  [noscript] void texSubImage2D_dom(in WebGLenum target, in WebGLint level,
                                    in WebGLint xoffset, in WebGLint yoffset, in WebGLenum format, in WebGLenum type,
                                    in nsIDOMElement element);

  // Modified: This replaces glTexParameterf, glTexParameterfv, glTexParameteri and glTexParameteriv
  void texParameterf(in WebGLenum target, in WebGLenum pname, in WebGLfloat param);
  void texParameteri(in WebGLenum target, in WebGLenum pname, in WebGLint param);
  //void glTexParameter(in WebGLenum target, in WebGLenum pname, in nsIWebGLArray params);

  // Modified: All the glUniform*v forms below are modified by replacing 'count' and 'v' with a nsIWebGLArray
  void uniform1f (in nsIWebGLUniformLocation location, in WebGLfloat x);
  void uniform1i (in nsIWebGLUniformLocation location, in WebGLint x);
  void uniform2f (in nsIWebGLUniformLocation location, in WebGLfloat x, in WebGLfloat y);
  void uniform2i (in nsIWebGLUniformLocation location, in WebGLint x, in WebGLint y);
  void uniform3f (in nsIWebGLUniformLocation location, in WebGLfloat x, in WebGLfloat y, in WebGLfloat z);
  void uniform3i (in nsIWebGLUniformLocation location, in WebGLint x, in WebGLint y, in WebGLint z);
  void uniform4f (in nsIWebGLUniformLocation location, in WebGLfloat x, in WebGLfloat y, in WebGLfloat z, in WebGLfloat w);
  void uniform4i (in nsIWebGLUniformLocation location, in WebGLint x, in WebGLint y, in WebGLint z, in WebGLint w);

  void uniform1fv([optional] in long dummy);
  void uniform1iv([optional] in long dummy);
  void uniform2fv([optional] in long dummy);
  void uniform2iv([optional] in long dummy);
  void uniform3fv([optional] in long dummy);
  void uniform3iv([optional] in long dummy);
  void uniform4fv([optional] in long dummy);
  void uniform4iv([optional] in long dummy);

  [noscript] void uniform1fv_array (in nsIWebGLUniformLocation location, in WebGLJSObjectPtr v);
  [noscript] void uniform1iv_array (in nsIWebGLUniformLocation location, in WebGLJSObjectPtr v);
  [noscript] void uniform2fv_array (in nsIWebGLUniformLocation location, in WebGLJSObjectPtr v);
  [noscript] void uniform2iv_array (in nsIWebGLUniformLocation location, in WebGLJSObjectPtr v);
  [noscript] void uniform3fv_array (in nsIWebGLUniformLocation location, in WebGLJSObjectPtr v);
  [noscript] void uniform3iv_array (in nsIWebGLUniformLocation location, in WebGLJSObjectPtr v);
  [noscript] void uniform4fv_array (in nsIWebGLUniformLocation location, in WebGLJSObjectPtr v);
  [noscript] void uniform4iv_array (in nsIWebGLUniformLocation location, in WebGLJSObjectPtr v);

  // Modified. These are modified by replacing 'count' and 'value' with a WebGLJSObjectPtr
  void uniformMatrix2fv([optional] in long dummy);
  void uniformMatrix3fv([optional] in long dummy);
  void uniformMatrix4fv([optional] in long dummy);

  [noscript] void uniformMatrix2fv_array (in nsIWebGLUniformLocation location, in WebGLboolean transpose, in WebGLJSObjectPtr value);
  [noscript] void uniformMatrix3fv_array (in nsIWebGLUniformLocation location, in WebGLboolean transpose, in WebGLJSObjectPtr value);
  [noscript] void uniformMatrix4fv_array (in nsIWebGLUniformLocation location, in WebGLboolean transpose, in WebGLJSObjectPtr value);

  // Added API using top entry from the passed nsIWebGLMatrixStack
  //ZZ void glUniformMatrix(in WebGLint location, in WebGLboolean transpose, in nsIWebGLMatrixStack value);

  void useProgram(in nsIWebGLProgram program);
  void validateProgram(in nsIWebGLProgram program);

  // Modified: All the glVertexAttrib*v forms below are modified by replacing 'values' with a WebGLJSObjectPtr
  void vertexAttrib1f(in WebGLuint indx, in WebGLfloat x);
  void vertexAttrib2f(in WebGLuint indx, in WebGLfloat x, in WebGLfloat y);
  void vertexAttrib3f(in WebGLuint indx, in WebGLfloat x, in WebGLfloat y, in WebGLfloat z);
  void vertexAttrib4f(in WebGLuint indx, in WebGLfloat x, in WebGLfloat y, in WebGLfloat z, in WebGLfloat w);

  void vertexAttrib1fv([optional] in long dummy);
  void vertexAttrib2fv([optional] in long dummy);
  void vertexAttrib3fv([optional] in long dummy);
  void vertexAttrib4fv([optional] in long dummy);

  [noscript] void vertexAttrib1fv_array(in WebGLuint indx, in WebGLJSObjectPtr values);
  [noscript] void vertexAttrib2fv_array(in WebGLuint indx, in WebGLJSObjectPtr values);
  [noscript] void vertexAttrib3fv_array(in WebGLuint indx, in WebGLJSObjectPtr values);
  [noscript] void vertexAttrib4fv_array(in WebGLuint indx, in WebGLJSObjectPtr values);

  // size is number of elements per attrib; offset, stride are in bytes
  void vertexAttribPointer(in WebGLuint idx, in WebGLint size, in WebGLenum type, in WebGLboolean normalized, in WebGLsizei stride, in WebGLsizeiptr offset);

  void viewport(in WebGLint x, in WebGLint y, in WebGLsizei width, in WebGLsizei height);

  // get an underlying GL parameter, without any WebGL intervention.
  // Most useful for querying GL_VENDOR/GL_RENDERER for identifying
  // the underlying renderer to the user.
  [noscript] DOMString mozGetUnderlyingParamString(in WebGLenum pname);

  // extensions
  nsIWebGLExtension getExtension(in DOMString name);

  nsIVariant getSupportedExtensions();
  WebGLboolean isContextLost();

  readonly attribute WebGLsizei drawingBufferWidth;
  readonly attribute WebGLsizei drawingBufferHeight;
};