Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Side by Side Diff: Source/core/html/canvas/WebGLRenderingContext.idl

Issue 24096029: Moved the majority of WebGL functionality into WebGLRenderingContextBase (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * 7 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 8 * 1. Redistributions of source code must retain the above copyright
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 9 * notice, this list of conditions and the following disclaimer.
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 10 * 2. Redistributions in binary form must reproduce the above copyright
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 11 * notice, this list of conditions and the following disclaimer in the
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 12 * documentation and/or other materials provided with the distribution.
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 13 *
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 typedef unsigned long GLenum; 26 interface WebGLRenderingContext : WebGLRenderingContextBase {
27 typedef boolean GLboolean;
28 typedef unsigned long GLbitfield;
29 typedef byte GLbyte; /* 'byte' should be a signed 8 bit type. */
30 typedef short GLshort;
31 typedef long GLint;
32 typedef long GLsizei;
33 typedef long long GLintptr;
34 typedef long long GLsizeiptr;
35 typedef octet GLubyte; /* 'octet' should be an unsigned 8 bit ty pe. */
36 typedef unsigned short GLushort;
37 typedef unsigned long GLuint;
38 typedef /*unrestricted*/ float GLfloat;
39 typedef /*unrestricted*/ float GLclampf;
40
41 [
42 DoNotCheckConstants
43 ] interface WebGLRenderingContext : CanvasRenderingContext {
44
45 /* ClearBufferMask */
46 const GLenum DEPTH_BUFFER_BIT = 0x00000100;
47 const GLenum STENCIL_BUFFER_BIT = 0x00000400;
48 const GLenum COLOR_BUFFER_BIT = 0x00004000;
49
50 /* BeginMode */
51 const GLenum POINTS = 0x0000;
52 const GLenum LINES = 0x0001;
53 const GLenum LINE_LOOP = 0x0002;
54 const GLenum LINE_STRIP = 0x0003;
55 const GLenum TRIANGLES = 0x0004;
56 const GLenum TRIANGLE_STRIP = 0x0005;
57 const GLenum TRIANGLE_FAN = 0x0006;
58
59 /* AlphaFunction (not supported in ES20) */
60 /* NEVER */
61 /* LESS */
62 /* EQUAL */
63 /* LEQUAL */
64 /* GREATER */
65 /* NOTEQUAL */
66 /* GEQUAL */
67 /* ALWAYS */
68
69 /* BlendingFactorDest */
70 const GLenum ZERO = 0;
71 const GLenum ONE = 1;
72 const GLenum SRC_COLOR = 0x0300;
73 const GLenum ONE_MINUS_SRC_COLOR = 0x0301;
74 const GLenum SRC_ALPHA = 0x0302;
75 const GLenum ONE_MINUS_SRC_ALPHA = 0x0303;
76 const GLenum DST_ALPHA = 0x0304;
77 const GLenum ONE_MINUS_DST_ALPHA = 0x0305;
78
79 /* BlendingFactorSrc */
80 /* ZERO */
81 /* ONE */
82 const GLenum DST_COLOR = 0x0306;
83 const GLenum ONE_MINUS_DST_COLOR = 0x0307;
84 const GLenum SRC_ALPHA_SATURATE = 0x0308;
85 /* SRC_ALPHA */
86 /* ONE_MINUS_SRC_ALPHA */
87 /* DST_ALPHA */
88 /* ONE_MINUS_DST_ALPHA */
89
90 /* BlendEquationSeparate */
91 const GLenum FUNC_ADD = 0x8006;
92 const GLenum BLEND_EQUATION = 0x8009;
93 const GLenum BLEND_EQUATION_RGB = 0x8009; /* same as BLEND_EQU ATION */
94 const GLenum BLEND_EQUATION_ALPHA = 0x883D;
95
96 /* BlendSubtract */
97 const GLenum FUNC_SUBTRACT = 0x800A;
98 const GLenum FUNC_REVERSE_SUBTRACT = 0x800B;
99
100 /* Separate Blend Functions */
101 const GLenum BLEND_DST_RGB = 0x80C8;
102 const GLenum BLEND_SRC_RGB = 0x80C9;
103 const GLenum BLEND_DST_ALPHA = 0x80CA;
104 const GLenum BLEND_SRC_ALPHA = 0x80CB;
105 const GLenum CONSTANT_COLOR = 0x8001;
106 const GLenum ONE_MINUS_CONSTANT_COLOR = 0x8002;
107 const GLenum CONSTANT_ALPHA = 0x8003;
108 const GLenum ONE_MINUS_CONSTANT_ALPHA = 0x8004;
109 const GLenum BLEND_COLOR = 0x8005;
110
111 /* Buffer Objects */
112 const GLenum ARRAY_BUFFER = 0x8892;
113 const GLenum ELEMENT_ARRAY_BUFFER = 0x8893;
114 const GLenum ARRAY_BUFFER_BINDING = 0x8894;
115 const GLenum ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;
116
117 const GLenum STREAM_DRAW = 0x88E0;
118 const GLenum STATIC_DRAW = 0x88E4;
119 const GLenum DYNAMIC_DRAW = 0x88E8;
120
121 const GLenum BUFFER_SIZE = 0x8764;
122 const GLenum BUFFER_USAGE = 0x8765;
123
124 const GLenum CURRENT_VERTEX_ATTRIB = 0x8626;
125
126 /* CullFaceMode */
127 const GLenum FRONT = 0x0404;
128 const GLenum BACK = 0x0405;
129 const GLenum FRONT_AND_BACK = 0x0408;
130
131 /* DepthFunction */
132 /* NEVER */
133 /* LESS */
134 /* EQUAL */
135 /* LEQUAL */
136 /* GREATER */
137 /* NOTEQUAL */
138 /* GEQUAL */
139 /* ALWAYS */
140
141 /* EnableCap */
142 const GLenum TEXTURE_2D = 0x0DE1;
143 const GLenum CULL_FACE = 0x0B44;
144 const GLenum BLEND = 0x0BE2;
145 const GLenum DITHER = 0x0BD0;
146 const GLenum STENCIL_TEST = 0x0B90;
147 const GLenum DEPTH_TEST = 0x0B71;
148 const GLenum SCISSOR_TEST = 0x0C11;
149 const GLenum POLYGON_OFFSET_FILL = 0x8037;
150 const GLenum SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
151 const GLenum SAMPLE_COVERAGE = 0x80A0;
152
153 /* ErrorCode */
154 const GLenum NO_ERROR = 0;
155 const GLenum INVALID_ENUM = 0x0500;
156 const GLenum INVALID_VALUE = 0x0501;
157 const GLenum INVALID_OPERATION = 0x0502;
158 const GLenum OUT_OF_MEMORY = 0x0505;
159
160 /* FrontFaceDirection */
161 const GLenum CW = 0x0900;
162 const GLenum CCW = 0x0901;
163
164 /* GetPName */
165 const GLenum LINE_WIDTH = 0x0B21;
166 const GLenum ALIASED_POINT_SIZE_RANGE = 0x846D;
167 const GLenum ALIASED_LINE_WIDTH_RANGE = 0x846E;
168 const GLenum CULL_FACE_MODE = 0x0B45;
169 const GLenum FRONT_FACE = 0x0B46;
170 const GLenum DEPTH_RANGE = 0x0B70;
171 const GLenum DEPTH_WRITEMASK = 0x0B72;
172 const GLenum DEPTH_CLEAR_VALUE = 0x0B73;
173 const GLenum DEPTH_FUNC = 0x0B74;
174 const GLenum STENCIL_CLEAR_VALUE = 0x0B91;
175 const GLenum STENCIL_FUNC = 0x0B92;
176 const GLenum STENCIL_FAIL = 0x0B94;
177 const GLenum STENCIL_PASS_DEPTH_FAIL = 0x0B95;
178 const GLenum STENCIL_PASS_DEPTH_PASS = 0x0B96;
179 const GLenum STENCIL_REF = 0x0B97;
180 const GLenum STENCIL_VALUE_MASK = 0x0B93;
181 const GLenum STENCIL_WRITEMASK = 0x0B98;
182 const GLenum STENCIL_BACK_FUNC = 0x8800;
183 const GLenum STENCIL_BACK_FAIL = 0x8801;
184 const GLenum STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802;
185 const GLenum STENCIL_BACK_PASS_DEPTH_PASS = 0x8803;
186 const GLenum STENCIL_BACK_REF = 0x8CA3;
187 const GLenum STENCIL_BACK_VALUE_MASK = 0x8CA4;
188 const GLenum STENCIL_BACK_WRITEMASK = 0x8CA5;
189 const GLenum VIEWPORT = 0x0BA2;
190 const GLenum SCISSOR_BOX = 0x0C10;
191 /* SCISSOR_TEST */
192 const GLenum COLOR_CLEAR_VALUE = 0x0C22;
193 const GLenum COLOR_WRITEMASK = 0x0C23;
194 const GLenum UNPACK_ALIGNMENT = 0x0CF5;
195 const GLenum PACK_ALIGNMENT = 0x0D05;
196 const GLenum MAX_TEXTURE_SIZE = 0x0D33;
197 const GLenum MAX_VIEWPORT_DIMS = 0x0D3A;
198 const GLenum SUBPIXEL_BITS = 0x0D50;
199 const GLenum RED_BITS = 0x0D52;
200 const GLenum GREEN_BITS = 0x0D53;
201 const GLenum BLUE_BITS = 0x0D54;
202 const GLenum ALPHA_BITS = 0x0D55;
203 const GLenum DEPTH_BITS = 0x0D56;
204 const GLenum STENCIL_BITS = 0x0D57;
205 const GLenum POLYGON_OFFSET_UNITS = 0x2A00;
206 /* POLYGON_OFFSET_FILL */
207 const GLenum POLYGON_OFFSET_FACTOR = 0x8038;
208 const GLenum TEXTURE_BINDING_2D = 0x8069;
209 const GLenum SAMPLE_BUFFERS = 0x80A8;
210 const GLenum SAMPLES = 0x80A9;
211 const GLenum SAMPLE_COVERAGE_VALUE = 0x80AA;
212 const GLenum SAMPLE_COVERAGE_INVERT = 0x80AB;
213
214 /* GetTextureParameter */
215 /* TEXTURE_MAG_FILTER */
216 /* TEXTURE_MIN_FILTER */
217 /* TEXTURE_WRAP_S */
218 /* TEXTURE_WRAP_T */
219
220 const GLenum COMPRESSED_TEXTURE_FORMATS = 0x86A3;
221
222 /* HintMode */
223 const GLenum DONT_CARE = 0x1100;
224 const GLenum FASTEST = 0x1101;
225 const GLenum NICEST = 0x1102;
226
227 /* HintTarget */
228 const GLenum GENERATE_MIPMAP_HINT = 0x8192;
229
230 /* DataType */
231 const GLenum BYTE = 0x1400;
232 const GLenum UNSIGNED_BYTE = 0x1401;
233 const GLenum SHORT = 0x1402;
234 const GLenum UNSIGNED_SHORT = 0x1403;
235 const GLenum INT = 0x1404;
236 const GLenum UNSIGNED_INT = 0x1405;
237 const GLenum FLOAT = 0x1406;
238
239 /* PixelFormat */
240 const GLenum DEPTH_COMPONENT = 0x1902;
241 const GLenum ALPHA = 0x1906;
242 const GLenum RGB = 0x1907;
243 const GLenum RGBA = 0x1908;
244 const GLenum LUMINANCE = 0x1909;
245 const GLenum LUMINANCE_ALPHA = 0x190A;
246
247 /* PixelType */
248 /* UNSIGNED_BYTE */
249 const GLenum UNSIGNED_SHORT_4_4_4_4 = 0x8033;
250 const GLenum UNSIGNED_SHORT_5_5_5_1 = 0x8034;
251 const GLenum UNSIGNED_SHORT_5_6_5 = 0x8363;
252
253 /* Shaders */
254 const GLenum FRAGMENT_SHADER = 0x8B30;
255 const GLenum VERTEX_SHADER = 0x8B31;
256 const GLenum MAX_VERTEX_ATTRIBS = 0x8869;
257 const GLenum MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB;
258 const GLenum MAX_VARYING_VECTORS = 0x8DFC;
259 const GLenum MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D;
260 const GLenum MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C;
261 const GLenum MAX_TEXTURE_IMAGE_UNITS = 0x8872;
262 const GLenum MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD;
263 const GLenum SHADER_TYPE = 0x8B4F;
264 const GLenum DELETE_STATUS = 0x8B80;
265 const GLenum LINK_STATUS = 0x8B82;
266 const GLenum VALIDATE_STATUS = 0x8B83;
267 const GLenum ATTACHED_SHADERS = 0x8B85;
268 const GLenum ACTIVE_UNIFORMS = 0x8B86;
269 const GLenum ACTIVE_ATTRIBUTES = 0x8B89;
270 const GLenum SHADING_LANGUAGE_VERSION = 0x8B8C;
271 const GLenum CURRENT_PROGRAM = 0x8B8D;
272
273 /* StencilFunction */
274 const GLenum NEVER = 0x0200;
275 const GLenum LESS = 0x0201;
276 const GLenum EQUAL = 0x0202;
277 const GLenum LEQUAL = 0x0203;
278 const GLenum GREATER = 0x0204;
279 const GLenum NOTEQUAL = 0x0205;
280 const GLenum GEQUAL = 0x0206;
281 const GLenum ALWAYS = 0x0207;
282
283 /* StencilOp */
284 /* ZERO */
285 const GLenum KEEP = 0x1E00;
286 const GLenum REPLACE = 0x1E01;
287 const GLenum INCR = 0x1E02;
288 const GLenum DECR = 0x1E03;
289 const GLenum INVERT = 0x150A;
290 const GLenum INCR_WRAP = 0x8507;
291 const GLenum DECR_WRAP = 0x8508;
292
293 /* StringName */
294 const GLenum VENDOR = 0x1F00;
295 const GLenum RENDERER = 0x1F01;
296 const GLenum VERSION = 0x1F02;
297
298 /* TextureMagFilter */
299 const GLenum NEAREST = 0x2600;
300 const GLenum LINEAR = 0x2601;
301
302 /* TextureMinFilter */
303 /* NEAREST */
304 /* LINEAR */
305 const GLenum NEAREST_MIPMAP_NEAREST = 0x2700;
306 const GLenum LINEAR_MIPMAP_NEAREST = 0x2701;
307 const GLenum NEAREST_MIPMAP_LINEAR = 0x2702;
308 const GLenum LINEAR_MIPMAP_LINEAR = 0x2703;
309
310 /* TextureParameterName */
311 const GLenum TEXTURE_MAG_FILTER = 0x2800;
312 const GLenum TEXTURE_MIN_FILTER = 0x2801;
313 const GLenum TEXTURE_WRAP_S = 0x2802;
314 const GLenum TEXTURE_WRAP_T = 0x2803;
315
316 /* TextureTarget */
317 /* TEXTURE_2D */
318 const GLenum TEXTURE = 0x1702;
319
320 const GLenum TEXTURE_CUBE_MAP = 0x8513;
321 const GLenum TEXTURE_BINDING_CUBE_MAP = 0x8514;
322 const GLenum TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;
323 const GLenum TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;
324 const GLenum TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;
325 const GLenum TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;
326 const GLenum TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;
327 const GLenum TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;
328 const GLenum MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;
329
330 /* TextureUnit */
331 const GLenum TEXTURE0 = 0x84C0;
332 const GLenum TEXTURE1 = 0x84C1;
333 const GLenum TEXTURE2 = 0x84C2;
334 const GLenum TEXTURE3 = 0x84C3;
335 const GLenum TEXTURE4 = 0x84C4;
336 const GLenum TEXTURE5 = 0x84C5;
337 const GLenum TEXTURE6 = 0x84C6;
338 const GLenum TEXTURE7 = 0x84C7;
339 const GLenum TEXTURE8 = 0x84C8;
340 const GLenum TEXTURE9 = 0x84C9;
341 const GLenum TEXTURE10 = 0x84CA;
342 const GLenum TEXTURE11 = 0x84CB;
343 const GLenum TEXTURE12 = 0x84CC;
344 const GLenum TEXTURE13 = 0x84CD;
345 const GLenum TEXTURE14 = 0x84CE;
346 const GLenum TEXTURE15 = 0x84CF;
347 const GLenum TEXTURE16 = 0x84D0;
348 const GLenum TEXTURE17 = 0x84D1;
349 const GLenum TEXTURE18 = 0x84D2;
350 const GLenum TEXTURE19 = 0x84D3;
351 const GLenum TEXTURE20 = 0x84D4;
352 const GLenum TEXTURE21 = 0x84D5;
353 const GLenum TEXTURE22 = 0x84D6;
354 const GLenum TEXTURE23 = 0x84D7;
355 const GLenum TEXTURE24 = 0x84D8;
356 const GLenum TEXTURE25 = 0x84D9;
357 const GLenum TEXTURE26 = 0x84DA;
358 const GLenum TEXTURE27 = 0x84DB;
359 const GLenum TEXTURE28 = 0x84DC;
360 const GLenum TEXTURE29 = 0x84DD;
361 const GLenum TEXTURE30 = 0x84DE;
362 const GLenum TEXTURE31 = 0x84DF;
363 const GLenum ACTIVE_TEXTURE = 0x84E0;
364
365 /* TextureWrapMode */
366 const GLenum REPEAT = 0x2901;
367 const GLenum CLAMP_TO_EDGE = 0x812F;
368 const GLenum MIRRORED_REPEAT = 0x8370;
369
370 /* Uniform Types */
371 const GLenum FLOAT_VEC2 = 0x8B50;
372 const GLenum FLOAT_VEC3 = 0x8B51;
373 const GLenum FLOAT_VEC4 = 0x8B52;
374 const GLenum INT_VEC2 = 0x8B53;
375 const GLenum INT_VEC3 = 0x8B54;
376 const GLenum INT_VEC4 = 0x8B55;
377 const GLenum BOOL = 0x8B56;
378 const GLenum BOOL_VEC2 = 0x8B57;
379 const GLenum BOOL_VEC3 = 0x8B58;
380 const GLenum BOOL_VEC4 = 0x8B59;
381 const GLenum FLOAT_MAT2 = 0x8B5A;
382 const GLenum FLOAT_MAT3 = 0x8B5B;
383 const GLenum FLOAT_MAT4 = 0x8B5C;
384 const GLenum SAMPLER_2D = 0x8B5E;
385 const GLenum SAMPLER_CUBE = 0x8B60;
386
387 /* Vertex Arrays */
388 const GLenum VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622;
389 const GLenum VERTEX_ATTRIB_ARRAY_SIZE = 0x8623;
390 const GLenum VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624;
391 const GLenum VERTEX_ATTRIB_ARRAY_TYPE = 0x8625;
392 const GLenum VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;
393 const GLenum VERTEX_ATTRIB_ARRAY_POINTER = 0x8645;
394 const GLenum VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;
395
396 /* Shader Source */
397 const GLenum COMPILE_STATUS = 0x8B81;
398
399 /* Shader Precision-Specified Types */
400 const GLenum LOW_FLOAT = 0x8DF0;
401 const GLenum MEDIUM_FLOAT = 0x8DF1;
402 const GLenum HIGH_FLOAT = 0x8DF2;
403 const GLenum LOW_INT = 0x8DF3;
404 const GLenum MEDIUM_INT = 0x8DF4;
405 const GLenum HIGH_INT = 0x8DF5;
406
407 /* Framebuffer Object. */
408 const GLenum FRAMEBUFFER = 0x8D40;
409 const GLenum RENDERBUFFER = 0x8D41;
410
411 const GLenum RGBA4 = 0x8056;
412 const GLenum RGB5_A1 = 0x8057;
413 const GLenum RGB565 = 0x8D62;
414 const GLenum DEPTH_COMPONENT16 = 0x81A5;
415 const GLenum STENCIL_INDEX = 0x1901;
416 const GLenum STENCIL_INDEX8 = 0x8D48;
417 const GLenum DEPTH_STENCIL = 0x84F9;
418
419 const GLenum RENDERBUFFER_WIDTH = 0x8D42;
420 const GLenum RENDERBUFFER_HEIGHT = 0x8D43;
421 const GLenum RENDERBUFFER_INTERNAL_FORMAT = 0x8D44;
422 const GLenum RENDERBUFFER_RED_SIZE = 0x8D50;
423 const GLenum RENDERBUFFER_GREEN_SIZE = 0x8D51;
424 const GLenum RENDERBUFFER_BLUE_SIZE = 0x8D52;
425 const GLenum RENDERBUFFER_ALPHA_SIZE = 0x8D53;
426 const GLenum RENDERBUFFER_DEPTH_SIZE = 0x8D54;
427 const GLenum RENDERBUFFER_STENCIL_SIZE = 0x8D55;
428
429 const GLenum FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0;
430 const GLenum FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1;
431 const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2;
432 const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3;
433
434 const GLenum COLOR_ATTACHMENT0 = 0x8CE0;
435 const GLenum DEPTH_ATTACHMENT = 0x8D00;
436 const GLenum STENCIL_ATTACHMENT = 0x8D20;
437 const GLenum DEPTH_STENCIL_ATTACHMENT = 0x821A;
438
439 const GLenum NONE = 0;
440
441 const GLenum FRAMEBUFFER_COMPLETE = 0x8CD5;
442 const GLenum FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6;
443 const GLenum FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7;
444 const GLenum FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9;
445 const GLenum FRAMEBUFFER_UNSUPPORTED = 0x8CDD;
446
447 const GLenum FRAMEBUFFER_BINDING = 0x8CA6;
448 const GLenum RENDERBUFFER_BINDING = 0x8CA7;
449 const GLenum MAX_RENDERBUFFER_SIZE = 0x84E8;
450
451 const GLenum INVALID_FRAMEBUFFER_OPERATION = 0x0506;
452
453 /* WebGL-specific enums */
454 const GLenum UNPACK_FLIP_Y_WEBGL = 0x9240;
455 const GLenum UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241;
456 const GLenum CONTEXT_LOST_WEBGL = 0x9242;
457 const GLenum UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243;
458 const GLenum BROWSER_DEFAULT_WEBGL = 0x9244;
459
460 readonly attribute GLsizei drawingBufferWidth;
461 readonly attribute GLsizei drawingBufferHeight;
462
463 [StrictTypeChecking] void activeTexture(GLenum texture);
464 [StrictTypeChecking] void attachShader(WebGLProgram program, WebGLSh ader shader);
465 [StrictTypeChecking] void bindAttribLocation(WebGLProgram program, G Luint index, DOMString name);
466 [StrictTypeChecking] void bindBuffer(GLenum target, WebGLBuffer buff er);
467 [StrictTypeChecking] void bindFramebuffer(GLenum target, WebGLFrameb uffer framebuffer);
468 [StrictTypeChecking] void bindRenderbuffer(GLenum target, WebGLRende rbuffer renderbuffer);
469 [StrictTypeChecking] void bindTexture(GLenum target, WebGLTexture te xture);
470 [StrictTypeChecking] void blendColor(GLclampf red, GLclampf green, G Lclampf blue, GLclampf alpha);
471 [StrictTypeChecking] void blendEquation(GLenum mode);
472 [StrictTypeChecking] void blendEquationSeparate(GLenum modeRGB, GLen um modeAlpha);
473 [StrictTypeChecking] void blendFunc(GLenum sfactor, GLenum dfactor);
474 [StrictTypeChecking] void blendFuncSeparate(GLenum srcRGB, GLenum ds tRGB, GLenum srcAlpha, GLenum dstAlpha);
475 [StrictTypeChecking] void bufferData(GLenum target, ArrayBuffer? dat a, GLenum usage);
476 [StrictTypeChecking] void bufferData(GLenum target, ArrayBufferView? data, GLenum usage);
477 [StrictTypeChecking] void bufferData(GLenum target, GLsizeiptr size, GLenum usage);
478 [StrictTypeChecking] void bufferSubData(GLenum target, GLintptr offs et, ArrayBuffer? data);
479 [StrictTypeChecking] void bufferSubData(GLenum target, GLintptr offs et, ArrayBufferView? data);
480
481 [StrictTypeChecking] GLenum checkFramebufferStatus(GLenum target);
482 [StrictTypeChecking] void clear(GLbitfield mask);
483 [StrictTypeChecking] void clearColor(GLclampf red, GLclampf green, G Lclampf blue, GLclampf alpha);
484 [StrictTypeChecking] void clearDepth(GLclampf depth);
485 [StrictTypeChecking] void clearStencil(GLint s);
486 [StrictTypeChecking] void colorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
487 [StrictTypeChecking] void compileShader(WebGLShader shader);
488
489 [StrictTypeChecking] void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat,
490 GLsizei width, GLsize i height, GLint border, ArrayBufferView data);
491 [StrictTypeChecking] void compressedTexSubImage2D(GLenum target, GLi nt level, GLint xoffset, GLint yoffset,
492 GLsizei width, GLs izei height, GLenum format, ArrayBufferView data);
493
494 [StrictTypeChecking] void copyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint b order);
495 [StrictTypeChecking] void copyTexSubImage2D(GLenum target, GLint lev el, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei heigh t);
496
497 [StrictTypeChecking] WebGLBuffer createBuffer();
498 [StrictTypeChecking] WebGLFramebuffer createFramebuffer();
499 [StrictTypeChecking] WebGLProgram createProgram();
500 [StrictTypeChecking] WebGLRenderbuffer createRenderbuffer();
501 [StrictTypeChecking] WebGLShader createShader(GLenum type);
502 [StrictTypeChecking] WebGLTexture createTexture();
503
504 [StrictTypeChecking] void cullFace(GLenum mode);
505
506 [StrictTypeChecking] void deleteBuffer(WebGLBuffer buffer);
507 [StrictTypeChecking] void deleteFramebuffer(WebGLFramebuffer framebu ffer);
508 [StrictTypeChecking] void deleteProgram(WebGLProgram program);
509 [StrictTypeChecking] void deleteRenderbuffer(WebGLRenderbuffer rende rbuffer);
510 [StrictTypeChecking] void deleteShader(WebGLShader shader);
511 [StrictTypeChecking] void deleteTexture(WebGLTexture texture);
512
513 [StrictTypeChecking] void depthFunc(GLenum func);
514 [StrictTypeChecking] void depthMask(GLboolean flag);
515 [StrictTypeChecking] void depthRange(GLclampf zNear, GLclampf zFar);
516 [StrictTypeChecking] void detachShader(WebGLProgram program, WebGLSh ader shader);
517 [StrictTypeChecking] void disable(GLenum cap);
518 [StrictTypeChecking] void disableVertexAttribArray(GLuint index);
519 [StrictTypeChecking] void drawArrays(GLenum mode, GLint first, GLsiz ei count);
520 [StrictTypeChecking] void drawElements(GLenum mode, GLsizei count, G Lenum type, GLintptr offset);
521
522 [StrictTypeChecking] void enable(GLenum cap);
523 [StrictTypeChecking] void enableVertexAttribArray(GLuint index);
524 [StrictTypeChecking] void finish();
525 [StrictTypeChecking] void flush();
526 [StrictTypeChecking] void framebufferRenderbuffer(GLenum target, GLe num attachment, GLenum renderbuffertarget, WebGLRenderbuffer renderbuffer);
527 [StrictTypeChecking] void framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, WebGLTexture texture, GLint level);
528 [StrictTypeChecking] void frontFace(GLenum mode);
529 [StrictTypeChecking] void generateMipmap(GLenum target);
530
531 [StrictTypeChecking] WebGLActiveInfo getActiveAttrib(WebGLProgram program, G Luint index);
532 [StrictTypeChecking] WebGLActiveInfo getActiveUniform(WebGLProgram program, GLuint index);
533
534 [StrictTypeChecking, Custom] void getAttachedShaders(WebGLProgram program);
535
536 [StrictTypeChecking] GLint getAttribLocation(WebGLProgram program, DO MString name);
537
538 [StrictTypeChecking, Custom] any getBufferParameter(GLenum target, GLenum pn ame);
539
540 [StrictTypeChecking] WebGLContextAttributes getContextAttributes();
541
542 [StrictTypeChecking] GLenum getError();
543
544 // object getExtension(DOMString name);
545 [StrictTypeChecking, Custom] any getExtension(DOMString name);
546
547 [StrictTypeChecking, Custom] any getFramebufferAttachmentParameter(GLenum ta rget, GLenum attachment, GLenum pname);
548 [StrictTypeChecking, Custom] any getParameter(GLenum pname);
549 [StrictTypeChecking, Custom] any getProgramParameter(WebGLProgram program, G Lenum pname);
550 [StrictTypeChecking, TreatReturnedNullStringAs=Null] DOMString getProgramInf oLog(WebGLProgram program);
551 [StrictTypeChecking, Custom] any getRenderbufferParameter(GLenum target, GLe num pname);
552 [StrictTypeChecking, Custom] any getShaderParameter(WebGLShader shader, GLen um pname);
553
554 [StrictTypeChecking, TreatReturnedNullStringAs=Null] DOMString getShaderI nfoLog(WebGLShader shader);
555
556 [StrictTypeChecking] WebGLShaderPrecisionFormat getShaderPrecisionFormat(GLe num shadertype, GLenum precisiontype);
557
558 [StrictTypeChecking, TreatReturnedNullStringAs=Null] DOMString getShaderS ource(WebGLShader shader);
559
560 [StrictTypeChecking, Custom] sequence<DOMString> getSupportedExtensions();
561
562 [StrictTypeChecking, Custom] any getTexParameter(GLenum target, GLenum pname );
563
564 [StrictTypeChecking, Custom] any getUniform(WebGLProgram program, WebGLUnifo rmLocation location);
565
566 [StrictTypeChecking] WebGLUniformLocation getUniformLocation(WebGLProgram pr ogram, DOMString name);
567
568 [StrictTypeChecking, Custom] any getVertexAttrib(GLuint index, GLenum pname) ;
569
570 [StrictTypeChecking] GLsizeiptr getVertexAttribOffset(GLuint index, GLenum p name);
571
572 [StrictTypeChecking] void hint(GLenum target, GLenum mode);
573 [StrictTypeChecking] GLboolean isBuffer(WebGLBuffer buffer);
574 [StrictTypeChecking] GLboolean isContextLost();
575 [StrictTypeChecking] GLboolean isEnabled(GLenum cap);
576 [StrictTypeChecking] GLboolean isFramebuffer(WebGLFramebuffer framebuffer );
577 [StrictTypeChecking] GLboolean isProgram(WebGLProgram program);
578 [StrictTypeChecking] GLboolean isRenderbuffer(WebGLRenderbuffer renderbuf fer);
579 [StrictTypeChecking] GLboolean isShader(WebGLShader shader);
580 [StrictTypeChecking] GLboolean isTexture(WebGLTexture texture);
581 [StrictTypeChecking] void lineWidth(GLfloat width);
582 [StrictTypeChecking] void linkProgram(WebGLProgram program);
583 [StrictTypeChecking] void pixelStorei(GLenum pname, GLint param);
584 [StrictTypeChecking] void polygonOffset(GLfloat factor, GLfloat unit s);
585
586 [StrictTypeChecking] void readPixels(GLint x, GLint y, GLsizei width , GLsizei height, GLenum format, GLenum type, ArrayBufferView pixels);
587
588 [StrictTypeChecking] void renderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
589 [StrictTypeChecking] void sampleCoverage(GLclampf value, GLboolean i nvert);
590 [StrictTypeChecking] void scissor(GLint x, GLint y, GLsizei width, G Lsizei height);
591 [StrictTypeChecking] void shaderSource(WebGLShader shader, DOMString string);
592 [StrictTypeChecking] void stencilFunc(GLenum func, GLint ref, GLuint mask);
593 [StrictTypeChecking] void stencilFuncSeparate(GLenum face, GLenum fu nc, GLint ref, GLuint mask);
594 [StrictTypeChecking] void stencilMask(GLuint mask);
595 [StrictTypeChecking] void stencilMaskSeparate(GLenum face, GLuint ma sk);
596 [StrictTypeChecking] void stencilOp(GLenum fail, GLenum zfail, GLenu m zpass);
597 [StrictTypeChecking] void stencilOpSeparate(GLenum face, GLenum fail , GLenum zfail, GLenum zpass);
598
599 [StrictTypeChecking] void texParameterf(GLenum target, GLenum pname, GLfloat param);
600 [StrictTypeChecking] void texParameteri(GLenum target, GLenum pname, GLint param);
601
602 // Supported forms:
603 [StrictTypeChecking, RaisesException] void texImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height,
604 GLint border, GLenum format, GL enum type, ArrayBufferView? pixels);
605 [StrictTypeChecking, RaisesException] void texImage2D(GLenum target, GLint level, GLenum internalformat,
606 GLenum format, GLenum type, Ima geData? pixels);
607 [StrictTypeChecking, RaisesException] void texImage2D(GLenum target, GLint level, GLenum internalformat,
608 GLenum format, GLenum type, HTM LImageElement? image);
609 [StrictTypeChecking, RaisesException] void texImage2D(GLenum target, GLint level, GLenum internalformat,
610 GLenum format, GLenum type, HTM LCanvasElement? canvas);
611 [StrictTypeChecking, RaisesException] void texImage2D(GLenum target, GLint level, GLenum internalformat,
612 GLenum format, GLenum type, HTM LVideoElement? video);
613
614 [StrictTypeChecking, RaisesException] void texSubImage2D(GLenum targ et, GLint level, GLint xoffset, GLint yoffset,
615 GLsizei width, GLsizei heigh t,
616 GLenum format, GLenum type, ArrayBufferView? pixels);
617 [StrictTypeChecking, RaisesException] void texSubImage2D(GLenum targ et, GLint level, GLint xoffset, GLint yoffset,
618 GLenum format, GLenum type, ImageData? pixels);
619 [StrictTypeChecking, RaisesException] void texSubImage2D(GLenum targ et, GLint level, GLint xoffset, GLint yoffset,
620 GLenum format, GLenum type, HTMLImageElement? image);
621 [StrictTypeChecking, RaisesException] void texSubImage2D(GLenum targ et, GLint level, GLint xoffset, GLint yoffset,
622 GLenum format, GLenum type, HTMLCanvasElement? canvas);
623 [StrictTypeChecking, RaisesException] void texSubImage2D(GLenum targ et, GLint level, GLint xoffset, GLint yoffset,
624 GLenum format, GLenum type, HTMLVideoElement? video);
625
626 [StrictTypeChecking] void uniform1f(WebGLUniformLocation location, GLfloat x );
627 [StrictTypeChecking, Custom] void uniform1fv(WebGLUniformLocation location, Float32Array v);
628 [StrictTypeChecking] void uniform1i(WebGLUniformLocation location, GLint x);
629 [StrictTypeChecking, Custom] void uniform1iv(WebGLUniformLocation location, Int32Array v);
630 [StrictTypeChecking] void uniform2f(WebGLUniformLocation location, GLfloat x , GLfloat y);
631 [StrictTypeChecking, Custom] void uniform2fv(WebGLUniformLocation location, Float32Array v);
632 [StrictTypeChecking] void uniform2i(WebGLUniformLocation location, GLint x, GLint y);
633 [StrictTypeChecking, Custom] void uniform2iv(WebGLUniformLocation location, Int32Array v);
634 [StrictTypeChecking] void uniform3f(WebGLUniformLocation location, GLfloat x , GLfloat y, GLfloat z);
635 [StrictTypeChecking, Custom] void uniform3fv(WebGLUniformLocation location, Float32Array v);
636 [StrictTypeChecking] void uniform3i(WebGLUniformLocation location, GLint x, GLint y, GLint z);
637 [StrictTypeChecking, Custom] void uniform3iv(WebGLUniformLocation location, Int32Array v);
638 [StrictTypeChecking] void uniform4f(WebGLUniformLocation location, GLfloat x , GLfloat y, GLfloat z, GLfloat w);
639 [StrictTypeChecking, Custom] void uniform4fv(WebGLUniformLocation location, Float32Array v);
640 [StrictTypeChecking] void uniform4i(WebGLUniformLocation location, GLint x, GLint y, GLint z, GLint w);
641 [StrictTypeChecking, Custom] void uniform4iv(WebGLUniformLocation location, Int32Array v);
642
643 [StrictTypeChecking, Custom] void uniformMatrix2fv(WebGLUniformLocation loca tion, GLboolean transpose, Float32Array array);
644 [StrictTypeChecking, Custom] void uniformMatrix3fv(WebGLUniformLocation loca tion, GLboolean transpose, Float32Array array);
645 [StrictTypeChecking, Custom] void uniformMatrix4fv(WebGLUniformLocation loca tion, GLboolean transpose, Float32Array array);
646
647 [StrictTypeChecking] void useProgram(WebGLProgram program);
648 [StrictTypeChecking] void validateProgram(WebGLProgram program);
649
650 [StrictTypeChecking] void vertexAttrib1f(GLuint indx, GLfloat x);
651 [StrictTypeChecking, Custom] void vertexAttrib1fv(GLuint indx, Float32Array values);
652 [StrictTypeChecking] void vertexAttrib2f(GLuint indx, GLfloat x, GLf loat y);
653 [StrictTypeChecking, Custom] void vertexAttrib2fv(GLuint indx, Float32Array values);
654 [StrictTypeChecking] void vertexAttrib3f(GLuint indx, GLfloat x, GLf loat y, GLfloat z);
655 [StrictTypeChecking, Custom] void vertexAttrib3fv(GLuint indx, Float32Array values);
656 [StrictTypeChecking] void vertexAttrib4f(GLuint indx, GLfloat x, GLf loat y, GLfloat z, GLfloat w);
657 [StrictTypeChecking, Custom] void vertexAttrib4fv(GLuint indx, Float32Array values);
658 [StrictTypeChecking] void vertexAttribPointer(GLuint indx, GLint siz e, GLenum type, GLboolean normalized,
659 GLsizei stride, GLintp tr offset);
660
661 [StrictTypeChecking] void viewport(GLint x, GLint y, GLsizei width, GLsizei height);
662 }; 27 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698