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

Side by Side Diff: webkit/plugins/ppapi/ppb_opengles_impl.cc

Issue 5927002: Moved the logic of maintaining the current context to gles2 helper library. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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 | « webkit/plugins/ppapi/ppb_open_gl_es_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // This file is auto-generated. DO NOT EDIT!
6
7 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h"
8
9 #include "gpu/command_buffer/client/gles2_implementation.h"
10 #include "ppapi/c/dev/ppb_opengles_dev.h"
11
12 namespace webkit {
13 namespace ppapi {
14
15 namespace {
16
17 void ActiveTexture(PP_Resource context, GLenum texture) {
18 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
19 Resource::GetAs<PPB_Graphics3D_Impl>(context);
20 graphics_3d->impl()->ActiveTexture(texture);
21 }
22
23 void AttachShader(PP_Resource context, GLuint program, GLuint shader) {
24 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
25 Resource::GetAs<PPB_Graphics3D_Impl>(context);
26 graphics_3d->impl()->AttachShader(program, shader);
27 }
28
29 void BindAttribLocation(
30 PP_Resource context, GLuint program, GLuint index, const char* name) {
31 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
32 Resource::GetAs<PPB_Graphics3D_Impl>(context);
33 graphics_3d->impl()->BindAttribLocation(program, index, name);
34 }
35
36 void BindBuffer(PP_Resource context, GLenum target, GLuint buffer) {
37 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
38 Resource::GetAs<PPB_Graphics3D_Impl>(context);
39 graphics_3d->impl()->BindBuffer(target, buffer);
40 }
41
42 void BindFramebuffer(PP_Resource context, GLenum target, GLuint framebuffer) {
43 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
44 Resource::GetAs<PPB_Graphics3D_Impl>(context);
45 graphics_3d->impl()->BindFramebuffer(target, framebuffer);
46 }
47
48 void BindRenderbuffer(
49 PP_Resource context, GLenum target, GLuint renderbuffer) {
50 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
51 Resource::GetAs<PPB_Graphics3D_Impl>(context);
52 graphics_3d->impl()->BindRenderbuffer(target, renderbuffer);
53 }
54
55 void BindTexture(PP_Resource context, GLenum target, GLuint texture) {
56 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
57 Resource::GetAs<PPB_Graphics3D_Impl>(context);
58 graphics_3d->impl()->BindTexture(target, texture);
59 }
60
61 void BlendColor(
62 PP_Resource context, GLclampf red, GLclampf green, GLclampf blue,
63 GLclampf alpha) {
64 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
65 Resource::GetAs<PPB_Graphics3D_Impl>(context);
66 graphics_3d->impl()->BlendColor(red, green, blue, alpha);
67 }
68
69 void BlendEquation(PP_Resource context, GLenum mode) {
70 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
71 Resource::GetAs<PPB_Graphics3D_Impl>(context);
72 graphics_3d->impl()->BlendEquation(mode);
73 }
74
75 void BlendEquationSeparate(
76 PP_Resource context, GLenum modeRGB, GLenum modeAlpha) {
77 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
78 Resource::GetAs<PPB_Graphics3D_Impl>(context);
79 graphics_3d->impl()->BlendEquationSeparate(modeRGB, modeAlpha);
80 }
81
82 void BlendFunc(PP_Resource context, GLenum sfactor, GLenum dfactor) {
83 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
84 Resource::GetAs<PPB_Graphics3D_Impl>(context);
85 graphics_3d->impl()->BlendFunc(sfactor, dfactor);
86 }
87
88 void BlendFuncSeparate(
89 PP_Resource context, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha,
90 GLenum dstAlpha) {
91 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
92 Resource::GetAs<PPB_Graphics3D_Impl>(context);
93 graphics_3d->impl()->BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
94 }
95
96 void BufferData(
97 PP_Resource context, GLenum target, GLsizeiptr size, const void* data,
98 GLenum usage) {
99 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
100 Resource::GetAs<PPB_Graphics3D_Impl>(context);
101 graphics_3d->impl()->BufferData(target, size, data, usage);
102 }
103
104 void BufferSubData(
105 PP_Resource context, GLenum target, GLintptr offset, GLsizeiptr size,
106 const void* data) {
107 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
108 Resource::GetAs<PPB_Graphics3D_Impl>(context);
109 graphics_3d->impl()->BufferSubData(target, offset, size, data);
110 }
111
112 GLenum CheckFramebufferStatus(PP_Resource context, GLenum target) {
113 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
114 Resource::GetAs<PPB_Graphics3D_Impl>(context);
115 return graphics_3d->impl()->CheckFramebufferStatus(target);
116 }
117
118 void Clear(PP_Resource context, GLbitfield mask) {
119 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
120 Resource::GetAs<PPB_Graphics3D_Impl>(context);
121 graphics_3d->impl()->Clear(mask);
122 }
123
124 void ClearColor(
125 PP_Resource context, GLclampf red, GLclampf green, GLclampf blue,
126 GLclampf alpha) {
127 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
128 Resource::GetAs<PPB_Graphics3D_Impl>(context);
129 graphics_3d->impl()->ClearColor(red, green, blue, alpha);
130 }
131
132 void ClearDepthf(PP_Resource context, GLclampf depth) {
133 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
134 Resource::GetAs<PPB_Graphics3D_Impl>(context);
135 graphics_3d->impl()->ClearDepthf(depth);
136 }
137
138 void ClearStencil(PP_Resource context, GLint s) {
139 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
140 Resource::GetAs<PPB_Graphics3D_Impl>(context);
141 graphics_3d->impl()->ClearStencil(s);
142 }
143
144 void ColorMask(
145 PP_Resource context, GLboolean red, GLboolean green, GLboolean blue,
146 GLboolean alpha) {
147 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
148 Resource::GetAs<PPB_Graphics3D_Impl>(context);
149 graphics_3d->impl()->ColorMask(red, green, blue, alpha);
150 }
151
152 void CompileShader(PP_Resource context, GLuint shader) {
153 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
154 Resource::GetAs<PPB_Graphics3D_Impl>(context);
155 graphics_3d->impl()->CompileShader(shader);
156 }
157
158 void CompressedTexImage2D(
159 PP_Resource context, GLenum target, GLint level, GLenum internalformat,
160 GLsizei width, GLsizei height, GLint border, GLsizei imageSize,
161 const void* data) {
162 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
163 Resource::GetAs<PPB_Graphics3D_Impl>(context);
164 graphics_3d->impl()->CompressedTexImage2D(
165 target, level, internalformat, width, height, border, imageSize, data);
166 }
167
168 void CompressedTexSubImage2D(
169 PP_Resource context, GLenum target, GLint level, GLint xoffset,
170 GLint yoffset, GLsizei width, GLsizei height, GLenum format,
171 GLsizei imageSize, const void* data) {
172 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
173 Resource::GetAs<PPB_Graphics3D_Impl>(context);
174 graphics_3d->impl()->CompressedTexSubImage2D(
175 target, level, xoffset, yoffset, width, height, format, imageSize, data);
176 }
177
178 void CopyTexImage2D(
179 PP_Resource context, GLenum target, GLint level, GLenum internalformat,
180 GLint x, GLint y, GLsizei width, GLsizei height, GLint border) {
181 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
182 Resource::GetAs<PPB_Graphics3D_Impl>(context);
183 graphics_3d->impl()->CopyTexImage2D(
184 target, level, internalformat, x, y, width, height, border);
185 }
186
187 void CopyTexSubImage2D(
188 PP_Resource context, GLenum target, GLint level, GLint xoffset,
189 GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
190 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
191 Resource::GetAs<PPB_Graphics3D_Impl>(context);
192 graphics_3d->impl()->CopyTexSubImage2D(
193 target, level, xoffset, yoffset, x, y, width, height);
194 }
195
196 GLuint CreateProgram(PP_Resource context) {
197 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
198 Resource::GetAs<PPB_Graphics3D_Impl>(context);
199 return graphics_3d->impl()->CreateProgram();
200 }
201
202 GLuint CreateShader(PP_Resource context, GLenum type) {
203 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
204 Resource::GetAs<PPB_Graphics3D_Impl>(context);
205 return graphics_3d->impl()->CreateShader(type);
206 }
207
208 void CullFace(PP_Resource context, GLenum mode) {
209 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
210 Resource::GetAs<PPB_Graphics3D_Impl>(context);
211 graphics_3d->impl()->CullFace(mode);
212 }
213
214 void DeleteBuffers(PP_Resource context, GLsizei n, const GLuint* buffers) {
215 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
216 Resource::GetAs<PPB_Graphics3D_Impl>(context);
217 graphics_3d->impl()->DeleteBuffers(n, buffers);
218 }
219
220 void DeleteFramebuffers(
221 PP_Resource context, GLsizei n, const GLuint* framebuffers) {
222 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
223 Resource::GetAs<PPB_Graphics3D_Impl>(context);
224 graphics_3d->impl()->DeleteFramebuffers(n, framebuffers);
225 }
226
227 void DeleteProgram(PP_Resource context, GLuint program) {
228 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
229 Resource::GetAs<PPB_Graphics3D_Impl>(context);
230 graphics_3d->impl()->DeleteProgram(program);
231 }
232
233 void DeleteRenderbuffers(
234 PP_Resource context, GLsizei n, const GLuint* renderbuffers) {
235 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
236 Resource::GetAs<PPB_Graphics3D_Impl>(context);
237 graphics_3d->impl()->DeleteRenderbuffers(n, renderbuffers);
238 }
239
240 void DeleteShader(PP_Resource context, GLuint shader) {
241 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
242 Resource::GetAs<PPB_Graphics3D_Impl>(context);
243 graphics_3d->impl()->DeleteShader(shader);
244 }
245
246 void DeleteTextures(PP_Resource context, GLsizei n, const GLuint* textures) {
247 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
248 Resource::GetAs<PPB_Graphics3D_Impl>(context);
249 graphics_3d->impl()->DeleteTextures(n, textures);
250 }
251
252 void DepthFunc(PP_Resource context, GLenum func) {
253 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
254 Resource::GetAs<PPB_Graphics3D_Impl>(context);
255 graphics_3d->impl()->DepthFunc(func);
256 }
257
258 void DepthMask(PP_Resource context, GLboolean flag) {
259 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
260 Resource::GetAs<PPB_Graphics3D_Impl>(context);
261 graphics_3d->impl()->DepthMask(flag);
262 }
263
264 void DepthRangef(PP_Resource context, GLclampf zNear, GLclampf zFar) {
265 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
266 Resource::GetAs<PPB_Graphics3D_Impl>(context);
267 graphics_3d->impl()->DepthRangef(zNear, zFar);
268 }
269
270 void DetachShader(PP_Resource context, GLuint program, GLuint shader) {
271 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
272 Resource::GetAs<PPB_Graphics3D_Impl>(context);
273 graphics_3d->impl()->DetachShader(program, shader);
274 }
275
276 void Disable(PP_Resource context, GLenum cap) {
277 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
278 Resource::GetAs<PPB_Graphics3D_Impl>(context);
279 graphics_3d->impl()->Disable(cap);
280 }
281
282 void DisableVertexAttribArray(PP_Resource context, GLuint index) {
283 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
284 Resource::GetAs<PPB_Graphics3D_Impl>(context);
285 graphics_3d->impl()->DisableVertexAttribArray(index);
286 }
287
288 void DrawArrays(PP_Resource context, GLenum mode, GLint first, GLsizei count) {
289 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
290 Resource::GetAs<PPB_Graphics3D_Impl>(context);
291 graphics_3d->impl()->DrawArrays(mode, first, count);
292 }
293
294 void DrawElements(
295 PP_Resource context, GLenum mode, GLsizei count, GLenum type,
296 const void* indices) {
297 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
298 Resource::GetAs<PPB_Graphics3D_Impl>(context);
299 graphics_3d->impl()->DrawElements(mode, count, type, indices);
300 }
301
302 void Enable(PP_Resource context, GLenum cap) {
303 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
304 Resource::GetAs<PPB_Graphics3D_Impl>(context);
305 graphics_3d->impl()->Enable(cap);
306 }
307
308 void EnableVertexAttribArray(PP_Resource context, GLuint index) {
309 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
310 Resource::GetAs<PPB_Graphics3D_Impl>(context);
311 graphics_3d->impl()->EnableVertexAttribArray(index);
312 }
313
314 void Finish(PP_Resource context) {
315 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
316 Resource::GetAs<PPB_Graphics3D_Impl>(context);
317 graphics_3d->impl()->Finish();
318 }
319
320 void Flush(PP_Resource context) {
321 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
322 Resource::GetAs<PPB_Graphics3D_Impl>(context);
323 graphics_3d->impl()->Flush();
324 }
325
326 void FramebufferRenderbuffer(
327 PP_Resource context, GLenum target, GLenum attachment,
328 GLenum renderbuffertarget, GLuint renderbuffer) {
329 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
330 Resource::GetAs<PPB_Graphics3D_Impl>(context);
331 graphics_3d->impl()->FramebufferRenderbuffer(
332 target, attachment, renderbuffertarget, renderbuffer);
333 }
334
335 void FramebufferTexture2D(
336 PP_Resource context, GLenum target, GLenum attachment, GLenum textarget,
337 GLuint texture, GLint level) {
338 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
339 Resource::GetAs<PPB_Graphics3D_Impl>(context);
340 graphics_3d->impl()->FramebufferTexture2D(
341 target, attachment, textarget, texture, level);
342 }
343
344 void FrontFace(PP_Resource context, GLenum mode) {
345 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
346 Resource::GetAs<PPB_Graphics3D_Impl>(context);
347 graphics_3d->impl()->FrontFace(mode);
348 }
349
350 void GenBuffers(PP_Resource context, GLsizei n, GLuint* buffers) {
351 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
352 Resource::GetAs<PPB_Graphics3D_Impl>(context);
353 graphics_3d->impl()->GenBuffers(n, buffers);
354 }
355
356 void GenerateMipmap(PP_Resource context, GLenum target) {
357 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
358 Resource::GetAs<PPB_Graphics3D_Impl>(context);
359 graphics_3d->impl()->GenerateMipmap(target);
360 }
361
362 void GenFramebuffers(PP_Resource context, GLsizei n, GLuint* framebuffers) {
363 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
364 Resource::GetAs<PPB_Graphics3D_Impl>(context);
365 graphics_3d->impl()->GenFramebuffers(n, framebuffers);
366 }
367
368 void GenRenderbuffers(PP_Resource context, GLsizei n, GLuint* renderbuffers) {
369 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
370 Resource::GetAs<PPB_Graphics3D_Impl>(context);
371 graphics_3d->impl()->GenRenderbuffers(n, renderbuffers);
372 }
373
374 void GenTextures(PP_Resource context, GLsizei n, GLuint* textures) {
375 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
376 Resource::GetAs<PPB_Graphics3D_Impl>(context);
377 graphics_3d->impl()->GenTextures(n, textures);
378 }
379
380 void GetActiveAttrib(
381 PP_Resource context, GLuint program, GLuint index, GLsizei bufsize,
382 GLsizei* length, GLint* size, GLenum* type, char* name) {
383 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
384 Resource::GetAs<PPB_Graphics3D_Impl>(context);
385 graphics_3d->impl()->GetActiveAttrib(
386 program, index, bufsize, length, size, type, name);
387 }
388
389 void GetActiveUniform(
390 PP_Resource context, GLuint program, GLuint index, GLsizei bufsize,
391 GLsizei* length, GLint* size, GLenum* type, char* name) {
392 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
393 Resource::GetAs<PPB_Graphics3D_Impl>(context);
394 graphics_3d->impl()->GetActiveUniform(
395 program, index, bufsize, length, size, type, name);
396 }
397
398 void GetAttachedShaders(
399 PP_Resource context, GLuint program, GLsizei maxcount, GLsizei* count,
400 GLuint* shaders) {
401 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
402 Resource::GetAs<PPB_Graphics3D_Impl>(context);
403 graphics_3d->impl()->GetAttachedShaders(program, maxcount, count, shaders);
404 }
405
406 GLint GetAttribLocation(
407 PP_Resource context, GLuint program, const char* name) {
408 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
409 Resource::GetAs<PPB_Graphics3D_Impl>(context);
410 return graphics_3d->impl()->GetAttribLocation(program, name);
411 }
412
413 void GetBooleanv(PP_Resource context, GLenum pname, GLboolean* params) {
414 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
415 Resource::GetAs<PPB_Graphics3D_Impl>(context);
416 graphics_3d->impl()->GetBooleanv(pname, params);
417 }
418
419 void GetBufferParameteriv(
420 PP_Resource context, GLenum target, GLenum pname, GLint* params) {
421 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
422 Resource::GetAs<PPB_Graphics3D_Impl>(context);
423 graphics_3d->impl()->GetBufferParameteriv(target, pname, params);
424 }
425
426 GLenum GetError(PP_Resource context) {
427 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
428 Resource::GetAs<PPB_Graphics3D_Impl>(context);
429 return graphics_3d->impl()->GetError();
430 }
431
432 void GetFloatv(PP_Resource context, GLenum pname, GLfloat* params) {
433 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
434 Resource::GetAs<PPB_Graphics3D_Impl>(context);
435 graphics_3d->impl()->GetFloatv(pname, params);
436 }
437
438 void GetFramebufferAttachmentParameteriv(
439 PP_Resource context, GLenum target, GLenum attachment, GLenum pname,
440 GLint* params) {
441 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
442 Resource::GetAs<PPB_Graphics3D_Impl>(context);
443 graphics_3d->impl()->GetFramebufferAttachmentParameteriv(
444 target, attachment, pname, params);
445 }
446
447 void GetIntegerv(PP_Resource context, GLenum pname, GLint* params) {
448 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
449 Resource::GetAs<PPB_Graphics3D_Impl>(context);
450 graphics_3d->impl()->GetIntegerv(pname, params);
451 }
452
453 void GetProgramiv(
454 PP_Resource context, GLuint program, GLenum pname, GLint* params) {
455 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
456 Resource::GetAs<PPB_Graphics3D_Impl>(context);
457 graphics_3d->impl()->GetProgramiv(program, pname, params);
458 }
459
460 void GetProgramInfoLog(
461 PP_Resource context, GLuint program, GLsizei bufsize, GLsizei* length,
462 char* infolog) {
463 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
464 Resource::GetAs<PPB_Graphics3D_Impl>(context);
465 graphics_3d->impl()->GetProgramInfoLog(program, bufsize, length, infolog);
466 }
467
468 void GetRenderbufferParameteriv(
469 PP_Resource context, GLenum target, GLenum pname, GLint* params) {
470 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
471 Resource::GetAs<PPB_Graphics3D_Impl>(context);
472 graphics_3d->impl()->GetRenderbufferParameteriv(target, pname, params);
473 }
474
475 void GetShaderiv(
476 PP_Resource context, GLuint shader, GLenum pname, GLint* params) {
477 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
478 Resource::GetAs<PPB_Graphics3D_Impl>(context);
479 graphics_3d->impl()->GetShaderiv(shader, pname, params);
480 }
481
482 void GetShaderInfoLog(
483 PP_Resource context, GLuint shader, GLsizei bufsize, GLsizei* length,
484 char* infolog) {
485 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
486 Resource::GetAs<PPB_Graphics3D_Impl>(context);
487 graphics_3d->impl()->GetShaderInfoLog(shader, bufsize, length, infolog);
488 }
489
490 void GetShaderPrecisionFormat(
491 PP_Resource context, GLenum shadertype, GLenum precisiontype, GLint* range,
492 GLint* precision) {
493 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
494 Resource::GetAs<PPB_Graphics3D_Impl>(context);
495 graphics_3d->impl()->GetShaderPrecisionFormat(
496 shadertype, precisiontype, range, precision);
497 }
498
499 void GetShaderSource(
500 PP_Resource context, GLuint shader, GLsizei bufsize, GLsizei* length,
501 char* source) {
502 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
503 Resource::GetAs<PPB_Graphics3D_Impl>(context);
504 graphics_3d->impl()->GetShaderSource(shader, bufsize, length, source);
505 }
506
507 const GLubyte* GetString(PP_Resource context, GLenum name) {
508 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
509 Resource::GetAs<PPB_Graphics3D_Impl>(context);
510 return graphics_3d->impl()->GetString(name);
511 }
512
513 void GetTexParameterfv(
514 PP_Resource context, GLenum target, GLenum pname, GLfloat* params) {
515 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
516 Resource::GetAs<PPB_Graphics3D_Impl>(context);
517 graphics_3d->impl()->GetTexParameterfv(target, pname, params);
518 }
519
520 void GetTexParameteriv(
521 PP_Resource context, GLenum target, GLenum pname, GLint* params) {
522 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
523 Resource::GetAs<PPB_Graphics3D_Impl>(context);
524 graphics_3d->impl()->GetTexParameteriv(target, pname, params);
525 }
526
527 void GetUniformfv(
528 PP_Resource context, GLuint program, GLint location, GLfloat* params) {
529 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
530 Resource::GetAs<PPB_Graphics3D_Impl>(context);
531 graphics_3d->impl()->GetUniformfv(program, location, params);
532 }
533
534 void GetUniformiv(
535 PP_Resource context, GLuint program, GLint location, GLint* params) {
536 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
537 Resource::GetAs<PPB_Graphics3D_Impl>(context);
538 graphics_3d->impl()->GetUniformiv(program, location, params);
539 }
540
541 GLint GetUniformLocation(
542 PP_Resource context, GLuint program, const char* name) {
543 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
544 Resource::GetAs<PPB_Graphics3D_Impl>(context);
545 return graphics_3d->impl()->GetUniformLocation(program, name);
546 }
547
548 void GetVertexAttribfv(
549 PP_Resource context, GLuint index, GLenum pname, GLfloat* params) {
550 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
551 Resource::GetAs<PPB_Graphics3D_Impl>(context);
552 graphics_3d->impl()->GetVertexAttribfv(index, pname, params);
553 }
554
555 void GetVertexAttribiv(
556 PP_Resource context, GLuint index, GLenum pname, GLint* params) {
557 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
558 Resource::GetAs<PPB_Graphics3D_Impl>(context);
559 graphics_3d->impl()->GetVertexAttribiv(index, pname, params);
560 }
561
562 void GetVertexAttribPointerv(
563 PP_Resource context, GLuint index, GLenum pname, void** pointer) {
564 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
565 Resource::GetAs<PPB_Graphics3D_Impl>(context);
566 graphics_3d->impl()->GetVertexAttribPointerv(index, pname, pointer);
567 }
568
569 void Hint(PP_Resource context, GLenum target, GLenum mode) {
570 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
571 Resource::GetAs<PPB_Graphics3D_Impl>(context);
572 graphics_3d->impl()->Hint(target, mode);
573 }
574
575 GLboolean IsBuffer(PP_Resource context, GLuint buffer) {
576 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
577 Resource::GetAs<PPB_Graphics3D_Impl>(context);
578 return graphics_3d->impl()->IsBuffer(buffer);
579 }
580
581 GLboolean IsEnabled(PP_Resource context, GLenum cap) {
582 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
583 Resource::GetAs<PPB_Graphics3D_Impl>(context);
584 return graphics_3d->impl()->IsEnabled(cap);
585 }
586
587 GLboolean IsFramebuffer(PP_Resource context, GLuint framebuffer) {
588 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
589 Resource::GetAs<PPB_Graphics3D_Impl>(context);
590 return graphics_3d->impl()->IsFramebuffer(framebuffer);
591 }
592
593 GLboolean IsProgram(PP_Resource context, GLuint program) {
594 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
595 Resource::GetAs<PPB_Graphics3D_Impl>(context);
596 return graphics_3d->impl()->IsProgram(program);
597 }
598
599 GLboolean IsRenderbuffer(PP_Resource context, GLuint renderbuffer) {
600 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
601 Resource::GetAs<PPB_Graphics3D_Impl>(context);
602 return graphics_3d->impl()->IsRenderbuffer(renderbuffer);
603 }
604
605 GLboolean IsShader(PP_Resource context, GLuint shader) {
606 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
607 Resource::GetAs<PPB_Graphics3D_Impl>(context);
608 return graphics_3d->impl()->IsShader(shader);
609 }
610
611 GLboolean IsTexture(PP_Resource context, GLuint texture) {
612 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
613 Resource::GetAs<PPB_Graphics3D_Impl>(context);
614 return graphics_3d->impl()->IsTexture(texture);
615 }
616
617 void LineWidth(PP_Resource context, GLfloat width) {
618 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
619 Resource::GetAs<PPB_Graphics3D_Impl>(context);
620 graphics_3d->impl()->LineWidth(width);
621 }
622
623 void LinkProgram(PP_Resource context, GLuint program) {
624 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
625 Resource::GetAs<PPB_Graphics3D_Impl>(context);
626 graphics_3d->impl()->LinkProgram(program);
627 }
628
629 void PixelStorei(PP_Resource context, GLenum pname, GLint param) {
630 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
631 Resource::GetAs<PPB_Graphics3D_Impl>(context);
632 graphics_3d->impl()->PixelStorei(pname, param);
633 }
634
635 void PolygonOffset(PP_Resource context, GLfloat factor, GLfloat units) {
636 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
637 Resource::GetAs<PPB_Graphics3D_Impl>(context);
638 graphics_3d->impl()->PolygonOffset(factor, units);
639 }
640
641 void ReadPixels(
642 PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height,
643 GLenum format, GLenum type, void* pixels) {
644 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
645 Resource::GetAs<PPB_Graphics3D_Impl>(context);
646 graphics_3d->impl()->ReadPixels(x, y, width, height, format, type, pixels);
647 }
648
649 void ReleaseShaderCompiler(PP_Resource context) {
650 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
651 Resource::GetAs<PPB_Graphics3D_Impl>(context);
652 graphics_3d->impl()->ReleaseShaderCompiler();
653 }
654
655 void RenderbufferStorage(
656 PP_Resource context, GLenum target, GLenum internalformat, GLsizei width,
657 GLsizei height) {
658 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
659 Resource::GetAs<PPB_Graphics3D_Impl>(context);
660 graphics_3d->impl()->RenderbufferStorage(
661 target, internalformat, width, height);
662 }
663
664 void SampleCoverage(PP_Resource context, GLclampf value, GLboolean invert) {
665 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
666 Resource::GetAs<PPB_Graphics3D_Impl>(context);
667 graphics_3d->impl()->SampleCoverage(value, invert);
668 }
669
670 void Scissor(
671 PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height) {
672 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
673 Resource::GetAs<PPB_Graphics3D_Impl>(context);
674 graphics_3d->impl()->Scissor(x, y, width, height);
675 }
676
677 void ShaderBinary(
678 PP_Resource context, GLsizei n, const GLuint* shaders, GLenum binaryformat,
679 const void* binary, GLsizei length) {
680 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
681 Resource::GetAs<PPB_Graphics3D_Impl>(context);
682 graphics_3d->impl()->ShaderBinary(n, shaders, binaryformat, binary, length);
683 }
684
685 void ShaderSource(
686 PP_Resource context, GLuint shader, GLsizei count, const char** str,
687 const GLint* length) {
688 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
689 Resource::GetAs<PPB_Graphics3D_Impl>(context);
690 graphics_3d->impl()->ShaderSource(shader, count, str, length);
691 }
692
693 void StencilFunc(PP_Resource context, GLenum func, GLint ref, GLuint mask) {
694 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
695 Resource::GetAs<PPB_Graphics3D_Impl>(context);
696 graphics_3d->impl()->StencilFunc(func, ref, mask);
697 }
698
699 void StencilFuncSeparate(
700 PP_Resource context, GLenum face, GLenum func, GLint ref, GLuint mask) {
701 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
702 Resource::GetAs<PPB_Graphics3D_Impl>(context);
703 graphics_3d->impl()->StencilFuncSeparate(face, func, ref, mask);
704 }
705
706 void StencilMask(PP_Resource context, GLuint mask) {
707 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
708 Resource::GetAs<PPB_Graphics3D_Impl>(context);
709 graphics_3d->impl()->StencilMask(mask);
710 }
711
712 void StencilMaskSeparate(PP_Resource context, GLenum face, GLuint mask) {
713 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
714 Resource::GetAs<PPB_Graphics3D_Impl>(context);
715 graphics_3d->impl()->StencilMaskSeparate(face, mask);
716 }
717
718 void StencilOp(PP_Resource context, GLenum fail, GLenum zfail, GLenum zpass) {
719 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
720 Resource::GetAs<PPB_Graphics3D_Impl>(context);
721 graphics_3d->impl()->StencilOp(fail, zfail, zpass);
722 }
723
724 void StencilOpSeparate(
725 PP_Resource context, GLenum face, GLenum fail, GLenum zfail,
726 GLenum zpass) {
727 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
728 Resource::GetAs<PPB_Graphics3D_Impl>(context);
729 graphics_3d->impl()->StencilOpSeparate(face, fail, zfail, zpass);
730 }
731
732 void TexImage2D(
733 PP_Resource context, GLenum target, GLint level, GLint internalformat,
734 GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type,
735 const void* pixels) {
736 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
737 Resource::GetAs<PPB_Graphics3D_Impl>(context);
738 graphics_3d->impl()->TexImage2D(
739 target, level, internalformat, width, height, border, format, type,
740 pixels);
741 }
742
743 void TexParameterf(
744 PP_Resource context, GLenum target, GLenum pname, GLfloat param) {
745 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
746 Resource::GetAs<PPB_Graphics3D_Impl>(context);
747 graphics_3d->impl()->TexParameterf(target, pname, param);
748 }
749
750 void TexParameterfv(
751 PP_Resource context, GLenum target, GLenum pname, const GLfloat* params) {
752 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
753 Resource::GetAs<PPB_Graphics3D_Impl>(context);
754 graphics_3d->impl()->TexParameterfv(target, pname, params);
755 }
756
757 void TexParameteri(
758 PP_Resource context, GLenum target, GLenum pname, GLint param) {
759 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
760 Resource::GetAs<PPB_Graphics3D_Impl>(context);
761 graphics_3d->impl()->TexParameteri(target, pname, param);
762 }
763
764 void TexParameteriv(
765 PP_Resource context, GLenum target, GLenum pname, const GLint* params) {
766 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
767 Resource::GetAs<PPB_Graphics3D_Impl>(context);
768 graphics_3d->impl()->TexParameteriv(target, pname, params);
769 }
770
771 void TexSubImage2D(
772 PP_Resource context, GLenum target, GLint level, GLint xoffset,
773 GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type,
774 const void* pixels) {
775 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
776 Resource::GetAs<PPB_Graphics3D_Impl>(context);
777 graphics_3d->impl()->TexSubImage2D(
778 target, level, xoffset, yoffset, width, height, format, type, pixels);
779 }
780
781 void Uniform1f(PP_Resource context, GLint location, GLfloat x) {
782 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
783 Resource::GetAs<PPB_Graphics3D_Impl>(context);
784 graphics_3d->impl()->Uniform1f(location, x);
785 }
786
787 void Uniform1fv(
788 PP_Resource context, GLint location, GLsizei count, const GLfloat* v) {
789 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
790 Resource::GetAs<PPB_Graphics3D_Impl>(context);
791 graphics_3d->impl()->Uniform1fv(location, count, v);
792 }
793
794 void Uniform1i(PP_Resource context, GLint location, GLint x) {
795 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
796 Resource::GetAs<PPB_Graphics3D_Impl>(context);
797 graphics_3d->impl()->Uniform1i(location, x);
798 }
799
800 void Uniform1iv(
801 PP_Resource context, GLint location, GLsizei count, const GLint* v) {
802 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
803 Resource::GetAs<PPB_Graphics3D_Impl>(context);
804 graphics_3d->impl()->Uniform1iv(location, count, v);
805 }
806
807 void Uniform2f(PP_Resource context, GLint location, GLfloat x, GLfloat y) {
808 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
809 Resource::GetAs<PPB_Graphics3D_Impl>(context);
810 graphics_3d->impl()->Uniform2f(location, x, y);
811 }
812
813 void Uniform2fv(
814 PP_Resource context, GLint location, GLsizei count, const GLfloat* v) {
815 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
816 Resource::GetAs<PPB_Graphics3D_Impl>(context);
817 graphics_3d->impl()->Uniform2fv(location, count, v);
818 }
819
820 void Uniform2i(PP_Resource context, GLint location, GLint x, GLint y) {
821 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
822 Resource::GetAs<PPB_Graphics3D_Impl>(context);
823 graphics_3d->impl()->Uniform2i(location, x, y);
824 }
825
826 void Uniform2iv(
827 PP_Resource context, GLint location, GLsizei count, const GLint* v) {
828 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
829 Resource::GetAs<PPB_Graphics3D_Impl>(context);
830 graphics_3d->impl()->Uniform2iv(location, count, v);
831 }
832
833 void Uniform3f(
834 PP_Resource context, GLint location, GLfloat x, GLfloat y, GLfloat z) {
835 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
836 Resource::GetAs<PPB_Graphics3D_Impl>(context);
837 graphics_3d->impl()->Uniform3f(location, x, y, z);
838 }
839
840 void Uniform3fv(
841 PP_Resource context, GLint location, GLsizei count, const GLfloat* v) {
842 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
843 Resource::GetAs<PPB_Graphics3D_Impl>(context);
844 graphics_3d->impl()->Uniform3fv(location, count, v);
845 }
846
847 void Uniform3i(
848 PP_Resource context, GLint location, GLint x, GLint y, GLint z) {
849 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
850 Resource::GetAs<PPB_Graphics3D_Impl>(context);
851 graphics_3d->impl()->Uniform3i(location, x, y, z);
852 }
853
854 void Uniform3iv(
855 PP_Resource context, GLint location, GLsizei count, const GLint* v) {
856 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
857 Resource::GetAs<PPB_Graphics3D_Impl>(context);
858 graphics_3d->impl()->Uniform3iv(location, count, v);
859 }
860
861 void Uniform4f(
862 PP_Resource context, GLint location, GLfloat x, GLfloat y, GLfloat z,
863 GLfloat w) {
864 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
865 Resource::GetAs<PPB_Graphics3D_Impl>(context);
866 graphics_3d->impl()->Uniform4f(location, x, y, z, w);
867 }
868
869 void Uniform4fv(
870 PP_Resource context, GLint location, GLsizei count, const GLfloat* v) {
871 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
872 Resource::GetAs<PPB_Graphics3D_Impl>(context);
873 graphics_3d->impl()->Uniform4fv(location, count, v);
874 }
875
876 void Uniform4i(
877 PP_Resource context, GLint location, GLint x, GLint y, GLint z, GLint w) {
878 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
879 Resource::GetAs<PPB_Graphics3D_Impl>(context);
880 graphics_3d->impl()->Uniform4i(location, x, y, z, w);
881 }
882
883 void Uniform4iv(
884 PP_Resource context, GLint location, GLsizei count, const GLint* v) {
885 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
886 Resource::GetAs<PPB_Graphics3D_Impl>(context);
887 graphics_3d->impl()->Uniform4iv(location, count, v);
888 }
889
890 void UniformMatrix2fv(
891 PP_Resource context, GLint location, GLsizei count, GLboolean transpose,
892 const GLfloat* value) {
893 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
894 Resource::GetAs<PPB_Graphics3D_Impl>(context);
895 graphics_3d->impl()->UniformMatrix2fv(location, count, transpose, value);
896 }
897
898 void UniformMatrix3fv(
899 PP_Resource context, GLint location, GLsizei count, GLboolean transpose,
900 const GLfloat* value) {
901 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
902 Resource::GetAs<PPB_Graphics3D_Impl>(context);
903 graphics_3d->impl()->UniformMatrix3fv(location, count, transpose, value);
904 }
905
906 void UniformMatrix4fv(
907 PP_Resource context, GLint location, GLsizei count, GLboolean transpose,
908 const GLfloat* value) {
909 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
910 Resource::GetAs<PPB_Graphics3D_Impl>(context);
911 graphics_3d->impl()->UniformMatrix4fv(location, count, transpose, value);
912 }
913
914 void UseProgram(PP_Resource context, GLuint program) {
915 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
916 Resource::GetAs<PPB_Graphics3D_Impl>(context);
917 graphics_3d->impl()->UseProgram(program);
918 }
919
920 void ValidateProgram(PP_Resource context, GLuint program) {
921 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
922 Resource::GetAs<PPB_Graphics3D_Impl>(context);
923 graphics_3d->impl()->ValidateProgram(program);
924 }
925
926 void VertexAttrib1f(PP_Resource context, GLuint indx, GLfloat x) {
927 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
928 Resource::GetAs<PPB_Graphics3D_Impl>(context);
929 graphics_3d->impl()->VertexAttrib1f(indx, x);
930 }
931
932 void VertexAttrib1fv(PP_Resource context, GLuint indx, const GLfloat* values) {
933 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
934 Resource::GetAs<PPB_Graphics3D_Impl>(context);
935 graphics_3d->impl()->VertexAttrib1fv(indx, values);
936 }
937
938 void VertexAttrib2f(PP_Resource context, GLuint indx, GLfloat x, GLfloat y) {
939 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
940 Resource::GetAs<PPB_Graphics3D_Impl>(context);
941 graphics_3d->impl()->VertexAttrib2f(indx, x, y);
942 }
943
944 void VertexAttrib2fv(PP_Resource context, GLuint indx, const GLfloat* values) {
945 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
946 Resource::GetAs<PPB_Graphics3D_Impl>(context);
947 graphics_3d->impl()->VertexAttrib2fv(indx, values);
948 }
949
950 void VertexAttrib3f(
951 PP_Resource context, GLuint indx, GLfloat x, GLfloat y, GLfloat z) {
952 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
953 Resource::GetAs<PPB_Graphics3D_Impl>(context);
954 graphics_3d->impl()->VertexAttrib3f(indx, x, y, z);
955 }
956
957 void VertexAttrib3fv(PP_Resource context, GLuint indx, const GLfloat* values) {
958 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
959 Resource::GetAs<PPB_Graphics3D_Impl>(context);
960 graphics_3d->impl()->VertexAttrib3fv(indx, values);
961 }
962
963 void VertexAttrib4f(
964 PP_Resource context, GLuint indx, GLfloat x, GLfloat y, GLfloat z,
965 GLfloat w) {
966 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
967 Resource::GetAs<PPB_Graphics3D_Impl>(context);
968 graphics_3d->impl()->VertexAttrib4f(indx, x, y, z, w);
969 }
970
971 void VertexAttrib4fv(PP_Resource context, GLuint indx, const GLfloat* values) {
972 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
973 Resource::GetAs<PPB_Graphics3D_Impl>(context);
974 graphics_3d->impl()->VertexAttrib4fv(indx, values);
975 }
976
977 void VertexAttribPointer(
978 PP_Resource context, GLuint indx, GLint size, GLenum type,
979 GLboolean normalized, GLsizei stride, const void* ptr) {
980 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
981 Resource::GetAs<PPB_Graphics3D_Impl>(context);
982 graphics_3d->impl()->VertexAttribPointer(
983 indx, size, type, normalized, stride, ptr);
984 }
985
986 void Viewport(
987 PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height) {
988 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
989 Resource::GetAs<PPB_Graphics3D_Impl>(context);
990 graphics_3d->impl()->Viewport(x, y, width, height);
991 }
992
993
994 const struct PPB_OpenGLES2_Dev ppb_opengles2 = {
995 &ActiveTexture,
996 &AttachShader,
997 &BindAttribLocation,
998 &BindBuffer,
999 &BindFramebuffer,
1000 &BindRenderbuffer,
1001 &BindTexture,
1002 &BlendColor,
1003 &BlendEquation,
1004 &BlendEquationSeparate,
1005 &BlendFunc,
1006 &BlendFuncSeparate,
1007 &BufferData,
1008 &BufferSubData,
1009 &CheckFramebufferStatus,
1010 &Clear,
1011 &ClearColor,
1012 &ClearDepthf,
1013 &ClearStencil,
1014 &ColorMask,
1015 &CompileShader,
1016 &CompressedTexImage2D,
1017 &CompressedTexSubImage2D,
1018 &CopyTexImage2D,
1019 &CopyTexSubImage2D,
1020 &CreateProgram,
1021 &CreateShader,
1022 &CullFace,
1023 &DeleteBuffers,
1024 &DeleteFramebuffers,
1025 &DeleteProgram,
1026 &DeleteRenderbuffers,
1027 &DeleteShader,
1028 &DeleteTextures,
1029 &DepthFunc,
1030 &DepthMask,
1031 &DepthRangef,
1032 &DetachShader,
1033 &Disable,
1034 &DisableVertexAttribArray,
1035 &DrawArrays,
1036 &DrawElements,
1037 &Enable,
1038 &EnableVertexAttribArray,
1039 &Finish,
1040 &Flush,
1041 &FramebufferRenderbuffer,
1042 &FramebufferTexture2D,
1043 &FrontFace,
1044 &GenBuffers,
1045 &GenerateMipmap,
1046 &GenFramebuffers,
1047 &GenRenderbuffers,
1048 &GenTextures,
1049 &GetActiveAttrib,
1050 &GetActiveUniform,
1051 &GetAttachedShaders,
1052 &GetAttribLocation,
1053 &GetBooleanv,
1054 &GetBufferParameteriv,
1055 &GetError,
1056 &GetFloatv,
1057 &GetFramebufferAttachmentParameteriv,
1058 &GetIntegerv,
1059 &GetProgramiv,
1060 &GetProgramInfoLog,
1061 &GetRenderbufferParameteriv,
1062 &GetShaderiv,
1063 &GetShaderInfoLog,
1064 &GetShaderPrecisionFormat,
1065 &GetShaderSource,
1066 &GetString,
1067 &GetTexParameterfv,
1068 &GetTexParameteriv,
1069 &GetUniformfv,
1070 &GetUniformiv,
1071 &GetUniformLocation,
1072 &GetVertexAttribfv,
1073 &GetVertexAttribiv,
1074 &GetVertexAttribPointerv,
1075 &Hint,
1076 &IsBuffer,
1077 &IsEnabled,
1078 &IsFramebuffer,
1079 &IsProgram,
1080 &IsRenderbuffer,
1081 &IsShader,
1082 &IsTexture,
1083 &LineWidth,
1084 &LinkProgram,
1085 &PixelStorei,
1086 &PolygonOffset,
1087 &ReadPixels,
1088 &ReleaseShaderCompiler,
1089 &RenderbufferStorage,
1090 &SampleCoverage,
1091 &Scissor,
1092 &ShaderBinary,
1093 &ShaderSource,
1094 &StencilFunc,
1095 &StencilFuncSeparate,
1096 &StencilMask,
1097 &StencilMaskSeparate,
1098 &StencilOp,
1099 &StencilOpSeparate,
1100 &TexImage2D,
1101 &TexParameterf,
1102 &TexParameterfv,
1103 &TexParameteri,
1104 &TexParameteriv,
1105 &TexSubImage2D,
1106 &Uniform1f,
1107 &Uniform1fv,
1108 &Uniform1i,
1109 &Uniform1iv,
1110 &Uniform2f,
1111 &Uniform2fv,
1112 &Uniform2i,
1113 &Uniform2iv,
1114 &Uniform3f,
1115 &Uniform3fv,
1116 &Uniform3i,
1117 &Uniform3iv,
1118 &Uniform4f,
1119 &Uniform4fv,
1120 &Uniform4i,
1121 &Uniform4iv,
1122 &UniformMatrix2fv,
1123 &UniformMatrix3fv,
1124 &UniformMatrix4fv,
1125 &UseProgram,
1126 &ValidateProgram,
1127 &VertexAttrib1f,
1128 &VertexAttrib1fv,
1129 &VertexAttrib2f,
1130 &VertexAttrib2fv,
1131 &VertexAttrib3f,
1132 &VertexAttrib3fv,
1133 &VertexAttrib4f,
1134 &VertexAttrib4fv,
1135 &VertexAttribPointer,
1136 &Viewport
1137 };
1138
1139 } // namespace
1140
1141 const PPB_OpenGLES2_Dev* PPB_Graphics3D_Impl::GetOpenGLES2Interface() {
1142 return &ppb_opengles2;
1143 }
1144
1145 } // namespace ppapi
1146 } // namespace webkit
1147
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppb_open_gl_es_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698