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

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

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

Powered by Google App Engine
This is Rietveld 408576698