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

Side by Side Diff: ppapi/shared_impl/ppb_opengles2_shared.cc

Issue 174213003: PPAPI: Use clang-format on ppapi/shared_impl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: remove DEPS Created 6 years, 10 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
« no previous file with comments | « ppapi/shared_impl/ppb_opengles2_shared.h ('k') | ppapi/shared_impl/ppb_tcp_socket_shared.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file is auto-generated from 5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py 6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // DO NOT EDIT! 7 // DO NOT EDIT!
8 8
9 #include "ppapi/shared_impl/ppb_opengles2_shared.h" 9 #include "ppapi/shared_impl/ppb_opengles2_shared.h"
10 10
(...skipping 21 matching lines...) Expand all
32 } 32 }
33 } 33 }
34 34
35 void AttachShader(PP_Resource context_id, GLuint program, GLuint shader) { 35 void AttachShader(PP_Resource context_id, GLuint program, GLuint shader) {
36 Enter3D enter(context_id, true); 36 Enter3D enter(context_id, true);
37 if (enter.succeeded()) { 37 if (enter.succeeded()) {
38 ToGles2Impl(&enter)->AttachShader(program, shader); 38 ToGles2Impl(&enter)->AttachShader(program, shader);
39 } 39 }
40 } 40 }
41 41
42 void BindAttribLocation( 42 void BindAttribLocation(PP_Resource context_id,
43 PP_Resource context_id, GLuint program, GLuint index, const char* name) { 43 GLuint program,
44 GLuint index,
45 const char* name) {
44 Enter3D enter(context_id, true); 46 Enter3D enter(context_id, true);
45 if (enter.succeeded()) { 47 if (enter.succeeded()) {
46 ToGles2Impl(&enter)->BindAttribLocation(program, index, name); 48 ToGles2Impl(&enter)->BindAttribLocation(program, index, name);
47 } 49 }
48 } 50 }
49 51
50 void BindBuffer(PP_Resource context_id, GLenum target, GLuint buffer) { 52 void BindBuffer(PP_Resource context_id, GLenum target, GLuint buffer) {
51 Enter3D enter(context_id, true); 53 Enter3D enter(context_id, true);
52 if (enter.succeeded()) { 54 if (enter.succeeded()) {
53 ToGles2Impl(&enter)->BindBuffer(target, buffer); 55 ToGles2Impl(&enter)->BindBuffer(target, buffer);
54 } 56 }
55 } 57 }
56 58
57 void BindFramebuffer( 59 void BindFramebuffer(PP_Resource context_id,
58 PP_Resource context_id, GLenum target, GLuint framebuffer) { 60 GLenum target,
61 GLuint framebuffer) {
59 Enter3D enter(context_id, true); 62 Enter3D enter(context_id, true);
60 if (enter.succeeded()) { 63 if (enter.succeeded()) {
61 ToGles2Impl(&enter)->BindFramebuffer(target, framebuffer); 64 ToGles2Impl(&enter)->BindFramebuffer(target, framebuffer);
62 } 65 }
63 } 66 }
64 67
65 void BindRenderbuffer( 68 void BindRenderbuffer(PP_Resource context_id,
66 PP_Resource context_id, GLenum target, GLuint renderbuffer) { 69 GLenum target,
70 GLuint renderbuffer) {
67 Enter3D enter(context_id, true); 71 Enter3D enter(context_id, true);
68 if (enter.succeeded()) { 72 if (enter.succeeded()) {
69 ToGles2Impl(&enter)->BindRenderbuffer(target, renderbuffer); 73 ToGles2Impl(&enter)->BindRenderbuffer(target, renderbuffer);
70 } 74 }
71 } 75 }
72 76
73 void BindTexture(PP_Resource context_id, GLenum target, GLuint texture) { 77 void BindTexture(PP_Resource context_id, GLenum target, GLuint texture) {
74 Enter3D enter(context_id, true); 78 Enter3D enter(context_id, true);
75 if (enter.succeeded()) { 79 if (enter.succeeded()) {
76 ToGles2Impl(&enter)->BindTexture(target, texture); 80 ToGles2Impl(&enter)->BindTexture(target, texture);
77 } 81 }
78 } 82 }
79 83
80 void BlendColor( 84 void BlendColor(PP_Resource context_id,
81 PP_Resource context_id, GLclampf red, GLclampf green, GLclampf blue, 85 GLclampf red,
82 GLclampf alpha) { 86 GLclampf green,
87 GLclampf blue,
88 GLclampf alpha) {
83 Enter3D enter(context_id, true); 89 Enter3D enter(context_id, true);
84 if (enter.succeeded()) { 90 if (enter.succeeded()) {
85 ToGles2Impl(&enter)->BlendColor(red, green, blue, alpha); 91 ToGles2Impl(&enter)->BlendColor(red, green, blue, alpha);
86 } 92 }
87 } 93 }
88 94
89 void BlendEquation(PP_Resource context_id, GLenum mode) { 95 void BlendEquation(PP_Resource context_id, GLenum mode) {
90 Enter3D enter(context_id, true); 96 Enter3D enter(context_id, true);
91 if (enter.succeeded()) { 97 if (enter.succeeded()) {
92 ToGles2Impl(&enter)->BlendEquation(mode); 98 ToGles2Impl(&enter)->BlendEquation(mode);
93 } 99 }
94 } 100 }
95 101
96 void BlendEquationSeparate( 102 void BlendEquationSeparate(PP_Resource context_id,
97 PP_Resource context_id, GLenum modeRGB, GLenum modeAlpha) { 103 GLenum modeRGB,
104 GLenum modeAlpha) {
98 Enter3D enter(context_id, true); 105 Enter3D enter(context_id, true);
99 if (enter.succeeded()) { 106 if (enter.succeeded()) {
100 ToGles2Impl(&enter)->BlendEquationSeparate(modeRGB, modeAlpha); 107 ToGles2Impl(&enter)->BlendEquationSeparate(modeRGB, modeAlpha);
101 } 108 }
102 } 109 }
103 110
104 void BlendFunc(PP_Resource context_id, GLenum sfactor, GLenum dfactor) { 111 void BlendFunc(PP_Resource context_id, GLenum sfactor, GLenum dfactor) {
105 Enter3D enter(context_id, true); 112 Enter3D enter(context_id, true);
106 if (enter.succeeded()) { 113 if (enter.succeeded()) {
107 ToGles2Impl(&enter)->BlendFunc(sfactor, dfactor); 114 ToGles2Impl(&enter)->BlendFunc(sfactor, dfactor);
108 } 115 }
109 } 116 }
110 117
111 void BlendFuncSeparate( 118 void BlendFuncSeparate(PP_Resource context_id,
112 PP_Resource context_id, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, 119 GLenum srcRGB,
113 GLenum dstAlpha) { 120 GLenum dstRGB,
121 GLenum srcAlpha,
122 GLenum dstAlpha) {
114 Enter3D enter(context_id, true); 123 Enter3D enter(context_id, true);
115 if (enter.succeeded()) { 124 if (enter.succeeded()) {
116 ToGles2Impl(&enter)->BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); 125 ToGles2Impl(&enter)->BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
117 } 126 }
118 } 127 }
119 128
120 void BufferData( 129 void BufferData(PP_Resource context_id,
121 PP_Resource context_id, GLenum target, GLsizeiptr size, const void* data, 130 GLenum target,
122 GLenum usage) { 131 GLsizeiptr size,
132 const void* data,
133 GLenum usage) {
123 Enter3D enter(context_id, true); 134 Enter3D enter(context_id, true);
124 if (enter.succeeded()) { 135 if (enter.succeeded()) {
125 ToGles2Impl(&enter)->BufferData(target, size, data, usage); 136 ToGles2Impl(&enter)->BufferData(target, size, data, usage);
126 } 137 }
127 } 138 }
128 139
129 void BufferSubData( 140 void BufferSubData(PP_Resource context_id,
130 PP_Resource context_id, GLenum target, GLintptr offset, GLsizeiptr size, 141 GLenum target,
131 const void* data) { 142 GLintptr offset,
143 GLsizeiptr size,
144 const void* data) {
132 Enter3D enter(context_id, true); 145 Enter3D enter(context_id, true);
133 if (enter.succeeded()) { 146 if (enter.succeeded()) {
134 ToGles2Impl(&enter)->BufferSubData(target, offset, size, data); 147 ToGles2Impl(&enter)->BufferSubData(target, offset, size, data);
135 } 148 }
136 } 149 }
137 150
138 GLenum CheckFramebufferStatus(PP_Resource context_id, GLenum target) { 151 GLenum CheckFramebufferStatus(PP_Resource context_id, GLenum target) {
139 Enter3D enter(context_id, true); 152 Enter3D enter(context_id, true);
140 if (enter.succeeded()) { 153 if (enter.succeeded()) {
141 return ToGles2Impl(&enter)->CheckFramebufferStatus(target); 154 return ToGles2Impl(&enter)->CheckFramebufferStatus(target);
142 } else { 155 } else {
143 return 0; 156 return 0;
144 } 157 }
145 } 158 }
146 159
147 void Clear(PP_Resource context_id, GLbitfield mask) { 160 void Clear(PP_Resource context_id, GLbitfield mask) {
148 Enter3D enter(context_id, true); 161 Enter3D enter(context_id, true);
149 if (enter.succeeded()) { 162 if (enter.succeeded()) {
150 ToGles2Impl(&enter)->Clear(mask); 163 ToGles2Impl(&enter)->Clear(mask);
151 } 164 }
152 } 165 }
153 166
154 void ClearColor( 167 void ClearColor(PP_Resource context_id,
155 PP_Resource context_id, GLclampf red, GLclampf green, GLclampf blue, 168 GLclampf red,
156 GLclampf alpha) { 169 GLclampf green,
170 GLclampf blue,
171 GLclampf alpha) {
157 Enter3D enter(context_id, true); 172 Enter3D enter(context_id, true);
158 if (enter.succeeded()) { 173 if (enter.succeeded()) {
159 ToGles2Impl(&enter)->ClearColor(red, green, blue, alpha); 174 ToGles2Impl(&enter)->ClearColor(red, green, blue, alpha);
160 } 175 }
161 } 176 }
162 177
163 void ClearDepthf(PP_Resource context_id, GLclampf depth) { 178 void ClearDepthf(PP_Resource context_id, GLclampf depth) {
164 Enter3D enter(context_id, true); 179 Enter3D enter(context_id, true);
165 if (enter.succeeded()) { 180 if (enter.succeeded()) {
166 ToGles2Impl(&enter)->ClearDepthf(depth); 181 ToGles2Impl(&enter)->ClearDepthf(depth);
167 } 182 }
168 } 183 }
169 184
170 void ClearStencil(PP_Resource context_id, GLint s) { 185 void ClearStencil(PP_Resource context_id, GLint s) {
171 Enter3D enter(context_id, true); 186 Enter3D enter(context_id, true);
172 if (enter.succeeded()) { 187 if (enter.succeeded()) {
173 ToGles2Impl(&enter)->ClearStencil(s); 188 ToGles2Impl(&enter)->ClearStencil(s);
174 } 189 }
175 } 190 }
176 191
177 void ColorMask( 192 void ColorMask(PP_Resource context_id,
178 PP_Resource context_id, GLboolean red, GLboolean green, GLboolean blue, 193 GLboolean red,
179 GLboolean alpha) { 194 GLboolean green,
195 GLboolean blue,
196 GLboolean alpha) {
180 Enter3D enter(context_id, true); 197 Enter3D enter(context_id, true);
181 if (enter.succeeded()) { 198 if (enter.succeeded()) {
182 ToGles2Impl(&enter)->ColorMask(red, green, blue, alpha); 199 ToGles2Impl(&enter)->ColorMask(red, green, blue, alpha);
183 } 200 }
184 } 201 }
185 202
186 void CompileShader(PP_Resource context_id, GLuint shader) { 203 void CompileShader(PP_Resource context_id, GLuint shader) {
187 Enter3D enter(context_id, true); 204 Enter3D enter(context_id, true);
188 if (enter.succeeded()) { 205 if (enter.succeeded()) {
189 ToGles2Impl(&enter)->CompileShader(shader); 206 ToGles2Impl(&enter)->CompileShader(shader);
190 } 207 }
191 } 208 }
192 209
193 void CompressedTexImage2D( 210 void CompressedTexImage2D(PP_Resource context_id,
194 PP_Resource context_id, GLenum target, GLint level, GLenum internalformat, 211 GLenum target,
195 GLsizei width, GLsizei height, GLint border, GLsizei imageSize, 212 GLint level,
196 const void* data) { 213 GLenum internalformat,
214 GLsizei width,
215 GLsizei height,
216 GLint border,
217 GLsizei imageSize,
218 const void* data) {
197 Enter3D enter(context_id, true); 219 Enter3D enter(context_id, true);
198 if (enter.succeeded()) { 220 if (enter.succeeded()) {
199 ToGles2Impl( 221 ToGles2Impl(&enter)->CompressedTexImage2D(
200 &enter)->CompressedTexImage2D( 222 target, level, internalformat, width, height, border, imageSize, data);
201 target, level, internalformat, width, height, border, imageSize,
202 data);
203 } 223 }
204 } 224 }
205 225
206 void CompressedTexSubImage2D( 226 void CompressedTexSubImage2D(PP_Resource context_id,
207 PP_Resource context_id, GLenum target, GLint level, GLint xoffset, 227 GLenum target,
208 GLint yoffset, GLsizei width, GLsizei height, GLenum format, 228 GLint level,
209 GLsizei imageSize, const void* data) { 229 GLint xoffset,
230 GLint yoffset,
231 GLsizei width,
232 GLsizei height,
233 GLenum format,
234 GLsizei imageSize,
235 const void* data) {
210 Enter3D enter(context_id, true); 236 Enter3D enter(context_id, true);
211 if (enter.succeeded()) { 237 if (enter.succeeded()) {
212 ToGles2Impl( 238 ToGles2Impl(&enter)->CompressedTexSubImage2D(target,
213 &enter)->CompressedTexSubImage2D( 239 level,
214 target, level, xoffset, yoffset, width, height, format, imageSize, 240 xoffset,
215 data); 241 yoffset,
242 width,
243 height,
244 format,
245 imageSize,
246 data);
216 } 247 }
217 } 248 }
218 249
219 void CopyTexImage2D( 250 void CopyTexImage2D(PP_Resource context_id,
220 PP_Resource context_id, GLenum target, GLint level, GLenum internalformat, 251 GLenum target,
221 GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { 252 GLint level,
253 GLenum internalformat,
254 GLint x,
255 GLint y,
256 GLsizei width,
257 GLsizei height,
258 GLint border) {
222 Enter3D enter(context_id, true); 259 Enter3D enter(context_id, true);
223 if (enter.succeeded()) { 260 if (enter.succeeded()) {
224 ToGles2Impl( 261 ToGles2Impl(&enter)->CopyTexImage2D(
225 &enter)->CopyTexImage2D( 262 target, level, internalformat, x, y, width, height, border);
226 target, level, internalformat, x, y, width, height, border);
227 } 263 }
228 } 264 }
229 265
230 void CopyTexSubImage2D( 266 void CopyTexSubImage2D(PP_Resource context_id,
231 PP_Resource context_id, GLenum target, GLint level, GLint xoffset, 267 GLenum target,
232 GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { 268 GLint level,
269 GLint xoffset,
270 GLint yoffset,
271 GLint x,
272 GLint y,
273 GLsizei width,
274 GLsizei height) {
233 Enter3D enter(context_id, true); 275 Enter3D enter(context_id, true);
234 if (enter.succeeded()) { 276 if (enter.succeeded()) {
235 ToGles2Impl( 277 ToGles2Impl(&enter)->CopyTexSubImage2D(
236 &enter)->CopyTexSubImage2D( 278 target, level, xoffset, yoffset, x, y, width, height);
237 target, level, xoffset, yoffset, x, y, width, height);
238 } 279 }
239 } 280 }
240 281
241 GLuint CreateProgram(PP_Resource context_id) { 282 GLuint CreateProgram(PP_Resource context_id) {
242 Enter3D enter(context_id, true); 283 Enter3D enter(context_id, true);
243 if (enter.succeeded()) { 284 if (enter.succeeded()) {
244 return ToGles2Impl(&enter)->CreateProgram(); 285 return ToGles2Impl(&enter)->CreateProgram();
245 } else { 286 } else {
246 return 0; 287 return 0;
247 } 288 }
(...skipping 15 matching lines...) Expand all
263 } 304 }
264 } 305 }
265 306
266 void DeleteBuffers(PP_Resource context_id, GLsizei n, const GLuint* buffers) { 307 void DeleteBuffers(PP_Resource context_id, GLsizei n, const GLuint* buffers) {
267 Enter3D enter(context_id, true); 308 Enter3D enter(context_id, true);
268 if (enter.succeeded()) { 309 if (enter.succeeded()) {
269 ToGles2Impl(&enter)->DeleteBuffers(n, buffers); 310 ToGles2Impl(&enter)->DeleteBuffers(n, buffers);
270 } 311 }
271 } 312 }
272 313
273 void DeleteFramebuffers( 314 void DeleteFramebuffers(PP_Resource context_id,
274 PP_Resource context_id, GLsizei n, const GLuint* framebuffers) { 315 GLsizei n,
316 const GLuint* framebuffers) {
275 Enter3D enter(context_id, true); 317 Enter3D enter(context_id, true);
276 if (enter.succeeded()) { 318 if (enter.succeeded()) {
277 ToGles2Impl(&enter)->DeleteFramebuffers(n, framebuffers); 319 ToGles2Impl(&enter)->DeleteFramebuffers(n, framebuffers);
278 } 320 }
279 } 321 }
280 322
281 void DeleteProgram(PP_Resource context_id, GLuint program) { 323 void DeleteProgram(PP_Resource context_id, GLuint program) {
282 Enter3D enter(context_id, true); 324 Enter3D enter(context_id, true);
283 if (enter.succeeded()) { 325 if (enter.succeeded()) {
284 ToGles2Impl(&enter)->DeleteProgram(program); 326 ToGles2Impl(&enter)->DeleteProgram(program);
285 } 327 }
286 } 328 }
287 329
288 void DeleteRenderbuffers( 330 void DeleteRenderbuffers(PP_Resource context_id,
289 PP_Resource context_id, GLsizei n, const GLuint* renderbuffers) { 331 GLsizei n,
332 const GLuint* renderbuffers) {
290 Enter3D enter(context_id, true); 333 Enter3D enter(context_id, true);
291 if (enter.succeeded()) { 334 if (enter.succeeded()) {
292 ToGles2Impl(&enter)->DeleteRenderbuffers(n, renderbuffers); 335 ToGles2Impl(&enter)->DeleteRenderbuffers(n, renderbuffers);
293 } 336 }
294 } 337 }
295 338
296 void DeleteShader(PP_Resource context_id, GLuint shader) { 339 void DeleteShader(PP_Resource context_id, GLuint shader) {
297 Enter3D enter(context_id, true); 340 Enter3D enter(context_id, true);
298 if (enter.succeeded()) { 341 if (enter.succeeded()) {
299 ToGles2Impl(&enter)->DeleteShader(shader); 342 ToGles2Impl(&enter)->DeleteShader(shader);
300 } 343 }
301 } 344 }
302 345
303 void DeleteTextures( 346 void DeleteTextures(PP_Resource context_id, GLsizei n, const GLuint* textures) {
304 PP_Resource context_id, GLsizei n, const GLuint* textures) {
305 Enter3D enter(context_id, true); 347 Enter3D enter(context_id, true);
306 if (enter.succeeded()) { 348 if (enter.succeeded()) {
307 ToGles2Impl(&enter)->DeleteTextures(n, textures); 349 ToGles2Impl(&enter)->DeleteTextures(n, textures);
308 } 350 }
309 } 351 }
310 352
311 void DepthFunc(PP_Resource context_id, GLenum func) { 353 void DepthFunc(PP_Resource context_id, GLenum func) {
312 Enter3D enter(context_id, true); 354 Enter3D enter(context_id, true);
313 if (enter.succeeded()) { 355 if (enter.succeeded()) {
314 ToGles2Impl(&enter)->DepthFunc(func); 356 ToGles2Impl(&enter)->DepthFunc(func);
(...skipping 28 matching lines...) Expand all
343 } 385 }
344 } 386 }
345 387
346 void DisableVertexAttribArray(PP_Resource context_id, GLuint index) { 388 void DisableVertexAttribArray(PP_Resource context_id, GLuint index) {
347 Enter3D enter(context_id, true); 389 Enter3D enter(context_id, true);
348 if (enter.succeeded()) { 390 if (enter.succeeded()) {
349 ToGles2Impl(&enter)->DisableVertexAttribArray(index); 391 ToGles2Impl(&enter)->DisableVertexAttribArray(index);
350 } 392 }
351 } 393 }
352 394
353 void DrawArrays( 395 void DrawArrays(PP_Resource context_id,
354 PP_Resource context_id, GLenum mode, GLint first, GLsizei count) { 396 GLenum mode,
397 GLint first,
398 GLsizei count) {
355 Enter3D enter(context_id, true); 399 Enter3D enter(context_id, true);
356 if (enter.succeeded()) { 400 if (enter.succeeded()) {
357 ToGles2Impl(&enter)->DrawArrays(mode, first, count); 401 ToGles2Impl(&enter)->DrawArrays(mode, first, count);
358 } 402 }
359 } 403 }
360 404
361 void DrawElements( 405 void DrawElements(PP_Resource context_id,
362 PP_Resource context_id, GLenum mode, GLsizei count, GLenum type, 406 GLenum mode,
363 const void* indices) { 407 GLsizei count,
408 GLenum type,
409 const void* indices) {
364 Enter3D enter(context_id, true); 410 Enter3D enter(context_id, true);
365 if (enter.succeeded()) { 411 if (enter.succeeded()) {
366 ToGles2Impl(&enter)->DrawElements(mode, count, type, indices); 412 ToGles2Impl(&enter)->DrawElements(mode, count, type, indices);
367 } 413 }
368 } 414 }
369 415
370 void Enable(PP_Resource context_id, GLenum cap) { 416 void Enable(PP_Resource context_id, GLenum cap) {
371 Enter3D enter(context_id, true); 417 Enter3D enter(context_id, true);
372 if (enter.succeeded()) { 418 if (enter.succeeded()) {
373 ToGles2Impl(&enter)->Enable(cap); 419 ToGles2Impl(&enter)->Enable(cap);
(...skipping 14 matching lines...) Expand all
388 } 434 }
389 } 435 }
390 436
391 void Flush(PP_Resource context_id) { 437 void Flush(PP_Resource context_id) {
392 Enter3D enter(context_id, true); 438 Enter3D enter(context_id, true);
393 if (enter.succeeded()) { 439 if (enter.succeeded()) {
394 ToGles2Impl(&enter)->Flush(); 440 ToGles2Impl(&enter)->Flush();
395 } 441 }
396 } 442 }
397 443
398 void FramebufferRenderbuffer( 444 void FramebufferRenderbuffer(PP_Resource context_id,
399 PP_Resource context_id, GLenum target, GLenum attachment, 445 GLenum target,
400 GLenum renderbuffertarget, GLuint renderbuffer) { 446 GLenum attachment,
447 GLenum renderbuffertarget,
448 GLuint renderbuffer) {
401 Enter3D enter(context_id, true); 449 Enter3D enter(context_id, true);
402 if (enter.succeeded()) { 450 if (enter.succeeded()) {
403 ToGles2Impl( 451 ToGles2Impl(&enter)->FramebufferRenderbuffer(
404 &enter)->FramebufferRenderbuffer( 452 target, attachment, renderbuffertarget, renderbuffer);
405 target, attachment, renderbuffertarget, renderbuffer);
406 } 453 }
407 } 454 }
408 455
409 void FramebufferTexture2D( 456 void FramebufferTexture2D(PP_Resource context_id,
410 PP_Resource context_id, GLenum target, GLenum attachment, GLenum textarget, 457 GLenum target,
411 GLuint texture, GLint level) { 458 GLenum attachment,
459 GLenum textarget,
460 GLuint texture,
461 GLint level) {
412 Enter3D enter(context_id, true); 462 Enter3D enter(context_id, true);
413 if (enter.succeeded()) { 463 if (enter.succeeded()) {
414 ToGles2Impl( 464 ToGles2Impl(&enter)
415 &enter)->FramebufferTexture2D( 465 ->FramebufferTexture2D(target, attachment, textarget, texture, level);
416 target, attachment, textarget, texture, level);
417 } 466 }
418 } 467 }
419 468
420 void FrontFace(PP_Resource context_id, GLenum mode) { 469 void FrontFace(PP_Resource context_id, GLenum mode) {
421 Enter3D enter(context_id, true); 470 Enter3D enter(context_id, true);
422 if (enter.succeeded()) { 471 if (enter.succeeded()) {
423 ToGles2Impl(&enter)->FrontFace(mode); 472 ToGles2Impl(&enter)->FrontFace(mode);
424 } 473 }
425 } 474 }
426 475
(...skipping 11 matching lines...) Expand all
438 } 487 }
439 } 488 }
440 489
441 void GenFramebuffers(PP_Resource context_id, GLsizei n, GLuint* framebuffers) { 490 void GenFramebuffers(PP_Resource context_id, GLsizei n, GLuint* framebuffers) {
442 Enter3D enter(context_id, true); 491 Enter3D enter(context_id, true);
443 if (enter.succeeded()) { 492 if (enter.succeeded()) {
444 ToGles2Impl(&enter)->GenFramebuffers(n, framebuffers); 493 ToGles2Impl(&enter)->GenFramebuffers(n, framebuffers);
445 } 494 }
446 } 495 }
447 496
448 void GenRenderbuffers( 497 void GenRenderbuffers(PP_Resource context_id,
449 PP_Resource context_id, GLsizei n, GLuint* renderbuffers) { 498 GLsizei n,
499 GLuint* renderbuffers) {
450 Enter3D enter(context_id, true); 500 Enter3D enter(context_id, true);
451 if (enter.succeeded()) { 501 if (enter.succeeded()) {
452 ToGles2Impl(&enter)->GenRenderbuffers(n, renderbuffers); 502 ToGles2Impl(&enter)->GenRenderbuffers(n, renderbuffers);
453 } 503 }
454 } 504 }
455 505
456 void GenTextures(PP_Resource context_id, GLsizei n, GLuint* textures) { 506 void GenTextures(PP_Resource context_id, GLsizei n, GLuint* textures) {
457 Enter3D enter(context_id, true); 507 Enter3D enter(context_id, true);
458 if (enter.succeeded()) { 508 if (enter.succeeded()) {
459 ToGles2Impl(&enter)->GenTextures(n, textures); 509 ToGles2Impl(&enter)->GenTextures(n, textures);
460 } 510 }
461 } 511 }
462 512
463 void GetActiveAttrib( 513 void GetActiveAttrib(PP_Resource context_id,
464 PP_Resource context_id, GLuint program, GLuint index, GLsizei bufsize, 514 GLuint program,
465 GLsizei* length, GLint* size, GLenum* type, char* name) { 515 GLuint index,
516 GLsizei bufsize,
517 GLsizei* length,
518 GLint* size,
519 GLenum* type,
520 char* name) {
466 Enter3D enter(context_id, true); 521 Enter3D enter(context_id, true);
467 if (enter.succeeded()) { 522 if (enter.succeeded()) {
468 ToGles2Impl( 523 ToGles2Impl(&enter)
469 &enter)->GetActiveAttrib( 524 ->GetActiveAttrib(program, index, bufsize, length, size, type, name);
470 program, index, bufsize, length, size, type, name);
471 } 525 }
472 } 526 }
473 527
474 void GetActiveUniform( 528 void GetActiveUniform(PP_Resource context_id,
475 PP_Resource context_id, GLuint program, GLuint index, GLsizei bufsize, 529 GLuint program,
476 GLsizei* length, GLint* size, GLenum* type, char* name) { 530 GLuint index,
531 GLsizei bufsize,
532 GLsizei* length,
533 GLint* size,
534 GLenum* type,
535 char* name) {
477 Enter3D enter(context_id, true); 536 Enter3D enter(context_id, true);
478 if (enter.succeeded()) { 537 if (enter.succeeded()) {
479 ToGles2Impl( 538 ToGles2Impl(&enter)
480 &enter)->GetActiveUniform( 539 ->GetActiveUniform(program, index, bufsize, length, size, type, name);
481 program, index, bufsize, length, size, type, name);
482 } 540 }
483 } 541 }
484 542
485 void GetAttachedShaders( 543 void GetAttachedShaders(PP_Resource context_id,
486 PP_Resource context_id, GLuint program, GLsizei maxcount, GLsizei* count, 544 GLuint program,
487 GLuint* shaders) { 545 GLsizei maxcount,
546 GLsizei* count,
547 GLuint* shaders) {
488 Enter3D enter(context_id, true); 548 Enter3D enter(context_id, true);
489 if (enter.succeeded()) { 549 if (enter.succeeded()) {
490 ToGles2Impl(&enter)->GetAttachedShaders(program, maxcount, count, shaders); 550 ToGles2Impl(&enter)->GetAttachedShaders(program, maxcount, count, shaders);
491 } 551 }
492 } 552 }
493 553
494 GLint GetAttribLocation( 554 GLint GetAttribLocation(PP_Resource context_id,
495 PP_Resource context_id, GLuint program, const char* name) { 555 GLuint program,
556 const char* name) {
496 Enter3D enter(context_id, true); 557 Enter3D enter(context_id, true);
497 if (enter.succeeded()) { 558 if (enter.succeeded()) {
498 return ToGles2Impl(&enter)->GetAttribLocation(program, name); 559 return ToGles2Impl(&enter)->GetAttribLocation(program, name);
499 } else { 560 } else {
500 return -1; 561 return -1;
501 } 562 }
502 } 563 }
503 564
504 void GetBooleanv(PP_Resource context_id, GLenum pname, GLboolean* params) { 565 void GetBooleanv(PP_Resource context_id, GLenum pname, GLboolean* params) {
505 Enter3D enter(context_id, true); 566 Enter3D enter(context_id, true);
506 if (enter.succeeded()) { 567 if (enter.succeeded()) {
507 ToGles2Impl(&enter)->GetBooleanv(pname, params); 568 ToGles2Impl(&enter)->GetBooleanv(pname, params);
508 } 569 }
509 } 570 }
510 571
511 void GetBufferParameteriv( 572 void GetBufferParameteriv(PP_Resource context_id,
512 PP_Resource context_id, GLenum target, GLenum pname, GLint* params) { 573 GLenum target,
574 GLenum pname,
575 GLint* params) {
513 Enter3D enter(context_id, true); 576 Enter3D enter(context_id, true);
514 if (enter.succeeded()) { 577 if (enter.succeeded()) {
515 ToGles2Impl(&enter)->GetBufferParameteriv(target, pname, params); 578 ToGles2Impl(&enter)->GetBufferParameteriv(target, pname, params);
516 } 579 }
517 } 580 }
518 581
519 GLenum GetError(PP_Resource context_id) { 582 GLenum GetError(PP_Resource context_id) {
520 Enter3D enter(context_id, true); 583 Enter3D enter(context_id, true);
521 if (enter.succeeded()) { 584 if (enter.succeeded()) {
522 return ToGles2Impl(&enter)->GetError(); 585 return ToGles2Impl(&enter)->GetError();
523 } else { 586 } else {
524 return 0; 587 return 0;
525 } 588 }
526 } 589 }
527 590
528 void GetFloatv(PP_Resource context_id, GLenum pname, GLfloat* params) { 591 void GetFloatv(PP_Resource context_id, GLenum pname, GLfloat* params) {
529 Enter3D enter(context_id, true); 592 Enter3D enter(context_id, true);
530 if (enter.succeeded()) { 593 if (enter.succeeded()) {
531 ToGles2Impl(&enter)->GetFloatv(pname, params); 594 ToGles2Impl(&enter)->GetFloatv(pname, params);
532 } 595 }
533 } 596 }
534 597
535 void GetFramebufferAttachmentParameteriv( 598 void GetFramebufferAttachmentParameteriv(PP_Resource context_id,
536 PP_Resource context_id, GLenum target, GLenum attachment, GLenum pname, 599 GLenum target,
537 GLint* params) { 600 GLenum attachment,
601 GLenum pname,
602 GLint* params) {
538 Enter3D enter(context_id, true); 603 Enter3D enter(context_id, true);
539 if (enter.succeeded()) { 604 if (enter.succeeded()) {
540 ToGles2Impl( 605 ToGles2Impl(&enter)->GetFramebufferAttachmentParameteriv(
541 &enter)->GetFramebufferAttachmentParameteriv( 606 target, attachment, pname, params);
542 target, attachment, pname, params);
543 } 607 }
544 } 608 }
545 609
546 void GetIntegerv(PP_Resource context_id, GLenum pname, GLint* params) { 610 void GetIntegerv(PP_Resource context_id, GLenum pname, GLint* params) {
547 Enter3D enter(context_id, true); 611 Enter3D enter(context_id, true);
548 if (enter.succeeded()) { 612 if (enter.succeeded()) {
549 ToGles2Impl(&enter)->GetIntegerv(pname, params); 613 ToGles2Impl(&enter)->GetIntegerv(pname, params);
550 } 614 }
551 } 615 }
552 616
553 void GetProgramiv( 617 void GetProgramiv(PP_Resource context_id,
554 PP_Resource context_id, GLuint program, GLenum pname, GLint* params) { 618 GLuint program,
619 GLenum pname,
620 GLint* params) {
555 Enter3D enter(context_id, true); 621 Enter3D enter(context_id, true);
556 if (enter.succeeded()) { 622 if (enter.succeeded()) {
557 ToGles2Impl(&enter)->GetProgramiv(program, pname, params); 623 ToGles2Impl(&enter)->GetProgramiv(program, pname, params);
558 } 624 }
559 } 625 }
560 626
561 void GetProgramInfoLog( 627 void GetProgramInfoLog(PP_Resource context_id,
562 PP_Resource context_id, GLuint program, GLsizei bufsize, GLsizei* length, 628 GLuint program,
563 char* infolog) { 629 GLsizei bufsize,
630 GLsizei* length,
631 char* infolog) {
564 Enter3D enter(context_id, true); 632 Enter3D enter(context_id, true);
565 if (enter.succeeded()) { 633 if (enter.succeeded()) {
566 ToGles2Impl(&enter)->GetProgramInfoLog(program, bufsize, length, infolog); 634 ToGles2Impl(&enter)->GetProgramInfoLog(program, bufsize, length, infolog);
567 } 635 }
568 } 636 }
569 637
570 void GetRenderbufferParameteriv( 638 void GetRenderbufferParameteriv(PP_Resource context_id,
571 PP_Resource context_id, GLenum target, GLenum pname, GLint* params) { 639 GLenum target,
640 GLenum pname,
641 GLint* params) {
572 Enter3D enter(context_id, true); 642 Enter3D enter(context_id, true);
573 if (enter.succeeded()) { 643 if (enter.succeeded()) {
574 ToGles2Impl(&enter)->GetRenderbufferParameteriv(target, pname, params); 644 ToGles2Impl(&enter)->GetRenderbufferParameteriv(target, pname, params);
575 } 645 }
576 } 646 }
577 647
578 void GetShaderiv( 648 void GetShaderiv(PP_Resource context_id,
579 PP_Resource context_id, GLuint shader, GLenum pname, GLint* params) { 649 GLuint shader,
650 GLenum pname,
651 GLint* params) {
580 Enter3D enter(context_id, true); 652 Enter3D enter(context_id, true);
581 if (enter.succeeded()) { 653 if (enter.succeeded()) {
582 ToGles2Impl(&enter)->GetShaderiv(shader, pname, params); 654 ToGles2Impl(&enter)->GetShaderiv(shader, pname, params);
583 } 655 }
584 } 656 }
585 657
586 void GetShaderInfoLog( 658 void GetShaderInfoLog(PP_Resource context_id,
587 PP_Resource context_id, GLuint shader, GLsizei bufsize, GLsizei* length, 659 GLuint shader,
588 char* infolog) { 660 GLsizei bufsize,
661 GLsizei* length,
662 char* infolog) {
589 Enter3D enter(context_id, true); 663 Enter3D enter(context_id, true);
590 if (enter.succeeded()) { 664 if (enter.succeeded()) {
591 ToGles2Impl(&enter)->GetShaderInfoLog(shader, bufsize, length, infolog); 665 ToGles2Impl(&enter)->GetShaderInfoLog(shader, bufsize, length, infolog);
592 } 666 }
593 } 667 }
594 668
595 void GetShaderPrecisionFormat( 669 void GetShaderPrecisionFormat(PP_Resource context_id,
596 PP_Resource context_id, GLenum shadertype, GLenum precisiontype, 670 GLenum shadertype,
597 GLint* range, GLint* precision) { 671 GLenum precisiontype,
672 GLint* range,
673 GLint* precision) {
598 Enter3D enter(context_id, true); 674 Enter3D enter(context_id, true);
599 if (enter.succeeded()) { 675 if (enter.succeeded()) {
600 ToGles2Impl( 676 ToGles2Impl(&enter)
601 &enter)->GetShaderPrecisionFormat( 677 ->GetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
602 shadertype, precisiontype, range, precision);
603 } 678 }
604 } 679 }
605 680
606 void GetShaderSource( 681 void GetShaderSource(PP_Resource context_id,
607 PP_Resource context_id, GLuint shader, GLsizei bufsize, GLsizei* length, 682 GLuint shader,
608 char* source) { 683 GLsizei bufsize,
684 GLsizei* length,
685 char* source) {
609 Enter3D enter(context_id, true); 686 Enter3D enter(context_id, true);
610 if (enter.succeeded()) { 687 if (enter.succeeded()) {
611 ToGles2Impl(&enter)->GetShaderSource(shader, bufsize, length, source); 688 ToGles2Impl(&enter)->GetShaderSource(shader, bufsize, length, source);
612 } 689 }
613 } 690 }
614 691
615 const GLubyte* GetString(PP_Resource context_id, GLenum name) { 692 const GLubyte* GetString(PP_Resource context_id, GLenum name) {
616 Enter3D enter(context_id, true); 693 Enter3D enter(context_id, true);
617 if (enter.succeeded()) { 694 if (enter.succeeded()) {
618 return ToGles2Impl(&enter)->GetString(name); 695 return ToGles2Impl(&enter)->GetString(name);
619 } else { 696 } else {
620 return NULL; 697 return NULL;
621 } 698 }
622 } 699 }
623 700
624 void GetTexParameterfv( 701 void GetTexParameterfv(PP_Resource context_id,
625 PP_Resource context_id, GLenum target, GLenum pname, GLfloat* params) { 702 GLenum target,
703 GLenum pname,
704 GLfloat* params) {
626 Enter3D enter(context_id, true); 705 Enter3D enter(context_id, true);
627 if (enter.succeeded()) { 706 if (enter.succeeded()) {
628 ToGles2Impl(&enter)->GetTexParameterfv(target, pname, params); 707 ToGles2Impl(&enter)->GetTexParameterfv(target, pname, params);
629 } 708 }
630 } 709 }
631 710
632 void GetTexParameteriv( 711 void GetTexParameteriv(PP_Resource context_id,
633 PP_Resource context_id, GLenum target, GLenum pname, GLint* params) { 712 GLenum target,
713 GLenum pname,
714 GLint* params) {
634 Enter3D enter(context_id, true); 715 Enter3D enter(context_id, true);
635 if (enter.succeeded()) { 716 if (enter.succeeded()) {
636 ToGles2Impl(&enter)->GetTexParameteriv(target, pname, params); 717 ToGles2Impl(&enter)->GetTexParameteriv(target, pname, params);
637 } 718 }
638 } 719 }
639 720
640 void GetUniformfv( 721 void GetUniformfv(PP_Resource context_id,
641 PP_Resource context_id, GLuint program, GLint location, GLfloat* params) { 722 GLuint program,
723 GLint location,
724 GLfloat* params) {
642 Enter3D enter(context_id, true); 725 Enter3D enter(context_id, true);
643 if (enter.succeeded()) { 726 if (enter.succeeded()) {
644 ToGles2Impl(&enter)->GetUniformfv(program, location, params); 727 ToGles2Impl(&enter)->GetUniformfv(program, location, params);
645 } 728 }
646 } 729 }
647 730
648 void GetUniformiv( 731 void GetUniformiv(PP_Resource context_id,
649 PP_Resource context_id, GLuint program, GLint location, GLint* params) { 732 GLuint program,
733 GLint location,
734 GLint* params) {
650 Enter3D enter(context_id, true); 735 Enter3D enter(context_id, true);
651 if (enter.succeeded()) { 736 if (enter.succeeded()) {
652 ToGles2Impl(&enter)->GetUniformiv(program, location, params); 737 ToGles2Impl(&enter)->GetUniformiv(program, location, params);
653 } 738 }
654 } 739 }
655 740
656 GLint GetUniformLocation( 741 GLint GetUniformLocation(PP_Resource context_id,
657 PP_Resource context_id, GLuint program, const char* name) { 742 GLuint program,
743 const char* name) {
658 Enter3D enter(context_id, true); 744 Enter3D enter(context_id, true);
659 if (enter.succeeded()) { 745 if (enter.succeeded()) {
660 return ToGles2Impl(&enter)->GetUniformLocation(program, name); 746 return ToGles2Impl(&enter)->GetUniformLocation(program, name);
661 } else { 747 } else {
662 return -1; 748 return -1;
663 } 749 }
664 } 750 }
665 751
666 void GetVertexAttribfv( 752 void GetVertexAttribfv(PP_Resource context_id,
667 PP_Resource context_id, GLuint index, GLenum pname, GLfloat* params) { 753 GLuint index,
754 GLenum pname,
755 GLfloat* params) {
668 Enter3D enter(context_id, true); 756 Enter3D enter(context_id, true);
669 if (enter.succeeded()) { 757 if (enter.succeeded()) {
670 ToGles2Impl(&enter)->GetVertexAttribfv(index, pname, params); 758 ToGles2Impl(&enter)->GetVertexAttribfv(index, pname, params);
671 } 759 }
672 } 760 }
673 761
674 void GetVertexAttribiv( 762 void GetVertexAttribiv(PP_Resource context_id,
675 PP_Resource context_id, GLuint index, GLenum pname, GLint* params) { 763 GLuint index,
764 GLenum pname,
765 GLint* params) {
676 Enter3D enter(context_id, true); 766 Enter3D enter(context_id, true);
677 if (enter.succeeded()) { 767 if (enter.succeeded()) {
678 ToGles2Impl(&enter)->GetVertexAttribiv(index, pname, params); 768 ToGles2Impl(&enter)->GetVertexAttribiv(index, pname, params);
679 } 769 }
680 } 770 }
681 771
682 void GetVertexAttribPointerv( 772 void GetVertexAttribPointerv(PP_Resource context_id,
683 PP_Resource context_id, GLuint index, GLenum pname, void** pointer) { 773 GLuint index,
774 GLenum pname,
775 void** pointer) {
684 Enter3D enter(context_id, true); 776 Enter3D enter(context_id, true);
685 if (enter.succeeded()) { 777 if (enter.succeeded()) {
686 ToGles2Impl(&enter)->GetVertexAttribPointerv(index, pname, pointer); 778 ToGles2Impl(&enter)->GetVertexAttribPointerv(index, pname, pointer);
687 } 779 }
688 } 780 }
689 781
690 void Hint(PP_Resource context_id, GLenum target, GLenum mode) { 782 void Hint(PP_Resource context_id, GLenum target, GLenum mode) {
691 Enter3D enter(context_id, true); 783 Enter3D enter(context_id, true);
692 if (enter.succeeded()) { 784 if (enter.succeeded()) {
693 ToGles2Impl(&enter)->Hint(target, mode); 785 ToGles2Impl(&enter)->Hint(target, mode);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 } 870 }
779 } 871 }
780 872
781 void PolygonOffset(PP_Resource context_id, GLfloat factor, GLfloat units) { 873 void PolygonOffset(PP_Resource context_id, GLfloat factor, GLfloat units) {
782 Enter3D enter(context_id, true); 874 Enter3D enter(context_id, true);
783 if (enter.succeeded()) { 875 if (enter.succeeded()) {
784 ToGles2Impl(&enter)->PolygonOffset(factor, units); 876 ToGles2Impl(&enter)->PolygonOffset(factor, units);
785 } 877 }
786 } 878 }
787 879
788 void ReadPixels( 880 void ReadPixels(PP_Resource context_id,
789 PP_Resource context_id, GLint x, GLint y, GLsizei width, GLsizei height, 881 GLint x,
790 GLenum format, GLenum type, void* pixels) { 882 GLint y,
883 GLsizei width,
884 GLsizei height,
885 GLenum format,
886 GLenum type,
887 void* pixels) {
791 Enter3D enter(context_id, true); 888 Enter3D enter(context_id, true);
792 if (enter.succeeded()) { 889 if (enter.succeeded()) {
793 ToGles2Impl(&enter)->ReadPixels(x, y, width, height, format, type, pixels); 890 ToGles2Impl(&enter)->ReadPixels(x, y, width, height, format, type, pixels);
794 } 891 }
795 } 892 }
796 893
797 void ReleaseShaderCompiler(PP_Resource context_id) { 894 void ReleaseShaderCompiler(PP_Resource context_id) {
798 Enter3D enter(context_id, true); 895 Enter3D enter(context_id, true);
799 if (enter.succeeded()) { 896 if (enter.succeeded()) {
800 ToGles2Impl(&enter)->ReleaseShaderCompiler(); 897 ToGles2Impl(&enter)->ReleaseShaderCompiler();
801 } 898 }
802 } 899 }
803 900
804 void RenderbufferStorage( 901 void RenderbufferStorage(PP_Resource context_id,
805 PP_Resource context_id, GLenum target, GLenum internalformat, GLsizei width, 902 GLenum target,
806 GLsizei height) { 903 GLenum internalformat,
904 GLsizei width,
905 GLsizei height) {
807 Enter3D enter(context_id, true); 906 Enter3D enter(context_id, true);
808 if (enter.succeeded()) { 907 if (enter.succeeded()) {
809 ToGles2Impl( 908 ToGles2Impl(&enter)
810 &enter)->RenderbufferStorage(target, internalformat, width, height); 909 ->RenderbufferStorage(target, internalformat, width, height);
811 } 910 }
812 } 911 }
813 912
814 void SampleCoverage(PP_Resource context_id, GLclampf value, GLboolean invert) { 913 void SampleCoverage(PP_Resource context_id, GLclampf value, GLboolean invert) {
815 Enter3D enter(context_id, true); 914 Enter3D enter(context_id, true);
816 if (enter.succeeded()) { 915 if (enter.succeeded()) {
817 ToGles2Impl(&enter)->SampleCoverage(value, invert); 916 ToGles2Impl(&enter)->SampleCoverage(value, invert);
818 } 917 }
819 } 918 }
820 919
821 void Scissor( 920 void Scissor(PP_Resource context_id,
822 PP_Resource context_id, GLint x, GLint y, GLsizei width, GLsizei height) { 921 GLint x,
922 GLint y,
923 GLsizei width,
924 GLsizei height) {
823 Enter3D enter(context_id, true); 925 Enter3D enter(context_id, true);
824 if (enter.succeeded()) { 926 if (enter.succeeded()) {
825 ToGles2Impl(&enter)->Scissor(x, y, width, height); 927 ToGles2Impl(&enter)->Scissor(x, y, width, height);
826 } 928 }
827 } 929 }
828 930
829 void ShaderBinary( 931 void ShaderBinary(PP_Resource context_id,
830 PP_Resource context_id, GLsizei n, const GLuint* shaders, 932 GLsizei n,
831 GLenum binaryformat, const void* binary, GLsizei length) { 933 const GLuint* shaders,
934 GLenum binaryformat,
935 const void* binary,
936 GLsizei length) {
832 Enter3D enter(context_id, true); 937 Enter3D enter(context_id, true);
833 if (enter.succeeded()) { 938 if (enter.succeeded()) {
834 ToGles2Impl( 939 ToGles2Impl(&enter)->ShaderBinary(n, shaders, binaryformat, binary, length);
835 &enter)->ShaderBinary(n, shaders, binaryformat, binary, length);
836 } 940 }
837 } 941 }
838 942
839 void ShaderSource( 943 void ShaderSource(PP_Resource context_id,
840 PP_Resource context_id, GLuint shader, GLsizei count, const char** str, 944 GLuint shader,
841 const GLint* length) { 945 GLsizei count,
946 const char** str,
947 const GLint* length) {
842 Enter3D enter(context_id, true); 948 Enter3D enter(context_id, true);
843 if (enter.succeeded()) { 949 if (enter.succeeded()) {
844 ToGles2Impl(&enter)->ShaderSource(shader, count, str, length); 950 ToGles2Impl(&enter)->ShaderSource(shader, count, str, length);
845 } 951 }
846 } 952 }
847 953
848 void StencilFunc(PP_Resource context_id, GLenum func, GLint ref, GLuint mask) { 954 void StencilFunc(PP_Resource context_id, GLenum func, GLint ref, GLuint mask) {
849 Enter3D enter(context_id, true); 955 Enter3D enter(context_id, true);
850 if (enter.succeeded()) { 956 if (enter.succeeded()) {
851 ToGles2Impl(&enter)->StencilFunc(func, ref, mask); 957 ToGles2Impl(&enter)->StencilFunc(func, ref, mask);
852 } 958 }
853 } 959 }
854 960
855 void StencilFuncSeparate( 961 void StencilFuncSeparate(PP_Resource context_id,
856 PP_Resource context_id, GLenum face, GLenum func, GLint ref, GLuint mask) { 962 GLenum face,
963 GLenum func,
964 GLint ref,
965 GLuint mask) {
857 Enter3D enter(context_id, true); 966 Enter3D enter(context_id, true);
858 if (enter.succeeded()) { 967 if (enter.succeeded()) {
859 ToGles2Impl(&enter)->StencilFuncSeparate(face, func, ref, mask); 968 ToGles2Impl(&enter)->StencilFuncSeparate(face, func, ref, mask);
860 } 969 }
861 } 970 }
862 971
863 void StencilMask(PP_Resource context_id, GLuint mask) { 972 void StencilMask(PP_Resource context_id, GLuint mask) {
864 Enter3D enter(context_id, true); 973 Enter3D enter(context_id, true);
865 if (enter.succeeded()) { 974 if (enter.succeeded()) {
866 ToGles2Impl(&enter)->StencilMask(mask); 975 ToGles2Impl(&enter)->StencilMask(mask);
867 } 976 }
868 } 977 }
869 978
870 void StencilMaskSeparate(PP_Resource context_id, GLenum face, GLuint mask) { 979 void StencilMaskSeparate(PP_Resource context_id, GLenum face, GLuint mask) {
871 Enter3D enter(context_id, true); 980 Enter3D enter(context_id, true);
872 if (enter.succeeded()) { 981 if (enter.succeeded()) {
873 ToGles2Impl(&enter)->StencilMaskSeparate(face, mask); 982 ToGles2Impl(&enter)->StencilMaskSeparate(face, mask);
874 } 983 }
875 } 984 }
876 985
877 void StencilOp( 986 void StencilOp(PP_Resource context_id,
878 PP_Resource context_id, GLenum fail, GLenum zfail, GLenum zpass) { 987 GLenum fail,
988 GLenum zfail,
989 GLenum zpass) {
879 Enter3D enter(context_id, true); 990 Enter3D enter(context_id, true);
880 if (enter.succeeded()) { 991 if (enter.succeeded()) {
881 ToGles2Impl(&enter)->StencilOp(fail, zfail, zpass); 992 ToGles2Impl(&enter)->StencilOp(fail, zfail, zpass);
882 } 993 }
883 } 994 }
884 995
885 void StencilOpSeparate( 996 void StencilOpSeparate(PP_Resource context_id,
886 PP_Resource context_id, GLenum face, GLenum fail, GLenum zfail, 997 GLenum face,
887 GLenum zpass) { 998 GLenum fail,
999 GLenum zfail,
1000 GLenum zpass) {
888 Enter3D enter(context_id, true); 1001 Enter3D enter(context_id, true);
889 if (enter.succeeded()) { 1002 if (enter.succeeded()) {
890 ToGles2Impl(&enter)->StencilOpSeparate(face, fail, zfail, zpass); 1003 ToGles2Impl(&enter)->StencilOpSeparate(face, fail, zfail, zpass);
891 } 1004 }
892 } 1005 }
893 1006
894 void TexImage2D( 1007 void TexImage2D(PP_Resource context_id,
895 PP_Resource context_id, GLenum target, GLint level, GLint internalformat, 1008 GLenum target,
896 GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, 1009 GLint level,
897 const void* pixels) { 1010 GLint internalformat,
1011 GLsizei width,
1012 GLsizei height,
1013 GLint border,
1014 GLenum format,
1015 GLenum type,
1016 const void* pixels) {
898 Enter3D enter(context_id, true); 1017 Enter3D enter(context_id, true);
899 if (enter.succeeded()) { 1018 if (enter.succeeded()) {
900 ToGles2Impl( 1019 ToGles2Impl(&enter)->TexImage2D(target,
901 &enter)->TexImage2D( 1020 level,
902 target, level, internalformat, width, height, border, format, type, 1021 internalformat,
903 pixels); 1022 width,
1023 height,
1024 border,
1025 format,
1026 type,
1027 pixels);
904 } 1028 }
905 } 1029 }
906 1030
907 void TexParameterf( 1031 void TexParameterf(PP_Resource context_id,
908 PP_Resource context_id, GLenum target, GLenum pname, GLfloat param) { 1032 GLenum target,
1033 GLenum pname,
1034 GLfloat param) {
909 Enter3D enter(context_id, true); 1035 Enter3D enter(context_id, true);
910 if (enter.succeeded()) { 1036 if (enter.succeeded()) {
911 ToGles2Impl(&enter)->TexParameterf(target, pname, param); 1037 ToGles2Impl(&enter)->TexParameterf(target, pname, param);
912 } 1038 }
913 } 1039 }
914 1040
915 void TexParameterfv( 1041 void TexParameterfv(PP_Resource context_id,
916 PP_Resource context_id, GLenum target, GLenum pname, 1042 GLenum target,
917 const GLfloat* params) { 1043 GLenum pname,
1044 const GLfloat* params) {
918 Enter3D enter(context_id, true); 1045 Enter3D enter(context_id, true);
919 if (enter.succeeded()) { 1046 if (enter.succeeded()) {
920 ToGles2Impl(&enter)->TexParameterfv(target, pname, params); 1047 ToGles2Impl(&enter)->TexParameterfv(target, pname, params);
921 } 1048 }
922 } 1049 }
923 1050
924 void TexParameteri( 1051 void TexParameteri(PP_Resource context_id,
925 PP_Resource context_id, GLenum target, GLenum pname, GLint param) { 1052 GLenum target,
1053 GLenum pname,
1054 GLint param) {
926 Enter3D enter(context_id, true); 1055 Enter3D enter(context_id, true);
927 if (enter.succeeded()) { 1056 if (enter.succeeded()) {
928 ToGles2Impl(&enter)->TexParameteri(target, pname, param); 1057 ToGles2Impl(&enter)->TexParameteri(target, pname, param);
929 } 1058 }
930 } 1059 }
931 1060
932 void TexParameteriv( 1061 void TexParameteriv(PP_Resource context_id,
933 PP_Resource context_id, GLenum target, GLenum pname, const GLint* params) { 1062 GLenum target,
1063 GLenum pname,
1064 const GLint* params) {
934 Enter3D enter(context_id, true); 1065 Enter3D enter(context_id, true);
935 if (enter.succeeded()) { 1066 if (enter.succeeded()) {
936 ToGles2Impl(&enter)->TexParameteriv(target, pname, params); 1067 ToGles2Impl(&enter)->TexParameteriv(target, pname, params);
937 } 1068 }
938 } 1069 }
939 1070
940 void TexSubImage2D( 1071 void TexSubImage2D(PP_Resource context_id,
941 PP_Resource context_id, GLenum target, GLint level, GLint xoffset, 1072 GLenum target,
942 GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, 1073 GLint level,
943 const void* pixels) { 1074 GLint xoffset,
1075 GLint yoffset,
1076 GLsizei width,
1077 GLsizei height,
1078 GLenum format,
1079 GLenum type,
1080 const void* pixels) {
944 Enter3D enter(context_id, true); 1081 Enter3D enter(context_id, true);
945 if (enter.succeeded()) { 1082 if (enter.succeeded()) {
946 ToGles2Impl( 1083 ToGles2Impl(&enter)->TexSubImage2D(
947 &enter)->TexSubImage2D( 1084 target, level, xoffset, yoffset, width, height, format, type, pixels);
948 target, level, xoffset, yoffset, width, height, format, type,
949 pixels);
950 } 1085 }
951 } 1086 }
952 1087
953 void Uniform1f(PP_Resource context_id, GLint location, GLfloat x) { 1088 void Uniform1f(PP_Resource context_id, GLint location, GLfloat x) {
954 Enter3D enter(context_id, true); 1089 Enter3D enter(context_id, true);
955 if (enter.succeeded()) { 1090 if (enter.succeeded()) {
956 ToGles2Impl(&enter)->Uniform1f(location, x); 1091 ToGles2Impl(&enter)->Uniform1f(location, x);
957 } 1092 }
958 } 1093 }
959 1094
960 void Uniform1fv( 1095 void Uniform1fv(PP_Resource context_id,
961 PP_Resource context_id, GLint location, GLsizei count, const GLfloat* v) { 1096 GLint location,
1097 GLsizei count,
1098 const GLfloat* v) {
962 Enter3D enter(context_id, true); 1099 Enter3D enter(context_id, true);
963 if (enter.succeeded()) { 1100 if (enter.succeeded()) {
964 ToGles2Impl(&enter)->Uniform1fv(location, count, v); 1101 ToGles2Impl(&enter)->Uniform1fv(location, count, v);
965 } 1102 }
966 } 1103 }
967 1104
968 void Uniform1i(PP_Resource context_id, GLint location, GLint x) { 1105 void Uniform1i(PP_Resource context_id, GLint location, GLint x) {
969 Enter3D enter(context_id, true); 1106 Enter3D enter(context_id, true);
970 if (enter.succeeded()) { 1107 if (enter.succeeded()) {
971 ToGles2Impl(&enter)->Uniform1i(location, x); 1108 ToGles2Impl(&enter)->Uniform1i(location, x);
972 } 1109 }
973 } 1110 }
974 1111
975 void Uniform1iv( 1112 void Uniform1iv(PP_Resource context_id,
976 PP_Resource context_id, GLint location, GLsizei count, const GLint* v) { 1113 GLint location,
1114 GLsizei count,
1115 const GLint* v) {
977 Enter3D enter(context_id, true); 1116 Enter3D enter(context_id, true);
978 if (enter.succeeded()) { 1117 if (enter.succeeded()) {
979 ToGles2Impl(&enter)->Uniform1iv(location, count, v); 1118 ToGles2Impl(&enter)->Uniform1iv(location, count, v);
980 } 1119 }
981 } 1120 }
982 1121
983 void Uniform2f(PP_Resource context_id, GLint location, GLfloat x, GLfloat y) { 1122 void Uniform2f(PP_Resource context_id, GLint location, GLfloat x, GLfloat y) {
984 Enter3D enter(context_id, true); 1123 Enter3D enter(context_id, true);
985 if (enter.succeeded()) { 1124 if (enter.succeeded()) {
986 ToGles2Impl(&enter)->Uniform2f(location, x, y); 1125 ToGles2Impl(&enter)->Uniform2f(location, x, y);
987 } 1126 }
988 } 1127 }
989 1128
990 void Uniform2fv( 1129 void Uniform2fv(PP_Resource context_id,
991 PP_Resource context_id, GLint location, GLsizei count, const GLfloat* v) { 1130 GLint location,
1131 GLsizei count,
1132 const GLfloat* v) {
992 Enter3D enter(context_id, true); 1133 Enter3D enter(context_id, true);
993 if (enter.succeeded()) { 1134 if (enter.succeeded()) {
994 ToGles2Impl(&enter)->Uniform2fv(location, count, v); 1135 ToGles2Impl(&enter)->Uniform2fv(location, count, v);
995 } 1136 }
996 } 1137 }
997 1138
998 void Uniform2i(PP_Resource context_id, GLint location, GLint x, GLint y) { 1139 void Uniform2i(PP_Resource context_id, GLint location, GLint x, GLint y) {
999 Enter3D enter(context_id, true); 1140 Enter3D enter(context_id, true);
1000 if (enter.succeeded()) { 1141 if (enter.succeeded()) {
1001 ToGles2Impl(&enter)->Uniform2i(location, x, y); 1142 ToGles2Impl(&enter)->Uniform2i(location, x, y);
1002 } 1143 }
1003 } 1144 }
1004 1145
1005 void Uniform2iv( 1146 void Uniform2iv(PP_Resource context_id,
1006 PP_Resource context_id, GLint location, GLsizei count, const GLint* v) { 1147 GLint location,
1148 GLsizei count,
1149 const GLint* v) {
1007 Enter3D enter(context_id, true); 1150 Enter3D enter(context_id, true);
1008 if (enter.succeeded()) { 1151 if (enter.succeeded()) {
1009 ToGles2Impl(&enter)->Uniform2iv(location, count, v); 1152 ToGles2Impl(&enter)->Uniform2iv(location, count, v);
1010 } 1153 }
1011 } 1154 }
1012 1155
1013 void Uniform3f( 1156 void Uniform3f(PP_Resource context_id,
1014 PP_Resource context_id, GLint location, GLfloat x, GLfloat y, GLfloat z) { 1157 GLint location,
1158 GLfloat x,
1159 GLfloat y,
1160 GLfloat z) {
1015 Enter3D enter(context_id, true); 1161 Enter3D enter(context_id, true);
1016 if (enter.succeeded()) { 1162 if (enter.succeeded()) {
1017 ToGles2Impl(&enter)->Uniform3f(location, x, y, z); 1163 ToGles2Impl(&enter)->Uniform3f(location, x, y, z);
1018 } 1164 }
1019 } 1165 }
1020 1166
1021 void Uniform3fv( 1167 void Uniform3fv(PP_Resource context_id,
1022 PP_Resource context_id, GLint location, GLsizei count, const GLfloat* v) { 1168 GLint location,
1169 GLsizei count,
1170 const GLfloat* v) {
1023 Enter3D enter(context_id, true); 1171 Enter3D enter(context_id, true);
1024 if (enter.succeeded()) { 1172 if (enter.succeeded()) {
1025 ToGles2Impl(&enter)->Uniform3fv(location, count, v); 1173 ToGles2Impl(&enter)->Uniform3fv(location, count, v);
1026 } 1174 }
1027 } 1175 }
1028 1176
1029 void Uniform3i( 1177 void Uniform3i(PP_Resource context_id,
1030 PP_Resource context_id, GLint location, GLint x, GLint y, GLint z) { 1178 GLint location,
1179 GLint x,
1180 GLint y,
1181 GLint z) {
1031 Enter3D enter(context_id, true); 1182 Enter3D enter(context_id, true);
1032 if (enter.succeeded()) { 1183 if (enter.succeeded()) {
1033 ToGles2Impl(&enter)->Uniform3i(location, x, y, z); 1184 ToGles2Impl(&enter)->Uniform3i(location, x, y, z);
1034 } 1185 }
1035 } 1186 }
1036 1187
1037 void Uniform3iv( 1188 void Uniform3iv(PP_Resource context_id,
1038 PP_Resource context_id, GLint location, GLsizei count, const GLint* v) { 1189 GLint location,
1190 GLsizei count,
1191 const GLint* v) {
1039 Enter3D enter(context_id, true); 1192 Enter3D enter(context_id, true);
1040 if (enter.succeeded()) { 1193 if (enter.succeeded()) {
1041 ToGles2Impl(&enter)->Uniform3iv(location, count, v); 1194 ToGles2Impl(&enter)->Uniform3iv(location, count, v);
1042 } 1195 }
1043 } 1196 }
1044 1197
1045 void Uniform4f( 1198 void Uniform4f(PP_Resource context_id,
1046 PP_Resource context_id, GLint location, GLfloat x, GLfloat y, GLfloat z, 1199 GLint location,
1047 GLfloat w) { 1200 GLfloat x,
1201 GLfloat y,
1202 GLfloat z,
1203 GLfloat w) {
1048 Enter3D enter(context_id, true); 1204 Enter3D enter(context_id, true);
1049 if (enter.succeeded()) { 1205 if (enter.succeeded()) {
1050 ToGles2Impl(&enter)->Uniform4f(location, x, y, z, w); 1206 ToGles2Impl(&enter)->Uniform4f(location, x, y, z, w);
1051 } 1207 }
1052 } 1208 }
1053 1209
1054 void Uniform4fv( 1210 void Uniform4fv(PP_Resource context_id,
1055 PP_Resource context_id, GLint location, GLsizei count, const GLfloat* v) { 1211 GLint location,
1212 GLsizei count,
1213 const GLfloat* v) {
1056 Enter3D enter(context_id, true); 1214 Enter3D enter(context_id, true);
1057 if (enter.succeeded()) { 1215 if (enter.succeeded()) {
1058 ToGles2Impl(&enter)->Uniform4fv(location, count, v); 1216 ToGles2Impl(&enter)->Uniform4fv(location, count, v);
1059 } 1217 }
1060 } 1218 }
1061 1219
1062 void Uniform4i( 1220 void Uniform4i(PP_Resource context_id,
1063 PP_Resource context_id, GLint location, GLint x, GLint y, GLint z, 1221 GLint location,
1064 GLint w) { 1222 GLint x,
1223 GLint y,
1224 GLint z,
1225 GLint w) {
1065 Enter3D enter(context_id, true); 1226 Enter3D enter(context_id, true);
1066 if (enter.succeeded()) { 1227 if (enter.succeeded()) {
1067 ToGles2Impl(&enter)->Uniform4i(location, x, y, z, w); 1228 ToGles2Impl(&enter)->Uniform4i(location, x, y, z, w);
1068 } 1229 }
1069 } 1230 }
1070 1231
1071 void Uniform4iv( 1232 void Uniform4iv(PP_Resource context_id,
1072 PP_Resource context_id, GLint location, GLsizei count, const GLint* v) { 1233 GLint location,
1234 GLsizei count,
1235 const GLint* v) {
1073 Enter3D enter(context_id, true); 1236 Enter3D enter(context_id, true);
1074 if (enter.succeeded()) { 1237 if (enter.succeeded()) {
1075 ToGles2Impl(&enter)->Uniform4iv(location, count, v); 1238 ToGles2Impl(&enter)->Uniform4iv(location, count, v);
1076 } 1239 }
1077 } 1240 }
1078 1241
1079 void UniformMatrix2fv( 1242 void UniformMatrix2fv(PP_Resource context_id,
1080 PP_Resource context_id, GLint location, GLsizei count, GLboolean transpose, 1243 GLint location,
1081 const GLfloat* value) { 1244 GLsizei count,
1245 GLboolean transpose,
1246 const GLfloat* value) {
1082 Enter3D enter(context_id, true); 1247 Enter3D enter(context_id, true);
1083 if (enter.succeeded()) { 1248 if (enter.succeeded()) {
1084 ToGles2Impl(&enter)->UniformMatrix2fv(location, count, transpose, value); 1249 ToGles2Impl(&enter)->UniformMatrix2fv(location, count, transpose, value);
1085 } 1250 }
1086 } 1251 }
1087 1252
1088 void UniformMatrix3fv( 1253 void UniformMatrix3fv(PP_Resource context_id,
1089 PP_Resource context_id, GLint location, GLsizei count, GLboolean transpose, 1254 GLint location,
1090 const GLfloat* value) { 1255 GLsizei count,
1256 GLboolean transpose,
1257 const GLfloat* value) {
1091 Enter3D enter(context_id, true); 1258 Enter3D enter(context_id, true);
1092 if (enter.succeeded()) { 1259 if (enter.succeeded()) {
1093 ToGles2Impl(&enter)->UniformMatrix3fv(location, count, transpose, value); 1260 ToGles2Impl(&enter)->UniformMatrix3fv(location, count, transpose, value);
1094 } 1261 }
1095 } 1262 }
1096 1263
1097 void UniformMatrix4fv( 1264 void UniformMatrix4fv(PP_Resource context_id,
1098 PP_Resource context_id, GLint location, GLsizei count, GLboolean transpose, 1265 GLint location,
1099 const GLfloat* value) { 1266 GLsizei count,
1267 GLboolean transpose,
1268 const GLfloat* value) {
1100 Enter3D enter(context_id, true); 1269 Enter3D enter(context_id, true);
1101 if (enter.succeeded()) { 1270 if (enter.succeeded()) {
1102 ToGles2Impl(&enter)->UniformMatrix4fv(location, count, transpose, value); 1271 ToGles2Impl(&enter)->UniformMatrix4fv(location, count, transpose, value);
1103 } 1272 }
1104 } 1273 }
1105 1274
1106 void UseProgram(PP_Resource context_id, GLuint program) { 1275 void UseProgram(PP_Resource context_id, GLuint program) {
1107 Enter3D enter(context_id, true); 1276 Enter3D enter(context_id, true);
1108 if (enter.succeeded()) { 1277 if (enter.succeeded()) {
1109 ToGles2Impl(&enter)->UseProgram(program); 1278 ToGles2Impl(&enter)->UseProgram(program);
1110 } 1279 }
1111 } 1280 }
1112 1281
1113 void ValidateProgram(PP_Resource context_id, GLuint program) { 1282 void ValidateProgram(PP_Resource context_id, GLuint program) {
1114 Enter3D enter(context_id, true); 1283 Enter3D enter(context_id, true);
1115 if (enter.succeeded()) { 1284 if (enter.succeeded()) {
1116 ToGles2Impl(&enter)->ValidateProgram(program); 1285 ToGles2Impl(&enter)->ValidateProgram(program);
1117 } 1286 }
1118 } 1287 }
1119 1288
1120 void VertexAttrib1f(PP_Resource context_id, GLuint indx, GLfloat x) { 1289 void VertexAttrib1f(PP_Resource context_id, GLuint indx, GLfloat x) {
1121 Enter3D enter(context_id, true); 1290 Enter3D enter(context_id, true);
1122 if (enter.succeeded()) { 1291 if (enter.succeeded()) {
1123 ToGles2Impl(&enter)->VertexAttrib1f(indx, x); 1292 ToGles2Impl(&enter)->VertexAttrib1f(indx, x);
1124 } 1293 }
1125 } 1294 }
1126 1295
1127 void VertexAttrib1fv( 1296 void VertexAttrib1fv(PP_Resource context_id,
1128 PP_Resource context_id, GLuint indx, const GLfloat* values) { 1297 GLuint indx,
1298 const GLfloat* values) {
1129 Enter3D enter(context_id, true); 1299 Enter3D enter(context_id, true);
1130 if (enter.succeeded()) { 1300 if (enter.succeeded()) {
1131 ToGles2Impl(&enter)->VertexAttrib1fv(indx, values); 1301 ToGles2Impl(&enter)->VertexAttrib1fv(indx, values);
1132 } 1302 }
1133 } 1303 }
1134 1304
1135 void VertexAttrib2f( 1305 void VertexAttrib2f(PP_Resource context_id, GLuint indx, GLfloat x, GLfloat y) {
1136 PP_Resource context_id, GLuint indx, GLfloat x, GLfloat y) {
1137 Enter3D enter(context_id, true); 1306 Enter3D enter(context_id, true);
1138 if (enter.succeeded()) { 1307 if (enter.succeeded()) {
1139 ToGles2Impl(&enter)->VertexAttrib2f(indx, x, y); 1308 ToGles2Impl(&enter)->VertexAttrib2f(indx, x, y);
1140 } 1309 }
1141 } 1310 }
1142 1311
1143 void VertexAttrib2fv( 1312 void VertexAttrib2fv(PP_Resource context_id,
1144 PP_Resource context_id, GLuint indx, const GLfloat* values) { 1313 GLuint indx,
1314 const GLfloat* values) {
1145 Enter3D enter(context_id, true); 1315 Enter3D enter(context_id, true);
1146 if (enter.succeeded()) { 1316 if (enter.succeeded()) {
1147 ToGles2Impl(&enter)->VertexAttrib2fv(indx, values); 1317 ToGles2Impl(&enter)->VertexAttrib2fv(indx, values);
1148 } 1318 }
1149 } 1319 }
1150 1320
1151 void VertexAttrib3f( 1321 void VertexAttrib3f(PP_Resource context_id,
1152 PP_Resource context_id, GLuint indx, GLfloat x, GLfloat y, GLfloat z) { 1322 GLuint indx,
1323 GLfloat x,
1324 GLfloat y,
1325 GLfloat z) {
1153 Enter3D enter(context_id, true); 1326 Enter3D enter(context_id, true);
1154 if (enter.succeeded()) { 1327 if (enter.succeeded()) {
1155 ToGles2Impl(&enter)->VertexAttrib3f(indx, x, y, z); 1328 ToGles2Impl(&enter)->VertexAttrib3f(indx, x, y, z);
1156 } 1329 }
1157 } 1330 }
1158 1331
1159 void VertexAttrib3fv( 1332 void VertexAttrib3fv(PP_Resource context_id,
1160 PP_Resource context_id, GLuint indx, const GLfloat* values) { 1333 GLuint indx,
1334 const GLfloat* values) {
1161 Enter3D enter(context_id, true); 1335 Enter3D enter(context_id, true);
1162 if (enter.succeeded()) { 1336 if (enter.succeeded()) {
1163 ToGles2Impl(&enter)->VertexAttrib3fv(indx, values); 1337 ToGles2Impl(&enter)->VertexAttrib3fv(indx, values);
1164 } 1338 }
1165 } 1339 }
1166 1340
1167 void VertexAttrib4f( 1341 void VertexAttrib4f(PP_Resource context_id,
1168 PP_Resource context_id, GLuint indx, GLfloat x, GLfloat y, GLfloat z, 1342 GLuint indx,
1169 GLfloat w) { 1343 GLfloat x,
1344 GLfloat y,
1345 GLfloat z,
1346 GLfloat w) {
1170 Enter3D enter(context_id, true); 1347 Enter3D enter(context_id, true);
1171 if (enter.succeeded()) { 1348 if (enter.succeeded()) {
1172 ToGles2Impl(&enter)->VertexAttrib4f(indx, x, y, z, w); 1349 ToGles2Impl(&enter)->VertexAttrib4f(indx, x, y, z, w);
1173 } 1350 }
1174 } 1351 }
1175 1352
1176 void VertexAttrib4fv( 1353 void VertexAttrib4fv(PP_Resource context_id,
1177 PP_Resource context_id, GLuint indx, const GLfloat* values) { 1354 GLuint indx,
1355 const GLfloat* values) {
1178 Enter3D enter(context_id, true); 1356 Enter3D enter(context_id, true);
1179 if (enter.succeeded()) { 1357 if (enter.succeeded()) {
1180 ToGles2Impl(&enter)->VertexAttrib4fv(indx, values); 1358 ToGles2Impl(&enter)->VertexAttrib4fv(indx, values);
1181 } 1359 }
1182 } 1360 }
1183 1361
1184 void VertexAttribPointer( 1362 void VertexAttribPointer(PP_Resource context_id,
1185 PP_Resource context_id, GLuint indx, GLint size, GLenum type, 1363 GLuint indx,
1186 GLboolean normalized, GLsizei stride, const void* ptr) { 1364 GLint size,
1365 GLenum type,
1366 GLboolean normalized,
1367 GLsizei stride,
1368 const void* ptr) {
1187 Enter3D enter(context_id, true); 1369 Enter3D enter(context_id, true);
1188 if (enter.succeeded()) { 1370 if (enter.succeeded()) {
1189 ToGles2Impl( 1371 ToGles2Impl(&enter)
1190 &enter)->VertexAttribPointer( 1372 ->VertexAttribPointer(indx, size, type, normalized, stride, ptr);
1191 indx, size, type, normalized, stride, ptr);
1192 } 1373 }
1193 } 1374 }
1194 1375
1195 void Viewport( 1376 void Viewport(PP_Resource context_id,
1196 PP_Resource context_id, GLint x, GLint y, GLsizei width, GLsizei height) { 1377 GLint x,
1378 GLint y,
1379 GLsizei width,
1380 GLsizei height) {
1197 Enter3D enter(context_id, true); 1381 Enter3D enter(context_id, true);
1198 if (enter.succeeded()) { 1382 if (enter.succeeded()) {
1199 ToGles2Impl(&enter)->Viewport(x, y, width, height); 1383 ToGles2Impl(&enter)->Viewport(x, y, width, height);
1200 } 1384 }
1201 } 1385 }
1202 1386
1203 void BlitFramebufferEXT( 1387 void BlitFramebufferEXT(PP_Resource context_id,
1204 PP_Resource context_id, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, 1388 GLint srcX0,
1205 GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, 1389 GLint srcY0,
1206 GLenum filter) { 1390 GLint srcX1,
1391 GLint srcY1,
1392 GLint dstX0,
1393 GLint dstY0,
1394 GLint dstX1,
1395 GLint dstY1,
1396 GLbitfield mask,
1397 GLenum filter) {
1207 Enter3D enter(context_id, true); 1398 Enter3D enter(context_id, true);
1208 if (enter.succeeded()) { 1399 if (enter.succeeded()) {
1209 ToGles2Impl( 1400 ToGles2Impl(&enter)->BlitFramebufferCHROMIUM(
1210 &enter)->BlitFramebufferCHROMIUM( 1401 srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
1211 srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask,
1212 filter);
1213 } 1402 }
1214 } 1403 }
1215 1404
1216 void RenderbufferStorageMultisampleEXT( 1405 void RenderbufferStorageMultisampleEXT(PP_Resource context_id,
1217 PP_Resource context_id, GLenum target, GLsizei samples, 1406 GLenum target,
1218 GLenum internalformat, GLsizei width, GLsizei height) { 1407 GLsizei samples,
1408 GLenum internalformat,
1409 GLsizei width,
1410 GLsizei height) {
1219 Enter3D enter(context_id, true); 1411 Enter3D enter(context_id, true);
1220 if (enter.succeeded()) { 1412 if (enter.succeeded()) {
1221 ToGles2Impl( 1413 ToGles2Impl(&enter)->RenderbufferStorageMultisampleCHROMIUM(
1222 &enter)->RenderbufferStorageMultisampleCHROMIUM( 1414 target, samples, internalformat, width, height);
1223 target, samples, internalformat, width, height);
1224 } 1415 }
1225 } 1416 }
1226 1417
1227 void GenQueriesEXT(PP_Resource context_id, GLsizei n, GLuint* queries) { 1418 void GenQueriesEXT(PP_Resource context_id, GLsizei n, GLuint* queries) {
1228 Enter3D enter(context_id, true); 1419 Enter3D enter(context_id, true);
1229 if (enter.succeeded()) { 1420 if (enter.succeeded()) {
1230 ToGles2Impl(&enter)->GenQueriesEXT(n, queries); 1421 ToGles2Impl(&enter)->GenQueriesEXT(n, queries);
1231 } 1422 }
1232 } 1423 }
1233 1424
1234 void DeleteQueriesEXT( 1425 void DeleteQueriesEXT(PP_Resource context_id,
1235 PP_Resource context_id, GLsizei n, const GLuint* queries) { 1426 GLsizei n,
1427 const GLuint* queries) {
1236 Enter3D enter(context_id, true); 1428 Enter3D enter(context_id, true);
1237 if (enter.succeeded()) { 1429 if (enter.succeeded()) {
1238 ToGles2Impl(&enter)->DeleteQueriesEXT(n, queries); 1430 ToGles2Impl(&enter)->DeleteQueriesEXT(n, queries);
1239 } 1431 }
1240 } 1432 }
1241 1433
1242 GLboolean IsQueryEXT(PP_Resource context_id, GLuint id) { 1434 GLboolean IsQueryEXT(PP_Resource context_id, GLuint id) {
1243 Enter3D enter(context_id, true); 1435 Enter3D enter(context_id, true);
1244 if (enter.succeeded()) { 1436 if (enter.succeeded()) {
1245 return ToGles2Impl(&enter)->IsQueryEXT(id); 1437 return ToGles2Impl(&enter)->IsQueryEXT(id);
1246 } else { 1438 } else {
1247 return GL_FALSE; 1439 return GL_FALSE;
1248 } 1440 }
1249 } 1441 }
1250 1442
1251 void BeginQueryEXT(PP_Resource context_id, GLenum target, GLuint id) { 1443 void BeginQueryEXT(PP_Resource context_id, GLenum target, GLuint id) {
1252 Enter3D enter(context_id, true); 1444 Enter3D enter(context_id, true);
1253 if (enter.succeeded()) { 1445 if (enter.succeeded()) {
1254 ToGles2Impl(&enter)->BeginQueryEXT(target, id); 1446 ToGles2Impl(&enter)->BeginQueryEXT(target, id);
1255 } 1447 }
1256 } 1448 }
1257 1449
1258 void EndQueryEXT(PP_Resource context_id, GLenum target) { 1450 void EndQueryEXT(PP_Resource context_id, GLenum target) {
1259 Enter3D enter(context_id, true); 1451 Enter3D enter(context_id, true);
1260 if (enter.succeeded()) { 1452 if (enter.succeeded()) {
1261 ToGles2Impl(&enter)->EndQueryEXT(target); 1453 ToGles2Impl(&enter)->EndQueryEXT(target);
1262 } 1454 }
1263 } 1455 }
1264 1456
1265 void GetQueryivEXT( 1457 void GetQueryivEXT(PP_Resource context_id,
1266 PP_Resource context_id, GLenum target, GLenum pname, GLint* params) { 1458 GLenum target,
1459 GLenum pname,
1460 GLint* params) {
1267 Enter3D enter(context_id, true); 1461 Enter3D enter(context_id, true);
1268 if (enter.succeeded()) { 1462 if (enter.succeeded()) {
1269 ToGles2Impl(&enter)->GetQueryivEXT(target, pname, params); 1463 ToGles2Impl(&enter)->GetQueryivEXT(target, pname, params);
1270 } 1464 }
1271 } 1465 }
1272 1466
1273 void GetQueryObjectuivEXT( 1467 void GetQueryObjectuivEXT(PP_Resource context_id,
1274 PP_Resource context_id, GLuint id, GLenum pname, GLuint* params) { 1468 GLuint id,
1469 GLenum pname,
1470 GLuint* params) {
1275 Enter3D enter(context_id, true); 1471 Enter3D enter(context_id, true);
1276 if (enter.succeeded()) { 1472 if (enter.succeeded()) {
1277 ToGles2Impl(&enter)->GetQueryObjectuivEXT(id, pname, params); 1473 ToGles2Impl(&enter)->GetQueryObjectuivEXT(id, pname, params);
1278 } 1474 }
1279 } 1475 }
1280 1476
1281 GLboolean EnableFeatureCHROMIUM(PP_Resource context_id, const char* feature) { 1477 GLboolean EnableFeatureCHROMIUM(PP_Resource context_id, const char* feature) {
1282 Enter3D enter(context_id, true); 1478 Enter3D enter(context_id, true);
1283 if (enter.succeeded()) { 1479 if (enter.succeeded()) {
1284 return ToGles2Impl(&enter)->EnableFeatureCHROMIUM(feature); 1480 return ToGles2Impl(&enter)->EnableFeatureCHROMIUM(feature);
1285 } else { 1481 } else {
1286 return GL_FALSE; 1482 return GL_FALSE;
1287 } 1483 }
1288 } 1484 }
1289 1485
1290 void* MapBufferSubDataCHROMIUM( 1486 void* MapBufferSubDataCHROMIUM(PP_Resource context_id,
1291 PP_Resource context_id, GLuint target, GLintptr offset, GLsizeiptr size, 1487 GLuint target,
1292 GLenum access) { 1488 GLintptr offset,
1489 GLsizeiptr size,
1490 GLenum access) {
1293 Enter3D enter(context_id, true); 1491 Enter3D enter(context_id, true);
1294 if (enter.succeeded()) { 1492 if (enter.succeeded()) {
1295 return ToGles2Impl( 1493 return ToGles2Impl(&enter)
1296 &enter)->MapBufferSubDataCHROMIUM(target, offset, size, access); 1494 ->MapBufferSubDataCHROMIUM(target, offset, size, access);
1297 } else { 1495 } else {
1298 return NULL; 1496 return NULL;
1299 } 1497 }
1300 } 1498 }
1301 1499
1302 void UnmapBufferSubDataCHROMIUM(PP_Resource context_id, const void* mem) { 1500 void UnmapBufferSubDataCHROMIUM(PP_Resource context_id, const void* mem) {
1303 Enter3D enter(context_id, true); 1501 Enter3D enter(context_id, true);
1304 if (enter.succeeded()) { 1502 if (enter.succeeded()) {
1305 ToGles2Impl(&enter)->UnmapBufferSubDataCHROMIUM(mem); 1503 ToGles2Impl(&enter)->UnmapBufferSubDataCHROMIUM(mem);
1306 } 1504 }
1307 } 1505 }
1308 1506
1309 void* MapTexSubImage2DCHROMIUM( 1507 void* MapTexSubImage2DCHROMIUM(PP_Resource context_id,
1310 PP_Resource context_id, GLenum target, GLint level, GLint xoffset, 1508 GLenum target,
1311 GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, 1509 GLint level,
1312 GLenum access) { 1510 GLint xoffset,
1511 GLint yoffset,
1512 GLsizei width,
1513 GLsizei height,
1514 GLenum format,
1515 GLenum type,
1516 GLenum access) {
1313 Enter3D enter(context_id, true); 1517 Enter3D enter(context_id, true);
1314 if (enter.succeeded()) { 1518 if (enter.succeeded()) {
1315 return ToGles2Impl( 1519 return ToGles2Impl(&enter)->MapTexSubImage2DCHROMIUM(
1316 &enter)->MapTexSubImage2DCHROMIUM( 1520 target, level, xoffset, yoffset, width, height, format, type, access);
1317 target, level, xoffset, yoffset, width, height, format, type,
1318 access);
1319 } else { 1521 } else {
1320 return NULL; 1522 return NULL;
1321 } 1523 }
1322 } 1524 }
1323 1525
1324 void UnmapTexSubImage2DCHROMIUM(PP_Resource context_id, const void* mem) { 1526 void UnmapTexSubImage2DCHROMIUM(PP_Resource context_id, const void* mem) {
1325 Enter3D enter(context_id, true); 1527 Enter3D enter(context_id, true);
1326 if (enter.succeeded()) { 1528 if (enter.succeeded()) {
1327 ToGles2Impl(&enter)->UnmapTexSubImage2DCHROMIUM(mem); 1529 ToGles2Impl(&enter)->UnmapTexSubImage2DCHROMIUM(mem);
1328 } 1530 }
1329 } 1531 }
1330 1532
1331 void DrawArraysInstancedANGLE( 1533 void DrawArraysInstancedANGLE(PP_Resource context_id,
1332 PP_Resource context_id, GLenum mode, GLint first, GLsizei count, 1534 GLenum mode,
1333 GLsizei primcount) { 1535 GLint first,
1536 GLsizei count,
1537 GLsizei primcount) {
1334 Enter3D enter(context_id, true); 1538 Enter3D enter(context_id, true);
1335 if (enter.succeeded()) { 1539 if (enter.succeeded()) {
1336 ToGles2Impl( 1540 ToGles2Impl(&enter)
1337 &enter)->DrawArraysInstancedANGLE(mode, first, count, primcount); 1541 ->DrawArraysInstancedANGLE(mode, first, count, primcount);
1338 } 1542 }
1339 } 1543 }
1340 1544
1341 void DrawElementsInstancedANGLE( 1545 void DrawElementsInstancedANGLE(PP_Resource context_id,
1342 PP_Resource context_id, GLenum mode, GLsizei count, GLenum type, 1546 GLenum mode,
1343 const void* indices, GLsizei primcount) { 1547 GLsizei count,
1548 GLenum type,
1549 const void* indices,
1550 GLsizei primcount) {
1344 Enter3D enter(context_id, true); 1551 Enter3D enter(context_id, true);
1345 if (enter.succeeded()) { 1552 if (enter.succeeded()) {
1346 ToGles2Impl( 1553 ToGles2Impl(&enter)
1347 &enter)->DrawElementsInstancedANGLE( 1554 ->DrawElementsInstancedANGLE(mode, count, type, indices, primcount);
1348 mode, count, type, indices, primcount);
1349 } 1555 }
1350 } 1556 }
1351 1557
1352 void VertexAttribDivisorANGLE( 1558 void VertexAttribDivisorANGLE(PP_Resource context_id,
1353 PP_Resource context_id, GLuint index, GLuint divisor) { 1559 GLuint index,
1560 GLuint divisor) {
1354 Enter3D enter(context_id, true); 1561 Enter3D enter(context_id, true);
1355 if (enter.succeeded()) { 1562 if (enter.succeeded()) {
1356 ToGles2Impl(&enter)->VertexAttribDivisorANGLE(index, divisor); 1563 ToGles2Impl(&enter)->VertexAttribDivisorANGLE(index, divisor);
1357 } 1564 }
1358 } 1565 }
1359 1566
1360 } // namespace 1567 } // namespace
1361 const PPB_OpenGLES2* PPB_OpenGLES2_Shared::GetInterface() { 1568 const PPB_OpenGLES2* PPB_OpenGLES2_Shared::GetInterface() {
1362 static const struct PPB_OpenGLES2 ppb_opengles2 = { 1569 static const struct PPB_OpenGLES2 ppb_opengles2 = {
1363 &ActiveTexture, 1570 &ActiveTexture, &AttachShader,
1364 &AttachShader, 1571 &BindAttribLocation, &BindBuffer,
1365 &BindAttribLocation, 1572 &BindFramebuffer, &BindRenderbuffer,
1366 &BindBuffer, 1573 &BindTexture, &BlendColor,
1367 &BindFramebuffer, 1574 &BlendEquation, &BlendEquationSeparate,
1368 &BindRenderbuffer, 1575 &BlendFunc, &BlendFuncSeparate,
1369 &BindTexture, 1576 &BufferData, &BufferSubData,
1370 &BlendColor, 1577 &CheckFramebufferStatus, &Clear,
1371 &BlendEquation, 1578 &ClearColor, &ClearDepthf,
1372 &BlendEquationSeparate, 1579 &ClearStencil, &ColorMask,
1373 &BlendFunc, 1580 &CompileShader, &CompressedTexImage2D,
1374 &BlendFuncSeparate, 1581 &CompressedTexSubImage2D, &CopyTexImage2D,
1375 &BufferData, 1582 &CopyTexSubImage2D, &CreateProgram,
1376 &BufferSubData, 1583 &CreateShader, &CullFace,
1377 &CheckFramebufferStatus, 1584 &DeleteBuffers, &DeleteFramebuffers,
1378 &Clear, 1585 &DeleteProgram, &DeleteRenderbuffers,
1379 &ClearColor, 1586 &DeleteShader, &DeleteTextures,
1380 &ClearDepthf, 1587 &DepthFunc, &DepthMask,
1381 &ClearStencil, 1588 &DepthRangef, &DetachShader,
1382 &ColorMask, 1589 &Disable, &DisableVertexAttribArray,
1383 &CompileShader, 1590 &DrawArrays, &DrawElements,
1384 &CompressedTexImage2D, 1591 &Enable, &EnableVertexAttribArray,
1385 &CompressedTexSubImage2D, 1592 &Finish, &Flush,
1386 &CopyTexImage2D, 1593 &FramebufferRenderbuffer, &FramebufferTexture2D,
1387 &CopyTexSubImage2D, 1594 &FrontFace, &GenBuffers,
1388 &CreateProgram, 1595 &GenerateMipmap, &GenFramebuffers,
1389 &CreateShader, 1596 &GenRenderbuffers, &GenTextures,
1390 &CullFace, 1597 &GetActiveAttrib, &GetActiveUniform,
1391 &DeleteBuffers, 1598 &GetAttachedShaders, &GetAttribLocation,
1392 &DeleteFramebuffers, 1599 &GetBooleanv, &GetBufferParameteriv,
1393 &DeleteProgram, 1600 &GetError, &GetFloatv,
1394 &DeleteRenderbuffers, 1601 &GetFramebufferAttachmentParameteriv, &GetIntegerv,
1395 &DeleteShader, 1602 &GetProgramiv, &GetProgramInfoLog,
1396 &DeleteTextures, 1603 &GetRenderbufferParameteriv, &GetShaderiv,
1397 &DepthFunc, 1604 &GetShaderInfoLog, &GetShaderPrecisionFormat,
1398 &DepthMask, 1605 &GetShaderSource, &GetString,
1399 &DepthRangef, 1606 &GetTexParameterfv, &GetTexParameteriv,
1400 &DetachShader, 1607 &GetUniformfv, &GetUniformiv,
1401 &Disable, 1608 &GetUniformLocation, &GetVertexAttribfv,
1402 &DisableVertexAttribArray, 1609 &GetVertexAttribiv, &GetVertexAttribPointerv,
1403 &DrawArrays, 1610 &Hint, &IsBuffer,
1404 &DrawElements, 1611 &IsEnabled, &IsFramebuffer,
1405 &Enable, 1612 &IsProgram, &IsRenderbuffer,
1406 &EnableVertexAttribArray, 1613 &IsShader, &IsTexture,
1407 &Finish, 1614 &LineWidth, &LinkProgram,
1408 &Flush, 1615 &PixelStorei, &PolygonOffset,
1409 &FramebufferRenderbuffer, 1616 &ReadPixels, &ReleaseShaderCompiler,
1410 &FramebufferTexture2D, 1617 &RenderbufferStorage, &SampleCoverage,
1411 &FrontFace, 1618 &Scissor, &ShaderBinary,
1412 &GenBuffers, 1619 &ShaderSource, &StencilFunc,
1413 &GenerateMipmap, 1620 &StencilFuncSeparate, &StencilMask,
1414 &GenFramebuffers, 1621 &StencilMaskSeparate, &StencilOp,
1415 &GenRenderbuffers, 1622 &StencilOpSeparate, &TexImage2D,
1416 &GenTextures, 1623 &TexParameterf, &TexParameterfv,
1417 &GetActiveAttrib, 1624 &TexParameteri, &TexParameteriv,
1418 &GetActiveUniform, 1625 &TexSubImage2D, &Uniform1f,
1419 &GetAttachedShaders, 1626 &Uniform1fv, &Uniform1i,
1420 &GetAttribLocation, 1627 &Uniform1iv, &Uniform2f,
1421 &GetBooleanv, 1628 &Uniform2fv, &Uniform2i,
1422 &GetBufferParameteriv, 1629 &Uniform2iv, &Uniform3f,
1423 &GetError, 1630 &Uniform3fv, &Uniform3i,
1424 &GetFloatv, 1631 &Uniform3iv, &Uniform4f,
1425 &GetFramebufferAttachmentParameteriv, 1632 &Uniform4fv, &Uniform4i,
1426 &GetIntegerv, 1633 &Uniform4iv, &UniformMatrix2fv,
1427 &GetProgramiv, 1634 &UniformMatrix3fv, &UniformMatrix4fv,
1428 &GetProgramInfoLog, 1635 &UseProgram, &ValidateProgram,
1429 &GetRenderbufferParameteriv, 1636 &VertexAttrib1f, &VertexAttrib1fv,
1430 &GetShaderiv, 1637 &VertexAttrib2f, &VertexAttrib2fv,
1431 &GetShaderInfoLog, 1638 &VertexAttrib3f, &VertexAttrib3fv,
1432 &GetShaderPrecisionFormat, 1639 &VertexAttrib4f, &VertexAttrib4fv,
1433 &GetShaderSource, 1640 &VertexAttribPointer, &Viewport};
1434 &GetString,
1435 &GetTexParameterfv,
1436 &GetTexParameteriv,
1437 &GetUniformfv,
1438 &GetUniformiv,
1439 &GetUniformLocation,
1440 &GetVertexAttribfv,
1441 &GetVertexAttribiv,
1442 &GetVertexAttribPointerv,
1443 &Hint,
1444 &IsBuffer,
1445 &IsEnabled,
1446 &IsFramebuffer,
1447 &IsProgram,
1448 &IsRenderbuffer,
1449 &IsShader,
1450 &IsTexture,
1451 &LineWidth,
1452 &LinkProgram,
1453 &PixelStorei,
1454 &PolygonOffset,
1455 &ReadPixels,
1456 &ReleaseShaderCompiler,
1457 &RenderbufferStorage,
1458 &SampleCoverage,
1459 &Scissor,
1460 &ShaderBinary,
1461 &ShaderSource,
1462 &StencilFunc,
1463 &StencilFuncSeparate,
1464 &StencilMask,
1465 &StencilMaskSeparate,
1466 &StencilOp,
1467 &StencilOpSeparate,
1468 &TexImage2D,
1469 &TexParameterf,
1470 &TexParameterfv,
1471 &TexParameteri,
1472 &TexParameteriv,
1473 &TexSubImage2D,
1474 &Uniform1f,
1475 &Uniform1fv,
1476 &Uniform1i,
1477 &Uniform1iv,
1478 &Uniform2f,
1479 &Uniform2fv,
1480 &Uniform2i,
1481 &Uniform2iv,
1482 &Uniform3f,
1483 &Uniform3fv,
1484 &Uniform3i,
1485 &Uniform3iv,
1486 &Uniform4f,
1487 &Uniform4fv,
1488 &Uniform4i,
1489 &Uniform4iv,
1490 &UniformMatrix2fv,
1491 &UniformMatrix3fv,
1492 &UniformMatrix4fv,
1493 &UseProgram,
1494 &ValidateProgram,
1495 &VertexAttrib1f,
1496 &VertexAttrib1fv,
1497 &VertexAttrib2f,
1498 &VertexAttrib2fv,
1499 &VertexAttrib3f,
1500 &VertexAttrib3fv,
1501 &VertexAttrib4f,
1502 &VertexAttrib4fv,
1503 &VertexAttribPointer,
1504 &Viewport
1505 };
1506 return &ppb_opengles2; 1641 return &ppb_opengles2;
1507 } 1642 }
1508 const PPB_OpenGLES2InstancedArrays* PPB_OpenGLES2_Shared::GetInstancedArraysInte rface() { // NOLINT 1643 const PPB_OpenGLES2InstancedArrays*
1644 PPB_OpenGLES2_Shared::GetInstancedArraysInterface() { // NOLINT
1509 static const struct PPB_OpenGLES2InstancedArrays ppb_opengles2 = { 1645 static const struct PPB_OpenGLES2InstancedArrays ppb_opengles2 = {
1510 &DrawArraysInstancedANGLE, 1646 &DrawArraysInstancedANGLE, &DrawElementsInstancedANGLE,
1511 &DrawElementsInstancedANGLE, 1647 &VertexAttribDivisorANGLE};
1512 &VertexAttribDivisorANGLE
1513 };
1514 return &ppb_opengles2; 1648 return &ppb_opengles2;
1515 } 1649 }
1516 const PPB_OpenGLES2FramebufferBlit* PPB_OpenGLES2_Shared::GetFramebufferBlitInte rface() { // NOLINT 1650 const PPB_OpenGLES2FramebufferBlit*
1651 PPB_OpenGLES2_Shared::GetFramebufferBlitInterface() { // NOLINT
1517 static const struct PPB_OpenGLES2FramebufferBlit ppb_opengles2 = { 1652 static const struct PPB_OpenGLES2FramebufferBlit ppb_opengles2 = {
1518 &BlitFramebufferEXT 1653 &BlitFramebufferEXT};
1519 };
1520 return &ppb_opengles2; 1654 return &ppb_opengles2;
1521 } 1655 }
1522 const PPB_OpenGLES2FramebufferMultisample* PPB_OpenGLES2_Shared::GetFramebufferM ultisampleInterface() { // NOLINT 1656 const PPB_OpenGLES2FramebufferMultisample*
1657 PPB_OpenGLES2_Shared::GetFramebufferMultisampleInterface() { // NOLINT
1523 static const struct PPB_OpenGLES2FramebufferMultisample ppb_opengles2 = { 1658 static const struct PPB_OpenGLES2FramebufferMultisample ppb_opengles2 = {
1524 &RenderbufferStorageMultisampleEXT 1659 &RenderbufferStorageMultisampleEXT};
1525 };
1526 return &ppb_opengles2; 1660 return &ppb_opengles2;
1527 } 1661 }
1528 const PPB_OpenGLES2ChromiumEnableFeature* PPB_OpenGLES2_Shared::GetChromiumEnabl eFeatureInterface() { // NOLINT 1662 const PPB_OpenGLES2ChromiumEnableFeature*
1663 PPB_OpenGLES2_Shared::GetChromiumEnableFeatureInterface() { // NOLINT
1529 static const struct PPB_OpenGLES2ChromiumEnableFeature ppb_opengles2 = { 1664 static const struct PPB_OpenGLES2ChromiumEnableFeature ppb_opengles2 = {
1530 &EnableFeatureCHROMIUM 1665 &EnableFeatureCHROMIUM};
1531 };
1532 return &ppb_opengles2; 1666 return &ppb_opengles2;
1533 } 1667 }
1534 const PPB_OpenGLES2ChromiumMapSub* PPB_OpenGLES2_Shared::GetChromiumMapSubInterf ace() { // NOLINT 1668 const PPB_OpenGLES2ChromiumMapSub*
1669 PPB_OpenGLES2_Shared::GetChromiumMapSubInterface() { // NOLINT
1535 static const struct PPB_OpenGLES2ChromiumMapSub ppb_opengles2 = { 1670 static const struct PPB_OpenGLES2ChromiumMapSub ppb_opengles2 = {
1536 &MapBufferSubDataCHROMIUM, 1671 &MapBufferSubDataCHROMIUM, &UnmapBufferSubDataCHROMIUM,
1537 &UnmapBufferSubDataCHROMIUM, 1672 &MapTexSubImage2DCHROMIUM, &UnmapTexSubImage2DCHROMIUM};
1538 &MapTexSubImage2DCHROMIUM,
1539 &UnmapTexSubImage2DCHROMIUM
1540 };
1541 return &ppb_opengles2; 1673 return &ppb_opengles2;
1542 } 1674 }
1543 const PPB_OpenGLES2Query* PPB_OpenGLES2_Shared::GetQueryInterface() { 1675 const PPB_OpenGLES2Query* PPB_OpenGLES2_Shared::GetQueryInterface() {
1544 static const struct PPB_OpenGLES2Query ppb_opengles2 = { 1676 static const struct PPB_OpenGLES2Query ppb_opengles2 = {
1545 &GenQueriesEXT, 1677 &GenQueriesEXT, &DeleteQueriesEXT, &IsQueryEXT, &BeginQueryEXT,
1546 &DeleteQueriesEXT, 1678 &EndQueryEXT, &GetQueryivEXT, &GetQueryObjectuivEXT};
1547 &IsQueryEXT,
1548 &BeginQueryEXT,
1549 &EndQueryEXT,
1550 &GetQueryivEXT,
1551 &GetQueryObjectuivEXT
1552 };
1553 return &ppb_opengles2; 1679 return &ppb_opengles2;
1554 } 1680 }
1555 } // namespace ppapi 1681 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppb_opengles2_shared.h ('k') | ppapi/shared_impl/ppb_tcp_socket_shared.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698