OLD | NEW |
| (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/glue/plugins/pepper_graphics_3d.h" | |
8 | |
9 #include "gpu/command_buffer/client/gles2_implementation.h" | |
10 #include "ppapi/c/dev/ppb_opengles_dev.h" | |
11 | |
12 namespace pepper { | |
13 | |
14 namespace { | |
15 | |
16 void ActiveTexture(GLenum texture) { | |
17 Graphics3D::GetCurrent()->impl()->ActiveTexture(texture); | |
18 } | |
19 void AttachShader(GLuint program, GLuint shader) { | |
20 Graphics3D::GetCurrent()->impl()->AttachShader(program, shader); | |
21 } | |
22 void BindAttribLocation(GLuint program, GLuint index, const char* name) { | |
23 Graphics3D::GetCurrent()->impl()->BindAttribLocation(program, index, name); | |
24 } | |
25 void BindBuffer(GLenum target, GLuint buffer) { | |
26 Graphics3D::GetCurrent()->impl()->BindBuffer(target, buffer); | |
27 } | |
28 void BindFramebuffer(GLenum target, GLuint framebuffer) { | |
29 Graphics3D::GetCurrent()->impl()->BindFramebuffer(target, framebuffer); | |
30 } | |
31 void BindRenderbuffer(GLenum target, GLuint renderbuffer) { | |
32 Graphics3D::GetCurrent()->impl()->BindRenderbuffer(target, renderbuffer); | |
33 } | |
34 void BindTexture(GLenum target, GLuint texture) { | |
35 Graphics3D::GetCurrent()->impl()->BindTexture(target, texture); | |
36 } | |
37 void BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { | |
38 Graphics3D::GetCurrent()->impl()->BlendColor(red, green, blue, alpha); | |
39 } | |
40 void BlendEquation(GLenum mode) { | |
41 Graphics3D::GetCurrent()->impl()->BlendEquation(mode); | |
42 } | |
43 void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) { | |
44 Graphics3D::GetCurrent()->impl()->BlendEquationSeparate(modeRGB, modeAlpha); | |
45 } | |
46 void BlendFunc(GLenum sfactor, GLenum dfactor) { | |
47 Graphics3D::GetCurrent()->impl()->BlendFunc(sfactor, dfactor); | |
48 } | |
49 void BlendFuncSeparate( | |
50 GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { | |
51 Graphics3D::GetCurrent()->impl()->BlendFuncSeparate( | |
52 srcRGB, dstRGB, srcAlpha, dstAlpha); | |
53 } | |
54 void BufferData( | |
55 GLenum target, GLsizeiptr size, const void* data, GLenum usage) { | |
56 Graphics3D::GetCurrent()->impl()->BufferData(target, size, data, usage); | |
57 } | |
58 void BufferSubData( | |
59 GLenum target, GLintptr offset, GLsizeiptr size, const void* data) { | |
60 Graphics3D::GetCurrent()->impl()->BufferSubData(target, offset, size, data); | |
61 } | |
62 GLenum CheckFramebufferStatus(GLenum target) { | |
63 return Graphics3D::GetCurrent()->impl()->CheckFramebufferStatus(target); | |
64 } | |
65 void Clear(GLbitfield mask) { | |
66 Graphics3D::GetCurrent()->impl()->Clear(mask); | |
67 } | |
68 void ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { | |
69 Graphics3D::GetCurrent()->impl()->ClearColor(red, green, blue, alpha); | |
70 } | |
71 void ClearDepthf(GLclampf depth) { | |
72 Graphics3D::GetCurrent()->impl()->ClearDepthf(depth); | |
73 } | |
74 void ClearStencil(GLint s) { | |
75 Graphics3D::GetCurrent()->impl()->ClearStencil(s); | |
76 } | |
77 void ColorMask( | |
78 GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { | |
79 Graphics3D::GetCurrent()->impl()->ColorMask(red, green, blue, alpha); | |
80 } | |
81 void CompileShader(GLuint shader) { | |
82 Graphics3D::GetCurrent()->impl()->CompileShader(shader); | |
83 } | |
84 void CompressedTexImage2D( | |
85 GLenum target, GLint level, GLenum internalformat, GLsizei width, | |
86 GLsizei height, GLint border, GLsizei imageSize, const void* data) { | |
87 Graphics3D::GetCurrent()->impl()->CompressedTexImage2D( | |
88 target, level, internalformat, width, height, border, imageSize, data); | |
89 } | |
90 void CompressedTexSubImage2D( | |
91 GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, | |
92 GLsizei height, GLenum format, GLsizei imageSize, const void* data) { | |
93 Graphics3D::GetCurrent()->impl()->CompressedTexSubImage2D( | |
94 target, level, xoffset, yoffset, width, height, format, imageSize, data); | |
95 } | |
96 void CopyTexImage2D( | |
97 GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, | |
98 GLsizei width, GLsizei height, GLint border) { | |
99 Graphics3D::GetCurrent()->impl()->CopyTexImage2D( | |
100 target, level, internalformat, x, y, width, height, border); | |
101 } | |
102 void CopyTexSubImage2D( | |
103 GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, | |
104 GLsizei width, GLsizei height) { | |
105 Graphics3D::GetCurrent()->impl()->CopyTexSubImage2D( | |
106 target, level, xoffset, yoffset, x, y, width, height); | |
107 } | |
108 GLuint CreateProgram() { | |
109 return Graphics3D::GetCurrent()->impl()->CreateProgram(); | |
110 } | |
111 GLuint CreateShader(GLenum type) { | |
112 return Graphics3D::GetCurrent()->impl()->CreateShader(type); | |
113 } | |
114 void CullFace(GLenum mode) { | |
115 Graphics3D::GetCurrent()->impl()->CullFace(mode); | |
116 } | |
117 void DeleteBuffers(GLsizei n, const GLuint* buffers) { | |
118 Graphics3D::GetCurrent()->impl()->DeleteBuffers(n, buffers); | |
119 } | |
120 void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) { | |
121 Graphics3D::GetCurrent()->impl()->DeleteFramebuffers(n, framebuffers); | |
122 } | |
123 void DeleteProgram(GLuint program) { | |
124 Graphics3D::GetCurrent()->impl()->DeleteProgram(program); | |
125 } | |
126 void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) { | |
127 Graphics3D::GetCurrent()->impl()->DeleteRenderbuffers(n, renderbuffers); | |
128 } | |
129 void DeleteShader(GLuint shader) { | |
130 Graphics3D::GetCurrent()->impl()->DeleteShader(shader); | |
131 } | |
132 void DeleteTextures(GLsizei n, const GLuint* textures) { | |
133 Graphics3D::GetCurrent()->impl()->DeleteTextures(n, textures); | |
134 } | |
135 void DepthFunc(GLenum func) { | |
136 Graphics3D::GetCurrent()->impl()->DepthFunc(func); | |
137 } | |
138 void DepthMask(GLboolean flag) { | |
139 Graphics3D::GetCurrent()->impl()->DepthMask(flag); | |
140 } | |
141 void DepthRangef(GLclampf zNear, GLclampf zFar) { | |
142 Graphics3D::GetCurrent()->impl()->DepthRangef(zNear, zFar); | |
143 } | |
144 void DetachShader(GLuint program, GLuint shader) { | |
145 Graphics3D::GetCurrent()->impl()->DetachShader(program, shader); | |
146 } | |
147 void Disable(GLenum cap) { | |
148 Graphics3D::GetCurrent()->impl()->Disable(cap); | |
149 } | |
150 void DisableVertexAttribArray(GLuint index) { | |
151 Graphics3D::GetCurrent()->impl()->DisableVertexAttribArray(index); | |
152 } | |
153 void DrawArrays(GLenum mode, GLint first, GLsizei count) { | |
154 Graphics3D::GetCurrent()->impl()->DrawArrays(mode, first, count); | |
155 } | |
156 void DrawElements( | |
157 GLenum mode, GLsizei count, GLenum type, const void* indices) { | |
158 Graphics3D::GetCurrent()->impl()->DrawElements(mode, count, type, indices); | |
159 } | |
160 void Enable(GLenum cap) { | |
161 Graphics3D::GetCurrent()->impl()->Enable(cap); | |
162 } | |
163 void EnableVertexAttribArray(GLuint index) { | |
164 Graphics3D::GetCurrent()->impl()->EnableVertexAttribArray(index); | |
165 } | |
166 void Finish() { | |
167 Graphics3D::GetCurrent()->impl()->Finish(); | |
168 } | |
169 void Flush() { | |
170 Graphics3D::GetCurrent()->impl()->Flush(); | |
171 } | |
172 void FramebufferRenderbuffer( | |
173 GLenum target, GLenum attachment, GLenum renderbuffertarget, | |
174 GLuint renderbuffer) { | |
175 Graphics3D::GetCurrent()->impl()->FramebufferRenderbuffer( | |
176 target, attachment, renderbuffertarget, renderbuffer); | |
177 } | |
178 void FramebufferTexture2D( | |
179 GLenum target, GLenum attachment, GLenum textarget, GLuint texture, | |
180 GLint level) { | |
181 Graphics3D::GetCurrent()->impl()->FramebufferTexture2D( | |
182 target, attachment, textarget, texture, level); | |
183 } | |
184 void FrontFace(GLenum mode) { | |
185 Graphics3D::GetCurrent()->impl()->FrontFace(mode); | |
186 } | |
187 void GenBuffers(GLsizei n, GLuint* buffers) { | |
188 Graphics3D::GetCurrent()->impl()->GenBuffers(n, buffers); | |
189 } | |
190 void GenerateMipmap(GLenum target) { | |
191 Graphics3D::GetCurrent()->impl()->GenerateMipmap(target); | |
192 } | |
193 void GenFramebuffers(GLsizei n, GLuint* framebuffers) { | |
194 Graphics3D::GetCurrent()->impl()->GenFramebuffers(n, framebuffers); | |
195 } | |
196 void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) { | |
197 Graphics3D::GetCurrent()->impl()->GenRenderbuffers(n, renderbuffers); | |
198 } | |
199 void GenTextures(GLsizei n, GLuint* textures) { | |
200 Graphics3D::GetCurrent()->impl()->GenTextures(n, textures); | |
201 } | |
202 void GetActiveAttrib( | |
203 GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, | |
204 GLenum* type, char* name) { | |
205 Graphics3D::GetCurrent()->impl()->GetActiveAttrib( | |
206 program, index, bufsize, length, size, type, name); | |
207 } | |
208 void GetActiveUniform( | |
209 GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, | |
210 GLenum* type, char* name) { | |
211 Graphics3D::GetCurrent()->impl()->GetActiveUniform( | |
212 program, index, bufsize, length, size, type, name); | |
213 } | |
214 void GetAttachedShaders( | |
215 GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) { | |
216 Graphics3D::GetCurrent()->impl()->GetAttachedShaders( | |
217 program, maxcount, count, shaders); | |
218 } | |
219 GLint GetAttribLocation(GLuint program, const char* name) { | |
220 return Graphics3D::GetCurrent()->impl()->GetAttribLocation(program, name); | |
221 } | |
222 void GetBooleanv(GLenum pname, GLboolean* params) { | |
223 Graphics3D::GetCurrent()->impl()->GetBooleanv(pname, params); | |
224 } | |
225 void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params) { | |
226 Graphics3D::GetCurrent()->impl()->GetBufferParameteriv( | |
227 target, pname, params); | |
228 } | |
229 GLenum GetError() { | |
230 return Graphics3D::GetCurrent()->impl()->GetError(); | |
231 } | |
232 void GetFloatv(GLenum pname, GLfloat* params) { | |
233 Graphics3D::GetCurrent()->impl()->GetFloatv(pname, params); | |
234 } | |
235 void GetFramebufferAttachmentParameteriv( | |
236 GLenum target, GLenum attachment, GLenum pname, GLint* params) { | |
237 Graphics3D::GetCurrent()->impl()->GetFramebufferAttachmentParameteriv( | |
238 target, attachment, pname, params); | |
239 } | |
240 void GetIntegerv(GLenum pname, GLint* params) { | |
241 Graphics3D::GetCurrent()->impl()->GetIntegerv(pname, params); | |
242 } | |
243 void GetProgramiv(GLuint program, GLenum pname, GLint* params) { | |
244 Graphics3D::GetCurrent()->impl()->GetProgramiv(program, pname, params); | |
245 } | |
246 void GetProgramInfoLog( | |
247 GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) { | |
248 Graphics3D::GetCurrent()->impl()->GetProgramInfoLog( | |
249 program, bufsize, length, infolog); | |
250 } | |
251 void GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) { | |
252 Graphics3D::GetCurrent()->impl()->GetRenderbufferParameteriv( | |
253 target, pname, params); | |
254 } | |
255 void GetShaderiv(GLuint shader, GLenum pname, GLint* params) { | |
256 Graphics3D::GetCurrent()->impl()->GetShaderiv(shader, pname, params); | |
257 } | |
258 void GetShaderInfoLog( | |
259 GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) { | |
260 Graphics3D::GetCurrent()->impl()->GetShaderInfoLog( | |
261 shader, bufsize, length, infolog); | |
262 } | |
263 void GetShaderPrecisionFormat( | |
264 GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) { | |
265 Graphics3D::GetCurrent()->impl()->GetShaderPrecisionFormat( | |
266 shadertype, precisiontype, range, precision); | |
267 } | |
268 void GetShaderSource( | |
269 GLuint shader, GLsizei bufsize, GLsizei* length, char* source) { | |
270 Graphics3D::GetCurrent()->impl()->GetShaderSource( | |
271 shader, bufsize, length, source); | |
272 } | |
273 const GLubyte* GetString(GLenum name) { | |
274 return Graphics3D::GetCurrent()->impl()->GetString(name); | |
275 } | |
276 void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) { | |
277 Graphics3D::GetCurrent()->impl()->GetTexParameterfv(target, pname, params); | |
278 } | |
279 void GetTexParameteriv(GLenum target, GLenum pname, GLint* params) { | |
280 Graphics3D::GetCurrent()->impl()->GetTexParameteriv(target, pname, params); | |
281 } | |
282 void GetUniformfv(GLuint program, GLint location, GLfloat* params) { | |
283 Graphics3D::GetCurrent()->impl()->GetUniformfv(program, location, params); | |
284 } | |
285 void GetUniformiv(GLuint program, GLint location, GLint* params) { | |
286 Graphics3D::GetCurrent()->impl()->GetUniformiv(program, location, params); | |
287 } | |
288 GLint GetUniformLocation(GLuint program, const char* name) { | |
289 return Graphics3D::GetCurrent()->impl()->GetUniformLocation(program, name); | |
290 } | |
291 void GetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) { | |
292 Graphics3D::GetCurrent()->impl()->GetVertexAttribfv(index, pname, params); | |
293 } | |
294 void GetVertexAttribiv(GLuint index, GLenum pname, GLint* params) { | |
295 Graphics3D::GetCurrent()->impl()->GetVertexAttribiv(index, pname, params); | |
296 } | |
297 void GetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer) { | |
298 Graphics3D::GetCurrent()->impl()->GetVertexAttribPointerv( | |
299 index, pname, pointer); | |
300 } | |
301 void Hint(GLenum target, GLenum mode) { | |
302 Graphics3D::GetCurrent()->impl()->Hint(target, mode); | |
303 } | |
304 GLboolean IsBuffer(GLuint buffer) { | |
305 return Graphics3D::GetCurrent()->impl()->IsBuffer(buffer); | |
306 } | |
307 GLboolean IsEnabled(GLenum cap) { | |
308 return Graphics3D::GetCurrent()->impl()->IsEnabled(cap); | |
309 } | |
310 GLboolean IsFramebuffer(GLuint framebuffer) { | |
311 return Graphics3D::GetCurrent()->impl()->IsFramebuffer(framebuffer); | |
312 } | |
313 GLboolean IsProgram(GLuint program) { | |
314 return Graphics3D::GetCurrent()->impl()->IsProgram(program); | |
315 } | |
316 GLboolean IsRenderbuffer(GLuint renderbuffer) { | |
317 return Graphics3D::GetCurrent()->impl()->IsRenderbuffer(renderbuffer); | |
318 } | |
319 GLboolean IsShader(GLuint shader) { | |
320 return Graphics3D::GetCurrent()->impl()->IsShader(shader); | |
321 } | |
322 GLboolean IsTexture(GLuint texture) { | |
323 return Graphics3D::GetCurrent()->impl()->IsTexture(texture); | |
324 } | |
325 void LineWidth(GLfloat width) { | |
326 Graphics3D::GetCurrent()->impl()->LineWidth(width); | |
327 } | |
328 void LinkProgram(GLuint program) { | |
329 Graphics3D::GetCurrent()->impl()->LinkProgram(program); | |
330 } | |
331 void PixelStorei(GLenum pname, GLint param) { | |
332 Graphics3D::GetCurrent()->impl()->PixelStorei(pname, param); | |
333 } | |
334 void PolygonOffset(GLfloat factor, GLfloat units) { | |
335 Graphics3D::GetCurrent()->impl()->PolygonOffset(factor, units); | |
336 } | |
337 void ReadPixels( | |
338 GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, | |
339 void* pixels) { | |
340 Graphics3D::GetCurrent()->impl()->ReadPixels( | |
341 x, y, width, height, format, type, pixels); | |
342 } | |
343 void ReleaseShaderCompiler() { | |
344 Graphics3D::GetCurrent()->impl()->ReleaseShaderCompiler(); | |
345 } | |
346 void RenderbufferStorage( | |
347 GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { | |
348 Graphics3D::GetCurrent()->impl()->RenderbufferStorage( | |
349 target, internalformat, width, height); | |
350 } | |
351 void SampleCoverage(GLclampf value, GLboolean invert) { | |
352 Graphics3D::GetCurrent()->impl()->SampleCoverage(value, invert); | |
353 } | |
354 void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) { | |
355 Graphics3D::GetCurrent()->impl()->Scissor(x, y, width, height); | |
356 } | |
357 void ShaderBinary( | |
358 GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, | |
359 GLsizei length) { | |
360 Graphics3D::GetCurrent()->impl()->ShaderBinary( | |
361 n, shaders, binaryformat, binary, length); | |
362 } | |
363 void ShaderSource( | |
364 GLuint shader, GLsizei count, const char** str, const GLint* length) { | |
365 Graphics3D::GetCurrent()->impl()->ShaderSource(shader, count, str, length); | |
366 } | |
367 void StencilFunc(GLenum func, GLint ref, GLuint mask) { | |
368 Graphics3D::GetCurrent()->impl()->StencilFunc(func, ref, mask); | |
369 } | |
370 void StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) { | |
371 Graphics3D::GetCurrent()->impl()->StencilFuncSeparate(face, func, ref, mask); | |
372 } | |
373 void StencilMask(GLuint mask) { | |
374 Graphics3D::GetCurrent()->impl()->StencilMask(mask); | |
375 } | |
376 void StencilMaskSeparate(GLenum face, GLuint mask) { | |
377 Graphics3D::GetCurrent()->impl()->StencilMaskSeparate(face, mask); | |
378 } | |
379 void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) { | |
380 Graphics3D::GetCurrent()->impl()->StencilOp(fail, zfail, zpass); | |
381 } | |
382 void StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) { | |
383 Graphics3D::GetCurrent()->impl()->StencilOpSeparate( | |
384 face, fail, zfail, zpass); | |
385 } | |
386 void TexImage2D( | |
387 GLenum target, GLint level, GLint internalformat, GLsizei width, | |
388 GLsizei height, GLint border, GLenum format, GLenum type, | |
389 const void* pixels) { | |
390 Graphics3D::GetCurrent()->impl()->TexImage2D( | |
391 target, level, internalformat, width, height, border, format, type, | |
392 pixels); | |
393 } | |
394 void TexParameterf(GLenum target, GLenum pname, GLfloat param) { | |
395 Graphics3D::GetCurrent()->impl()->TexParameterf(target, pname, param); | |
396 } | |
397 void TexParameterfv(GLenum target, GLenum pname, const GLfloat* params) { | |
398 Graphics3D::GetCurrent()->impl()->TexParameterfv(target, pname, params); | |
399 } | |
400 void TexParameteri(GLenum target, GLenum pname, GLint param) { | |
401 Graphics3D::GetCurrent()->impl()->TexParameteri(target, pname, param); | |
402 } | |
403 void TexParameteriv(GLenum target, GLenum pname, const GLint* params) { | |
404 Graphics3D::GetCurrent()->impl()->TexParameteriv(target, pname, params); | |
405 } | |
406 void TexSubImage2D( | |
407 GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, | |
408 GLsizei height, GLenum format, GLenum type, const void* pixels) { | |
409 Graphics3D::GetCurrent()->impl()->TexSubImage2D( | |
410 target, level, xoffset, yoffset, width, height, format, type, pixels); | |
411 } | |
412 void Uniform1f(GLint location, GLfloat x) { | |
413 Graphics3D::GetCurrent()->impl()->Uniform1f(location, x); | |
414 } | |
415 void Uniform1fv(GLint location, GLsizei count, const GLfloat* v) { | |
416 Graphics3D::GetCurrent()->impl()->Uniform1fv(location, count, v); | |
417 } | |
418 void Uniform1i(GLint location, GLint x) { | |
419 Graphics3D::GetCurrent()->impl()->Uniform1i(location, x); | |
420 } | |
421 void Uniform1iv(GLint location, GLsizei count, const GLint* v) { | |
422 Graphics3D::GetCurrent()->impl()->Uniform1iv(location, count, v); | |
423 } | |
424 void Uniform2f(GLint location, GLfloat x, GLfloat y) { | |
425 Graphics3D::GetCurrent()->impl()->Uniform2f(location, x, y); | |
426 } | |
427 void Uniform2fv(GLint location, GLsizei count, const GLfloat* v) { | |
428 Graphics3D::GetCurrent()->impl()->Uniform2fv(location, count, v); | |
429 } | |
430 void Uniform2i(GLint location, GLint x, GLint y) { | |
431 Graphics3D::GetCurrent()->impl()->Uniform2i(location, x, y); | |
432 } | |
433 void Uniform2iv(GLint location, GLsizei count, const GLint* v) { | |
434 Graphics3D::GetCurrent()->impl()->Uniform2iv(location, count, v); | |
435 } | |
436 void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) { | |
437 Graphics3D::GetCurrent()->impl()->Uniform3f(location, x, y, z); | |
438 } | |
439 void Uniform3fv(GLint location, GLsizei count, const GLfloat* v) { | |
440 Graphics3D::GetCurrent()->impl()->Uniform3fv(location, count, v); | |
441 } | |
442 void Uniform3i(GLint location, GLint x, GLint y, GLint z) { | |
443 Graphics3D::GetCurrent()->impl()->Uniform3i(location, x, y, z); | |
444 } | |
445 void Uniform3iv(GLint location, GLsizei count, const GLint* v) { | |
446 Graphics3D::GetCurrent()->impl()->Uniform3iv(location, count, v); | |
447 } | |
448 void Uniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { | |
449 Graphics3D::GetCurrent()->impl()->Uniform4f(location, x, y, z, w); | |
450 } | |
451 void Uniform4fv(GLint location, GLsizei count, const GLfloat* v) { | |
452 Graphics3D::GetCurrent()->impl()->Uniform4fv(location, count, v); | |
453 } | |
454 void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) { | |
455 Graphics3D::GetCurrent()->impl()->Uniform4i(location, x, y, z, w); | |
456 } | |
457 void Uniform4iv(GLint location, GLsizei count, const GLint* v) { | |
458 Graphics3D::GetCurrent()->impl()->Uniform4iv(location, count, v); | |
459 } | |
460 void UniformMatrix2fv( | |
461 GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { | |
462 Graphics3D::GetCurrent()->impl()->UniformMatrix2fv( | |
463 location, count, transpose, value); | |
464 } | |
465 void UniformMatrix3fv( | |
466 GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { | |
467 Graphics3D::GetCurrent()->impl()->UniformMatrix3fv( | |
468 location, count, transpose, value); | |
469 } | |
470 void UniformMatrix4fv( | |
471 GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { | |
472 Graphics3D::GetCurrent()->impl()->UniformMatrix4fv( | |
473 location, count, transpose, value); | |
474 } | |
475 void UseProgram(GLuint program) { | |
476 Graphics3D::GetCurrent()->impl()->UseProgram(program); | |
477 } | |
478 void ValidateProgram(GLuint program) { | |
479 Graphics3D::GetCurrent()->impl()->ValidateProgram(program); | |
480 } | |
481 void VertexAttrib1f(GLuint indx, GLfloat x) { | |
482 Graphics3D::GetCurrent()->impl()->VertexAttrib1f(indx, x); | |
483 } | |
484 void VertexAttrib1fv(GLuint indx, const GLfloat* values) { | |
485 Graphics3D::GetCurrent()->impl()->VertexAttrib1fv(indx, values); | |
486 } | |
487 void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) { | |
488 Graphics3D::GetCurrent()->impl()->VertexAttrib2f(indx, x, y); | |
489 } | |
490 void VertexAttrib2fv(GLuint indx, const GLfloat* values) { | |
491 Graphics3D::GetCurrent()->impl()->VertexAttrib2fv(indx, values); | |
492 } | |
493 void VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) { | |
494 Graphics3D::GetCurrent()->impl()->VertexAttrib3f(indx, x, y, z); | |
495 } | |
496 void VertexAttrib3fv(GLuint indx, const GLfloat* values) { | |
497 Graphics3D::GetCurrent()->impl()->VertexAttrib3fv(indx, values); | |
498 } | |
499 void VertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { | |
500 Graphics3D::GetCurrent()->impl()->VertexAttrib4f(indx, x, y, z, w); | |
501 } | |
502 void VertexAttrib4fv(GLuint indx, const GLfloat* values) { | |
503 Graphics3D::GetCurrent()->impl()->VertexAttrib4fv(indx, values); | |
504 } | |
505 void VertexAttribPointer( | |
506 GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, | |
507 const void* ptr) { | |
508 Graphics3D::GetCurrent()->impl()->VertexAttribPointer( | |
509 indx, size, type, normalized, stride, ptr); | |
510 } | |
511 void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) { | |
512 Graphics3D::GetCurrent()->impl()->Viewport(x, y, width, height); | |
513 } | |
514 void SwapBuffers() { | |
515 Graphics3D::GetCurrent()->impl()->SwapBuffers(); | |
516 } | |
517 | |
518 const struct PPB_OpenGLES_Dev ppb_opengles = { | |
519 &ActiveTexture, | |
520 &AttachShader, | |
521 &BindAttribLocation, | |
522 &BindBuffer, | |
523 &BindFramebuffer, | |
524 &BindRenderbuffer, | |
525 &BindTexture, | |
526 &BlendColor, | |
527 &BlendEquation, | |
528 &BlendEquationSeparate, | |
529 &BlendFunc, | |
530 &BlendFuncSeparate, | |
531 &BufferData, | |
532 &BufferSubData, | |
533 &CheckFramebufferStatus, | |
534 &Clear, | |
535 &ClearColor, | |
536 &ClearDepthf, | |
537 &ClearStencil, | |
538 &ColorMask, | |
539 &CompileShader, | |
540 &CompressedTexImage2D, | |
541 &CompressedTexSubImage2D, | |
542 &CopyTexImage2D, | |
543 &CopyTexSubImage2D, | |
544 &CreateProgram, | |
545 &CreateShader, | |
546 &CullFace, | |
547 &DeleteBuffers, | |
548 &DeleteFramebuffers, | |
549 &DeleteProgram, | |
550 &DeleteRenderbuffers, | |
551 &DeleteShader, | |
552 &DeleteTextures, | |
553 &DepthFunc, | |
554 &DepthMask, | |
555 &DepthRangef, | |
556 &DetachShader, | |
557 &Disable, | |
558 &DisableVertexAttribArray, | |
559 &DrawArrays, | |
560 &DrawElements, | |
561 &Enable, | |
562 &EnableVertexAttribArray, | |
563 &Finish, | |
564 &Flush, | |
565 &FramebufferRenderbuffer, | |
566 &FramebufferTexture2D, | |
567 &FrontFace, | |
568 &GenBuffers, | |
569 &GenerateMipmap, | |
570 &GenFramebuffers, | |
571 &GenRenderbuffers, | |
572 &GenTextures, | |
573 &GetActiveAttrib, | |
574 &GetActiveUniform, | |
575 &GetAttachedShaders, | |
576 &GetAttribLocation, | |
577 &GetBooleanv, | |
578 &GetBufferParameteriv, | |
579 &GetError, | |
580 &GetFloatv, | |
581 &GetFramebufferAttachmentParameteriv, | |
582 &GetIntegerv, | |
583 &GetProgramiv, | |
584 &GetProgramInfoLog, | |
585 &GetRenderbufferParameteriv, | |
586 &GetShaderiv, | |
587 &GetShaderInfoLog, | |
588 &GetShaderPrecisionFormat, | |
589 &GetShaderSource, | |
590 &GetString, | |
591 &GetTexParameterfv, | |
592 &GetTexParameteriv, | |
593 &GetUniformfv, | |
594 &GetUniformiv, | |
595 &GetUniformLocation, | |
596 &GetVertexAttribfv, | |
597 &GetVertexAttribiv, | |
598 &GetVertexAttribPointerv, | |
599 &Hint, | |
600 &IsBuffer, | |
601 &IsEnabled, | |
602 &IsFramebuffer, | |
603 &IsProgram, | |
604 &IsRenderbuffer, | |
605 &IsShader, | |
606 &IsTexture, | |
607 &LineWidth, | |
608 &LinkProgram, | |
609 &PixelStorei, | |
610 &PolygonOffset, | |
611 &ReadPixels, | |
612 &ReleaseShaderCompiler, | |
613 &RenderbufferStorage, | |
614 &SampleCoverage, | |
615 &Scissor, | |
616 &ShaderBinary, | |
617 &ShaderSource, | |
618 &StencilFunc, | |
619 &StencilFuncSeparate, | |
620 &StencilMask, | |
621 &StencilMaskSeparate, | |
622 &StencilOp, | |
623 &StencilOpSeparate, | |
624 &TexImage2D, | |
625 &TexParameterf, | |
626 &TexParameterfv, | |
627 &TexParameteri, | |
628 &TexParameteriv, | |
629 &TexSubImage2D, | |
630 &Uniform1f, | |
631 &Uniform1fv, | |
632 &Uniform1i, | |
633 &Uniform1iv, | |
634 &Uniform2f, | |
635 &Uniform2fv, | |
636 &Uniform2i, | |
637 &Uniform2iv, | |
638 &Uniform3f, | |
639 &Uniform3fv, | |
640 &Uniform3i, | |
641 &Uniform3iv, | |
642 &Uniform4f, | |
643 &Uniform4fv, | |
644 &Uniform4i, | |
645 &Uniform4iv, | |
646 &UniformMatrix2fv, | |
647 &UniformMatrix3fv, | |
648 &UniformMatrix4fv, | |
649 &UseProgram, | |
650 &ValidateProgram, | |
651 &VertexAttrib1f, | |
652 &VertexAttrib1fv, | |
653 &VertexAttrib2f, | |
654 &VertexAttrib2fv, | |
655 &VertexAttrib3f, | |
656 &VertexAttrib3fv, | |
657 &VertexAttrib4f, | |
658 &VertexAttrib4fv, | |
659 &VertexAttribPointer, | |
660 &Viewport, | |
661 &SwapBuffers | |
662 }; | |
663 | |
664 } // namespace | |
665 | |
666 const PPB_OpenGLES_Dev* Graphics3D::GetOpenGLESInterface() { | |
667 return &ppb_opengles; | |
668 } | |
669 | |
670 } // namespace pepper | |
671 | |
OLD | NEW |