1 // Copyright 2014 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.
5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename
11 #include "mojo/gpu/mojo_gles2_impl_autogen.h"
13 #include "base/logging.h"
14 #include "third_party/mojo/src/mojo/public/c/gles2/chromium_extension.h"
15 #include "third_party/mojo/src/mojo/public/c/gles2/gles2.h"
19 void MojoGLES2Impl::ActiveTexture(GLenum texture
) {
20 MojoGLES2MakeCurrent(context_
);
21 glActiveTexture(texture
);
23 void MojoGLES2Impl::AttachShader(GLuint program
, GLuint shader
) {
24 MojoGLES2MakeCurrent(context_
);
25 glAttachShader(program
, shader
);
27 void MojoGLES2Impl::BindAttribLocation(GLuint program
,
30 MojoGLES2MakeCurrent(context_
);
31 glBindAttribLocation(program
, index
, name
);
33 void MojoGLES2Impl::BindBuffer(GLenum target
, GLuint buffer
) {
34 MojoGLES2MakeCurrent(context_
);
35 glBindBuffer(target
, buffer
);
37 void MojoGLES2Impl::BindBufferBase(GLenum target
, GLuint index
, GLuint buffer
) {
38 NOTREACHED() << "Unimplemented BindBufferBase.";
40 void MojoGLES2Impl::BindBufferRange(GLenum target
,
45 NOTREACHED() << "Unimplemented BindBufferRange.";
47 void MojoGLES2Impl::BindFramebuffer(GLenum target
, GLuint framebuffer
) {
48 MojoGLES2MakeCurrent(context_
);
49 glBindFramebuffer(target
, framebuffer
);
51 void MojoGLES2Impl::BindRenderbuffer(GLenum target
, GLuint renderbuffer
) {
52 MojoGLES2MakeCurrent(context_
);
53 glBindRenderbuffer(target
, renderbuffer
);
55 void MojoGLES2Impl::BindSampler(GLuint unit
, GLuint sampler
) {
56 NOTREACHED() << "Unimplemented BindSampler.";
58 void MojoGLES2Impl::BindTexture(GLenum target
, GLuint texture
) {
59 MojoGLES2MakeCurrent(context_
);
60 glBindTexture(target
, texture
);
62 void MojoGLES2Impl::BindTransformFeedback(GLenum target
,
63 GLuint transformfeedback
) {
64 NOTREACHED() << "Unimplemented BindTransformFeedback.";
66 void MojoGLES2Impl::BlendColor(GLclampf red
,
70 MojoGLES2MakeCurrent(context_
);
71 glBlendColor(red
, green
, blue
, alpha
);
73 void MojoGLES2Impl::BlendEquation(GLenum mode
) {
74 MojoGLES2MakeCurrent(context_
);
75 glBlendEquation(mode
);
77 void MojoGLES2Impl::BlendEquationSeparate(GLenum modeRGB
, GLenum modeAlpha
) {
78 MojoGLES2MakeCurrent(context_
);
79 glBlendEquationSeparate(modeRGB
, modeAlpha
);
81 void MojoGLES2Impl::BlendFunc(GLenum sfactor
, GLenum dfactor
) {
82 MojoGLES2MakeCurrent(context_
);
83 glBlendFunc(sfactor
, dfactor
);
85 void MojoGLES2Impl::BlendFuncSeparate(GLenum srcRGB
,
89 MojoGLES2MakeCurrent(context_
);
90 glBlendFuncSeparate(srcRGB
, dstRGB
, srcAlpha
, dstAlpha
);
92 void MojoGLES2Impl::BufferData(GLenum target
,
96 MojoGLES2MakeCurrent(context_
);
97 glBufferData(target
, size
, data
, usage
);
99 void MojoGLES2Impl::BufferSubData(GLenum target
,
103 MojoGLES2MakeCurrent(context_
);
104 glBufferSubData(target
, offset
, size
, data
);
106 GLenum
MojoGLES2Impl::CheckFramebufferStatus(GLenum target
) {
107 MojoGLES2MakeCurrent(context_
);
108 return glCheckFramebufferStatus(target
);
110 void MojoGLES2Impl::Clear(GLbitfield mask
) {
111 MojoGLES2MakeCurrent(context_
);
114 void MojoGLES2Impl::ClearBufferfi(GLenum buffer
,
118 NOTREACHED() << "Unimplemented ClearBufferfi.";
120 void MojoGLES2Impl::ClearBufferfv(GLenum buffer
,
122 const GLfloat
* value
) {
123 NOTREACHED() << "Unimplemented ClearBufferfv.";
125 void MojoGLES2Impl::ClearBufferiv(GLenum buffer
,
127 const GLint
* value
) {
128 NOTREACHED() << "Unimplemented ClearBufferiv.";
130 void MojoGLES2Impl::ClearBufferuiv(GLenum buffer
,
132 const GLuint
* value
) {
133 NOTREACHED() << "Unimplemented ClearBufferuiv.";
135 void MojoGLES2Impl::ClearColor(GLclampf red
,
139 MojoGLES2MakeCurrent(context_
);
140 glClearColor(red
, green
, blue
, alpha
);
142 void MojoGLES2Impl::ClearDepthf(GLclampf depth
) {
143 MojoGLES2MakeCurrent(context_
);
144 glClearDepthf(depth
);
146 void MojoGLES2Impl::ClearStencil(GLint s
) {
147 MojoGLES2MakeCurrent(context_
);
150 GLenum
MojoGLES2Impl::ClientWaitSync(GLsync sync
,
153 NOTREACHED() << "Unimplemented ClientWaitSync.";
156 void MojoGLES2Impl::ColorMask(GLboolean red
,
160 MojoGLES2MakeCurrent(context_
);
161 glColorMask(red
, green
, blue
, alpha
);
163 void MojoGLES2Impl::CompileShader(GLuint shader
) {
164 MojoGLES2MakeCurrent(context_
);
165 glCompileShader(shader
);
167 void MojoGLES2Impl::CompressedTexImage2D(GLenum target
,
169 GLenum internalformat
,
175 MojoGLES2MakeCurrent(context_
);
176 glCompressedTexImage2D(target
, level
, internalformat
, width
, height
, border
,
179 void MojoGLES2Impl::CompressedTexSubImage2D(GLenum target
,
188 MojoGLES2MakeCurrent(context_
);
189 glCompressedTexSubImage2D(target
, level
, xoffset
, yoffset
, width
, height
,
190 format
, imageSize
, data
);
192 void MojoGLES2Impl::CompressedTexImage3D(GLenum target
,
194 GLenum internalformat
,
201 NOTREACHED() << "Unimplemented CompressedTexImage3D.";
203 void MojoGLES2Impl::CompressedTexSubImage3D(GLenum target
,
214 NOTREACHED() << "Unimplemented CompressedTexSubImage3D.";
216 void MojoGLES2Impl::CopyBufferSubData(GLenum readtarget
,
219 GLintptr writeoffset
,
221 NOTREACHED() << "Unimplemented CopyBufferSubData.";
223 void MojoGLES2Impl::CopyTexImage2D(GLenum target
,
225 GLenum internalformat
,
231 MojoGLES2MakeCurrent(context_
);
232 glCopyTexImage2D(target
, level
, internalformat
, x
, y
, width
, height
, border
);
234 void MojoGLES2Impl::CopyTexSubImage2D(GLenum target
,
242 MojoGLES2MakeCurrent(context_
);
243 glCopyTexSubImage2D(target
, level
, xoffset
, yoffset
, x
, y
, width
, height
);
245 void MojoGLES2Impl::CopyTexSubImage3D(GLenum target
,
254 NOTREACHED() << "Unimplemented CopyTexSubImage3D.";
256 GLuint
MojoGLES2Impl::CreateProgram() {
257 MojoGLES2MakeCurrent(context_
);
258 return glCreateProgram();
260 GLuint
MojoGLES2Impl::CreateShader(GLenum type
) {
261 MojoGLES2MakeCurrent(context_
);
262 return glCreateShader(type
);
264 void MojoGLES2Impl::CullFace(GLenum mode
) {
265 MojoGLES2MakeCurrent(context_
);
268 void MojoGLES2Impl::DeleteBuffers(GLsizei n
, const GLuint
* buffers
) {
269 MojoGLES2MakeCurrent(context_
);
270 glDeleteBuffers(n
, buffers
);
272 void MojoGLES2Impl::DeleteFramebuffers(GLsizei n
, const GLuint
* framebuffers
) {
273 MojoGLES2MakeCurrent(context_
);
274 glDeleteFramebuffers(n
, framebuffers
);
276 void MojoGLES2Impl::DeleteProgram(GLuint program
) {
277 MojoGLES2MakeCurrent(context_
);
278 glDeleteProgram(program
);
280 void MojoGLES2Impl::DeleteRenderbuffers(GLsizei n
,
281 const GLuint
* renderbuffers
) {
282 MojoGLES2MakeCurrent(context_
);
283 glDeleteRenderbuffers(n
, renderbuffers
);
285 void MojoGLES2Impl::DeleteSamplers(GLsizei n
, const GLuint
* samplers
) {
286 NOTREACHED() << "Unimplemented DeleteSamplers.";
288 void MojoGLES2Impl::DeleteSync(GLsync sync
) {
289 NOTREACHED() << "Unimplemented DeleteSync.";
291 void MojoGLES2Impl::DeleteShader(GLuint shader
) {
292 MojoGLES2MakeCurrent(context_
);
293 glDeleteShader(shader
);
295 void MojoGLES2Impl::DeleteTextures(GLsizei n
, const GLuint
* textures
) {
296 MojoGLES2MakeCurrent(context_
);
297 glDeleteTextures(n
, textures
);
299 void MojoGLES2Impl::DeleteTransformFeedbacks(GLsizei n
, const GLuint
* ids
) {
300 NOTREACHED() << "Unimplemented DeleteTransformFeedbacks.";
302 void MojoGLES2Impl::DepthFunc(GLenum func
) {
303 MojoGLES2MakeCurrent(context_
);
306 void MojoGLES2Impl::DepthMask(GLboolean flag
) {
307 MojoGLES2MakeCurrent(context_
);
310 void MojoGLES2Impl::DepthRangef(GLclampf zNear
, GLclampf zFar
) {
311 MojoGLES2MakeCurrent(context_
);
312 glDepthRangef(zNear
, zFar
);
314 void MojoGLES2Impl::DetachShader(GLuint program
, GLuint shader
) {
315 MojoGLES2MakeCurrent(context_
);
316 glDetachShader(program
, shader
);
318 void MojoGLES2Impl::Disable(GLenum cap
) {
319 MojoGLES2MakeCurrent(context_
);
322 void MojoGLES2Impl::DisableVertexAttribArray(GLuint index
) {
323 MojoGLES2MakeCurrent(context_
);
324 glDisableVertexAttribArray(index
);
326 void MojoGLES2Impl::DrawArrays(GLenum mode
, GLint first
, GLsizei count
) {
327 MojoGLES2MakeCurrent(context_
);
328 glDrawArrays(mode
, first
, count
);
330 void MojoGLES2Impl::DrawElements(GLenum mode
,
333 const void* indices
) {
334 MojoGLES2MakeCurrent(context_
);
335 glDrawElements(mode
, count
, type
, indices
);
337 void MojoGLES2Impl::DrawRangeElements(GLenum mode
,
342 const void* indices
) {
343 NOTREACHED() << "Unimplemented DrawRangeElements.";
345 void MojoGLES2Impl::Enable(GLenum cap
) {
346 MojoGLES2MakeCurrent(context_
);
349 void MojoGLES2Impl::EnableVertexAttribArray(GLuint index
) {
350 MojoGLES2MakeCurrent(context_
);
351 glEnableVertexAttribArray(index
);
353 GLsync
MojoGLES2Impl::FenceSync(GLenum condition
, GLbitfield flags
) {
354 NOTREACHED() << "Unimplemented FenceSync.";
357 void MojoGLES2Impl::Finish() {
358 MojoGLES2MakeCurrent(context_
);
361 void MojoGLES2Impl::Flush() {
362 MojoGLES2MakeCurrent(context_
);
365 void MojoGLES2Impl::FramebufferRenderbuffer(GLenum target
,
367 GLenum renderbuffertarget
,
368 GLuint renderbuffer
) {
369 MojoGLES2MakeCurrent(context_
);
370 glFramebufferRenderbuffer(target
, attachment
, renderbuffertarget
,
373 void MojoGLES2Impl::FramebufferTexture2D(GLenum target
,
378 MojoGLES2MakeCurrent(context_
);
379 glFramebufferTexture2D(target
, attachment
, textarget
, texture
, level
);
381 void MojoGLES2Impl::FramebufferTextureLayer(GLenum target
,
386 NOTREACHED() << "Unimplemented FramebufferTextureLayer.";
388 void MojoGLES2Impl::FrontFace(GLenum mode
) {
389 MojoGLES2MakeCurrent(context_
);
392 void MojoGLES2Impl::GenBuffers(GLsizei n
, GLuint
* buffers
) {
393 MojoGLES2MakeCurrent(context_
);
394 glGenBuffers(n
, buffers
);
396 void MojoGLES2Impl::GenerateMipmap(GLenum target
) {
397 MojoGLES2MakeCurrent(context_
);
398 glGenerateMipmap(target
);
400 void MojoGLES2Impl::GenFramebuffers(GLsizei n
, GLuint
* framebuffers
) {
401 MojoGLES2MakeCurrent(context_
);
402 glGenFramebuffers(n
, framebuffers
);
404 void MojoGLES2Impl::GenRenderbuffers(GLsizei n
, GLuint
* renderbuffers
) {
405 MojoGLES2MakeCurrent(context_
);
406 glGenRenderbuffers(n
, renderbuffers
);
408 void MojoGLES2Impl::GenSamplers(GLsizei n
, GLuint
* samplers
) {
409 NOTREACHED() << "Unimplemented GenSamplers.";
411 void MojoGLES2Impl::GenTextures(GLsizei n
, GLuint
* textures
) {
412 MojoGLES2MakeCurrent(context_
);
413 glGenTextures(n
, textures
);
415 void MojoGLES2Impl::GenTransformFeedbacks(GLsizei n
, GLuint
* ids
) {
416 NOTREACHED() << "Unimplemented GenTransformFeedbacks.";
418 void MojoGLES2Impl::GetActiveAttrib(GLuint program
,
425 MojoGLES2MakeCurrent(context_
);
426 glGetActiveAttrib(program
, index
, bufsize
, length
, size
, type
, name
);
428 void MojoGLES2Impl::GetActiveUniform(GLuint program
,
435 MojoGLES2MakeCurrent(context_
);
436 glGetActiveUniform(program
, index
, bufsize
, length
, size
, type
, name
);
438 void MojoGLES2Impl::GetActiveUniformBlockiv(GLuint program
,
442 NOTREACHED() << "Unimplemented GetActiveUniformBlockiv.";
444 void MojoGLES2Impl::GetActiveUniformBlockName(GLuint program
,
449 NOTREACHED() << "Unimplemented GetActiveUniformBlockName.";
451 void MojoGLES2Impl::GetActiveUniformsiv(GLuint program
,
453 const GLuint
* indices
,
456 NOTREACHED() << "Unimplemented GetActiveUniformsiv.";
458 void MojoGLES2Impl::GetAttachedShaders(GLuint program
,
462 MojoGLES2MakeCurrent(context_
);
463 glGetAttachedShaders(program
, maxcount
, count
, shaders
);
465 GLint
MojoGLES2Impl::GetAttribLocation(GLuint program
, const char* name
) {
466 MojoGLES2MakeCurrent(context_
);
467 return glGetAttribLocation(program
, name
);
469 void MojoGLES2Impl::GetBooleanv(GLenum pname
, GLboolean
* params
) {
470 MojoGLES2MakeCurrent(context_
);
471 glGetBooleanv(pname
, params
);
473 void MojoGLES2Impl::GetBufferParameteri64v(GLenum target
,
476 NOTREACHED() << "Unimplemented GetBufferParameteri64v.";
478 void MojoGLES2Impl::GetBufferParameteriv(GLenum target
,
481 MojoGLES2MakeCurrent(context_
);
482 glGetBufferParameteriv(target
, pname
, params
);
484 GLenum
MojoGLES2Impl::GetError() {
485 MojoGLES2MakeCurrent(context_
);
488 void MojoGLES2Impl::GetFloatv(GLenum pname
, GLfloat
* params
) {
489 MojoGLES2MakeCurrent(context_
);
490 glGetFloatv(pname
, params
);
492 GLint
MojoGLES2Impl::GetFragDataLocation(GLuint program
, const char* name
) {
493 NOTREACHED() << "Unimplemented GetFragDataLocation.";
496 void MojoGLES2Impl::GetFramebufferAttachmentParameteriv(GLenum target
,
500 MojoGLES2MakeCurrent(context_
);
501 glGetFramebufferAttachmentParameteriv(target
, attachment
, pname
, params
);
503 void MojoGLES2Impl::GetInteger64v(GLenum pname
, GLint64
* params
) {
504 NOTREACHED() << "Unimplemented GetInteger64v.";
506 void MojoGLES2Impl::GetIntegeri_v(GLenum pname
, GLuint index
, GLint
* data
) {
507 NOTREACHED() << "Unimplemented GetIntegeri_v.";
509 void MojoGLES2Impl::GetInteger64i_v(GLenum pname
, GLuint index
, GLint64
* data
) {
510 NOTREACHED() << "Unimplemented GetInteger64i_v.";
512 void MojoGLES2Impl::GetIntegerv(GLenum pname
, GLint
* params
) {
513 MojoGLES2MakeCurrent(context_
);
514 glGetIntegerv(pname
, params
);
516 void MojoGLES2Impl::GetInternalformativ(GLenum target
,
521 NOTREACHED() << "Unimplemented GetInternalformativ.";
523 void MojoGLES2Impl::GetProgramiv(GLuint program
, GLenum pname
, GLint
* params
) {
524 MojoGLES2MakeCurrent(context_
);
525 glGetProgramiv(program
, pname
, params
);
527 void MojoGLES2Impl::GetProgramInfoLog(GLuint program
,
531 MojoGLES2MakeCurrent(context_
);
532 glGetProgramInfoLog(program
, bufsize
, length
, infolog
);
534 void MojoGLES2Impl::GetRenderbufferParameteriv(GLenum target
,
537 MojoGLES2MakeCurrent(context_
);
538 glGetRenderbufferParameteriv(target
, pname
, params
);
540 void MojoGLES2Impl::GetSamplerParameterfv(GLuint sampler
,
543 NOTREACHED() << "Unimplemented GetSamplerParameterfv.";
545 void MojoGLES2Impl::GetSamplerParameteriv(GLuint sampler
,
548 NOTREACHED() << "Unimplemented GetSamplerParameteriv.";
550 void MojoGLES2Impl::GetShaderiv(GLuint shader
, GLenum pname
, GLint
* params
) {
551 MojoGLES2MakeCurrent(context_
);
552 glGetShaderiv(shader
, pname
, params
);
554 void MojoGLES2Impl::GetShaderInfoLog(GLuint shader
,
558 MojoGLES2MakeCurrent(context_
);
559 glGetShaderInfoLog(shader
, bufsize
, length
, infolog
);
561 void MojoGLES2Impl::GetShaderPrecisionFormat(GLenum shadertype
,
562 GLenum precisiontype
,
565 MojoGLES2MakeCurrent(context_
);
566 glGetShaderPrecisionFormat(shadertype
, precisiontype
, range
, precision
);
568 void MojoGLES2Impl::GetShaderSource(GLuint shader
,
572 MojoGLES2MakeCurrent(context_
);
573 glGetShaderSource(shader
, bufsize
, length
, source
);
575 const GLubyte
* MojoGLES2Impl::GetString(GLenum name
) {
576 MojoGLES2MakeCurrent(context_
);
577 return glGetString(name
);
579 void MojoGLES2Impl::GetSynciv(GLsync sync
,
584 NOTREACHED() << "Unimplemented GetSynciv.";
586 void MojoGLES2Impl::GetTexParameterfv(GLenum target
,
589 MojoGLES2MakeCurrent(context_
);
590 glGetTexParameterfv(target
, pname
, params
);
592 void MojoGLES2Impl::GetTexParameteriv(GLenum target
,
595 MojoGLES2MakeCurrent(context_
);
596 glGetTexParameteriv(target
, pname
, params
);
598 void MojoGLES2Impl::GetTransformFeedbackVarying(GLuint program
,
605 NOTREACHED() << "Unimplemented GetTransformFeedbackVarying.";
607 GLuint
MojoGLES2Impl::GetUniformBlockIndex(GLuint program
, const char* name
) {
608 NOTREACHED() << "Unimplemented GetUniformBlockIndex.";
611 void MojoGLES2Impl::GetUniformfv(GLuint program
,
614 MojoGLES2MakeCurrent(context_
);
615 glGetUniformfv(program
, location
, params
);
617 void MojoGLES2Impl::GetUniformiv(GLuint program
,
620 MojoGLES2MakeCurrent(context_
);
621 glGetUniformiv(program
, location
, params
);
623 void MojoGLES2Impl::GetUniformuiv(GLuint program
,
626 NOTREACHED() << "Unimplemented GetUniformuiv.";
628 void MojoGLES2Impl::GetUniformIndices(GLuint program
,
630 const char* const* names
,
632 NOTREACHED() << "Unimplemented GetUniformIndices.";
634 GLint
MojoGLES2Impl::GetUniformLocation(GLuint program
, const char* name
) {
635 MojoGLES2MakeCurrent(context_
);
636 return glGetUniformLocation(program
, name
);
638 void MojoGLES2Impl::GetVertexAttribfv(GLuint index
,
641 MojoGLES2MakeCurrent(context_
);
642 glGetVertexAttribfv(index
, pname
, params
);
644 void MojoGLES2Impl::GetVertexAttribiv(GLuint index
,
647 MojoGLES2MakeCurrent(context_
);
648 glGetVertexAttribiv(index
, pname
, params
);
650 void MojoGLES2Impl::GetVertexAttribIiv(GLuint index
,
653 NOTREACHED() << "Unimplemented GetVertexAttribIiv.";
655 void MojoGLES2Impl::GetVertexAttribIuiv(GLuint index
,
658 NOTREACHED() << "Unimplemented GetVertexAttribIuiv.";
660 void MojoGLES2Impl::GetVertexAttribPointerv(GLuint index
,
663 MojoGLES2MakeCurrent(context_
);
664 glGetVertexAttribPointerv(index
, pname
, pointer
);
666 void MojoGLES2Impl::Hint(GLenum target
, GLenum mode
) {
667 MojoGLES2MakeCurrent(context_
);
668 glHint(target
, mode
);
670 void MojoGLES2Impl::InvalidateFramebuffer(GLenum target
,
672 const GLenum
* attachments
) {
673 NOTREACHED() << "Unimplemented InvalidateFramebuffer.";
675 void MojoGLES2Impl::InvalidateSubFramebuffer(GLenum target
,
677 const GLenum
* attachments
,
682 NOTREACHED() << "Unimplemented InvalidateSubFramebuffer.";
684 GLboolean
MojoGLES2Impl::IsBuffer(GLuint buffer
) {
685 MojoGLES2MakeCurrent(context_
);
686 return glIsBuffer(buffer
);
688 GLboolean
MojoGLES2Impl::IsEnabled(GLenum cap
) {
689 MojoGLES2MakeCurrent(context_
);
690 return glIsEnabled(cap
);
692 GLboolean
MojoGLES2Impl::IsFramebuffer(GLuint framebuffer
) {
693 MojoGLES2MakeCurrent(context_
);
694 return glIsFramebuffer(framebuffer
);
696 GLboolean
MojoGLES2Impl::IsProgram(GLuint program
) {
697 MojoGLES2MakeCurrent(context_
);
698 return glIsProgram(program
);
700 GLboolean
MojoGLES2Impl::IsRenderbuffer(GLuint renderbuffer
) {
701 MojoGLES2MakeCurrent(context_
);
702 return glIsRenderbuffer(renderbuffer
);
704 GLboolean
MojoGLES2Impl::IsSampler(GLuint sampler
) {
705 NOTREACHED() << "Unimplemented IsSampler.";
708 GLboolean
MojoGLES2Impl::IsShader(GLuint shader
) {
709 MojoGLES2MakeCurrent(context_
);
710 return glIsShader(shader
);
712 GLboolean
MojoGLES2Impl::IsSync(GLsync sync
) {
713 NOTREACHED() << "Unimplemented IsSync.";
716 GLboolean
MojoGLES2Impl::IsTexture(GLuint texture
) {
717 MojoGLES2MakeCurrent(context_
);
718 return glIsTexture(texture
);
720 GLboolean
MojoGLES2Impl::IsTransformFeedback(GLuint transformfeedback
) {
721 NOTREACHED() << "Unimplemented IsTransformFeedback.";
724 void MojoGLES2Impl::LineWidth(GLfloat width
) {
725 MojoGLES2MakeCurrent(context_
);
728 void MojoGLES2Impl::LinkProgram(GLuint program
) {
729 MojoGLES2MakeCurrent(context_
);
730 glLinkProgram(program
);
732 void MojoGLES2Impl::PauseTransformFeedback() {
733 NOTREACHED() << "Unimplemented PauseTransformFeedback.";
735 void MojoGLES2Impl::PixelStorei(GLenum pname
, GLint param
) {
736 MojoGLES2MakeCurrent(context_
);
737 glPixelStorei(pname
, param
);
739 void MojoGLES2Impl::PolygonOffset(GLfloat factor
, GLfloat units
) {
740 MojoGLES2MakeCurrent(context_
);
741 glPolygonOffset(factor
, units
);
743 void MojoGLES2Impl::ReadBuffer(GLenum src
) {
744 NOTREACHED() << "Unimplemented ReadBuffer.";
746 void MojoGLES2Impl::ReadPixels(GLint x
,
753 MojoGLES2MakeCurrent(context_
);
754 glReadPixels(x
, y
, width
, height
, format
, type
, pixels
);
756 void MojoGLES2Impl::ReleaseShaderCompiler() {
757 MojoGLES2MakeCurrent(context_
);
758 glReleaseShaderCompiler();
760 void MojoGLES2Impl::RenderbufferStorage(GLenum target
,
761 GLenum internalformat
,
764 MojoGLES2MakeCurrent(context_
);
765 glRenderbufferStorage(target
, internalformat
, width
, height
);
767 void MojoGLES2Impl::ResumeTransformFeedback() {
768 NOTREACHED() << "Unimplemented ResumeTransformFeedback.";
770 void MojoGLES2Impl::SampleCoverage(GLclampf value
, GLboolean invert
) {
771 MojoGLES2MakeCurrent(context_
);
772 glSampleCoverage(value
, invert
);
774 void MojoGLES2Impl::SamplerParameterf(GLuint sampler
,
777 NOTREACHED() << "Unimplemented SamplerParameterf.";
779 void MojoGLES2Impl::SamplerParameterfv(GLuint sampler
,
781 const GLfloat
* params
) {
782 NOTREACHED() << "Unimplemented SamplerParameterfv.";
784 void MojoGLES2Impl::SamplerParameteri(GLuint sampler
,
787 NOTREACHED() << "Unimplemented SamplerParameteri.";
789 void MojoGLES2Impl::SamplerParameteriv(GLuint sampler
,
791 const GLint
* params
) {
792 NOTREACHED() << "Unimplemented SamplerParameteriv.";
794 void MojoGLES2Impl::Scissor(GLint x
, GLint y
, GLsizei width
, GLsizei height
) {
795 MojoGLES2MakeCurrent(context_
);
796 glScissor(x
, y
, width
, height
);
798 void MojoGLES2Impl::ShaderBinary(GLsizei n
,
799 const GLuint
* shaders
,
803 MojoGLES2MakeCurrent(context_
);
804 glShaderBinary(n
, shaders
, binaryformat
, binary
, length
);
806 void MojoGLES2Impl::ShaderSource(GLuint shader
,
808 const GLchar
* const* str
,
809 const GLint
* length
) {
810 MojoGLES2MakeCurrent(context_
);
811 glShaderSource(shader
, count
, str
, length
);
813 void MojoGLES2Impl::ShallowFinishCHROMIUM() {
814 MojoGLES2MakeCurrent(context_
);
815 glShallowFinishCHROMIUM();
817 void MojoGLES2Impl::ShallowFlushCHROMIUM() {
818 MojoGLES2MakeCurrent(context_
);
819 glShallowFlushCHROMIUM();
821 void MojoGLES2Impl::OrderingBarrierCHROMIUM() {
822 MojoGLES2MakeCurrent(context_
);
823 glOrderingBarrierCHROMIUM();
825 void MojoGLES2Impl::StencilFunc(GLenum func
, GLint ref
, GLuint mask
) {
826 MojoGLES2MakeCurrent(context_
);
827 glStencilFunc(func
, ref
, mask
);
829 void MojoGLES2Impl::StencilFuncSeparate(GLenum face
,
833 MojoGLES2MakeCurrent(context_
);
834 glStencilFuncSeparate(face
, func
, ref
, mask
);
836 void MojoGLES2Impl::StencilMask(GLuint mask
) {
837 MojoGLES2MakeCurrent(context_
);
840 void MojoGLES2Impl::StencilMaskSeparate(GLenum face
, GLuint mask
) {
841 MojoGLES2MakeCurrent(context_
);
842 glStencilMaskSeparate(face
, mask
);
844 void MojoGLES2Impl::StencilOp(GLenum fail
, GLenum zfail
, GLenum zpass
) {
845 MojoGLES2MakeCurrent(context_
);
846 glStencilOp(fail
, zfail
, zpass
);
848 void MojoGLES2Impl::StencilOpSeparate(GLenum face
,
852 MojoGLES2MakeCurrent(context_
);
853 glStencilOpSeparate(face
, fail
, zfail
, zpass
);
855 void MojoGLES2Impl::TexImage2D(GLenum target
,
857 GLint internalformat
,
863 const void* pixels
) {
864 MojoGLES2MakeCurrent(context_
);
865 glTexImage2D(target
, level
, internalformat
, width
, height
, border
, format
,
868 void MojoGLES2Impl::TexImage3D(GLenum target
,
870 GLint internalformat
,
877 const void* pixels
) {
878 NOTREACHED() << "Unimplemented TexImage3D.";
880 void MojoGLES2Impl::TexParameterf(GLenum target
, GLenum pname
, GLfloat param
) {
881 MojoGLES2MakeCurrent(context_
);
882 glTexParameterf(target
, pname
, param
);
884 void MojoGLES2Impl::TexParameterfv(GLenum target
,
886 const GLfloat
* params
) {
887 MojoGLES2MakeCurrent(context_
);
888 glTexParameterfv(target
, pname
, params
);
890 void MojoGLES2Impl::TexParameteri(GLenum target
, GLenum pname
, GLint param
) {
891 MojoGLES2MakeCurrent(context_
);
892 glTexParameteri(target
, pname
, param
);
894 void MojoGLES2Impl::TexParameteriv(GLenum target
,
896 const GLint
* params
) {
897 MojoGLES2MakeCurrent(context_
);
898 glTexParameteriv(target
, pname
, params
);
900 void MojoGLES2Impl::TexStorage3D(GLenum target
,
902 GLenum internalFormat
,
906 NOTREACHED() << "Unimplemented TexStorage3D.";
908 void MojoGLES2Impl::TexSubImage2D(GLenum target
,
916 const void* pixels
) {
917 MojoGLES2MakeCurrent(context_
);
918 glTexSubImage2D(target
, level
, xoffset
, yoffset
, width
, height
, format
, type
,
921 void MojoGLES2Impl::TexSubImage3D(GLenum target
,
931 const void* pixels
) {
932 NOTREACHED() << "Unimplemented TexSubImage3D.";
934 void MojoGLES2Impl::TransformFeedbackVaryings(GLuint program
,
936 const char* const* varyings
,
938 NOTREACHED() << "Unimplemented TransformFeedbackVaryings.";
940 void MojoGLES2Impl::Uniform1f(GLint location
, GLfloat x
) {
941 MojoGLES2MakeCurrent(context_
);
942 glUniform1f(location
, x
);
944 void MojoGLES2Impl::Uniform1fv(GLint location
,
947 MojoGLES2MakeCurrent(context_
);
948 glUniform1fv(location
, count
, v
);
950 void MojoGLES2Impl::Uniform1i(GLint location
, GLint x
) {
951 MojoGLES2MakeCurrent(context_
);
952 glUniform1i(location
, x
);
954 void MojoGLES2Impl::Uniform1iv(GLint location
, GLsizei count
, const GLint
* v
) {
955 MojoGLES2MakeCurrent(context_
);
956 glUniform1iv(location
, count
, v
);
958 void MojoGLES2Impl::Uniform1ui(GLint location
, GLuint x
) {
959 NOTREACHED() << "Unimplemented Uniform1ui.";
961 void MojoGLES2Impl::Uniform1uiv(GLint location
,
964 NOTREACHED() << "Unimplemented Uniform1uiv.";
966 void MojoGLES2Impl::Uniform2f(GLint location
, GLfloat x
, GLfloat y
) {
967 MojoGLES2MakeCurrent(context_
);
968 glUniform2f(location
, x
, y
);
970 void MojoGLES2Impl::Uniform2fv(GLint location
,
973 MojoGLES2MakeCurrent(context_
);
974 glUniform2fv(location
, count
, v
);
976 void MojoGLES2Impl::Uniform2i(GLint location
, GLint x
, GLint y
) {
977 MojoGLES2MakeCurrent(context_
);
978 glUniform2i(location
, x
, y
);
980 void MojoGLES2Impl::Uniform2iv(GLint location
, GLsizei count
, const GLint
* v
) {
981 MojoGLES2MakeCurrent(context_
);
982 glUniform2iv(location
, count
, v
);
984 void MojoGLES2Impl::Uniform2ui(GLint location
, GLuint x
, GLuint y
) {
985 NOTREACHED() << "Unimplemented Uniform2ui.";
987 void MojoGLES2Impl::Uniform2uiv(GLint location
,
990 NOTREACHED() << "Unimplemented Uniform2uiv.";
992 void MojoGLES2Impl::Uniform3f(GLint location
, GLfloat x
, GLfloat y
, GLfloat z
) {
993 MojoGLES2MakeCurrent(context_
);
994 glUniform3f(location
, x
, y
, z
);
996 void MojoGLES2Impl::Uniform3fv(GLint location
,
999 MojoGLES2MakeCurrent(context_
);
1000 glUniform3fv(location
, count
, v
);
1002 void MojoGLES2Impl::Uniform3i(GLint location
, GLint x
, GLint y
, GLint z
) {
1003 MojoGLES2MakeCurrent(context_
);
1004 glUniform3i(location
, x
, y
, z
);
1006 void MojoGLES2Impl::Uniform3iv(GLint location
, GLsizei count
, const GLint
* v
) {
1007 MojoGLES2MakeCurrent(context_
);
1008 glUniform3iv(location
, count
, v
);
1010 void MojoGLES2Impl::Uniform3ui(GLint location
, GLuint x
, GLuint y
, GLuint z
) {
1011 NOTREACHED() << "Unimplemented Uniform3ui.";
1013 void MojoGLES2Impl::Uniform3uiv(GLint location
,
1016 NOTREACHED() << "Unimplemented Uniform3uiv.";
1018 void MojoGLES2Impl::Uniform4f(GLint location
,
1023 MojoGLES2MakeCurrent(context_
);
1024 glUniform4f(location
, x
, y
, z
, w
);
1026 void MojoGLES2Impl::Uniform4fv(GLint location
,
1029 MojoGLES2MakeCurrent(context_
);
1030 glUniform4fv(location
, count
, v
);
1032 void MojoGLES2Impl::Uniform4i(GLint location
,
1037 MojoGLES2MakeCurrent(context_
);
1038 glUniform4i(location
, x
, y
, z
, w
);
1040 void MojoGLES2Impl::Uniform4iv(GLint location
, GLsizei count
, const GLint
* v
) {
1041 MojoGLES2MakeCurrent(context_
);
1042 glUniform4iv(location
, count
, v
);
1044 void MojoGLES2Impl::Uniform4ui(GLint location
,
1049 NOTREACHED() << "Unimplemented Uniform4ui.";
1051 void MojoGLES2Impl::Uniform4uiv(GLint location
,
1054 NOTREACHED() << "Unimplemented Uniform4uiv.";
1056 void MojoGLES2Impl::UniformBlockBinding(GLuint program
,
1059 NOTREACHED() << "Unimplemented UniformBlockBinding.";
1061 void MojoGLES2Impl::UniformMatrix2fv(GLint location
,
1063 GLboolean transpose
,
1064 const GLfloat
* value
) {
1065 MojoGLES2MakeCurrent(context_
);
1066 glUniformMatrix2fv(location
, count
, transpose
, value
);
1068 void MojoGLES2Impl::UniformMatrix2x3fv(GLint location
,
1070 GLboolean transpose
,
1071 const GLfloat
* value
) {
1072 NOTREACHED() << "Unimplemented UniformMatrix2x3fv.";
1074 void MojoGLES2Impl::UniformMatrix2x4fv(GLint location
,
1076 GLboolean transpose
,
1077 const GLfloat
* value
) {
1078 NOTREACHED() << "Unimplemented UniformMatrix2x4fv.";
1080 void MojoGLES2Impl::UniformMatrix3fv(GLint location
,
1082 GLboolean transpose
,
1083 const GLfloat
* value
) {
1084 MojoGLES2MakeCurrent(context_
);
1085 glUniformMatrix3fv(location
, count
, transpose
, value
);
1087 void MojoGLES2Impl::UniformMatrix3x2fv(GLint location
,
1089 GLboolean transpose
,
1090 const GLfloat
* value
) {
1091 NOTREACHED() << "Unimplemented UniformMatrix3x2fv.";
1093 void MojoGLES2Impl::UniformMatrix3x4fv(GLint location
,
1095 GLboolean transpose
,
1096 const GLfloat
* value
) {
1097 NOTREACHED() << "Unimplemented UniformMatrix3x4fv.";
1099 void MojoGLES2Impl::UniformMatrix4fv(GLint location
,
1101 GLboolean transpose
,
1102 const GLfloat
* value
) {
1103 MojoGLES2MakeCurrent(context_
);
1104 glUniformMatrix4fv(location
, count
, transpose
, value
);
1106 void MojoGLES2Impl::UniformMatrix4x2fv(GLint location
,
1108 GLboolean transpose
,
1109 const GLfloat
* value
) {
1110 NOTREACHED() << "Unimplemented UniformMatrix4x2fv.";
1112 void MojoGLES2Impl::UniformMatrix4x3fv(GLint location
,
1114 GLboolean transpose
,
1115 const GLfloat
* value
) {
1116 NOTREACHED() << "Unimplemented UniformMatrix4x3fv.";
1118 void MojoGLES2Impl::UseProgram(GLuint program
) {
1119 MojoGLES2MakeCurrent(context_
);
1120 glUseProgram(program
);
1122 void MojoGLES2Impl::ValidateProgram(GLuint program
) {
1123 MojoGLES2MakeCurrent(context_
);
1124 glValidateProgram(program
);
1126 void MojoGLES2Impl::VertexAttrib1f(GLuint indx
, GLfloat x
) {
1127 MojoGLES2MakeCurrent(context_
);
1128 glVertexAttrib1f(indx
, x
);
1130 void MojoGLES2Impl::VertexAttrib1fv(GLuint indx
, const GLfloat
* values
) {
1131 MojoGLES2MakeCurrent(context_
);
1132 glVertexAttrib1fv(indx
, values
);
1134 void MojoGLES2Impl::VertexAttrib2f(GLuint indx
, GLfloat x
, GLfloat y
) {
1135 MojoGLES2MakeCurrent(context_
);
1136 glVertexAttrib2f(indx
, x
, y
);
1138 void MojoGLES2Impl::VertexAttrib2fv(GLuint indx
, const GLfloat
* values
) {
1139 MojoGLES2MakeCurrent(context_
);
1140 glVertexAttrib2fv(indx
, values
);
1142 void MojoGLES2Impl::VertexAttrib3f(GLuint indx
,
1146 MojoGLES2MakeCurrent(context_
);
1147 glVertexAttrib3f(indx
, x
, y
, z
);
1149 void MojoGLES2Impl::VertexAttrib3fv(GLuint indx
, const GLfloat
* values
) {
1150 MojoGLES2MakeCurrent(context_
);
1151 glVertexAttrib3fv(indx
, values
);
1153 void MojoGLES2Impl::VertexAttrib4f(GLuint indx
,
1158 MojoGLES2MakeCurrent(context_
);
1159 glVertexAttrib4f(indx
, x
, y
, z
, w
);
1161 void MojoGLES2Impl::VertexAttrib4fv(GLuint indx
, const GLfloat
* values
) {
1162 MojoGLES2MakeCurrent(context_
);
1163 glVertexAttrib4fv(indx
, values
);
1165 void MojoGLES2Impl::VertexAttribI4i(GLuint indx
,
1170 NOTREACHED() << "Unimplemented VertexAttribI4i.";
1172 void MojoGLES2Impl::VertexAttribI4iv(GLuint indx
, const GLint
* values
) {
1173 NOTREACHED() << "Unimplemented VertexAttribI4iv.";
1175 void MojoGLES2Impl::VertexAttribI4ui(GLuint indx
,
1180 NOTREACHED() << "Unimplemented VertexAttribI4ui.";
1182 void MojoGLES2Impl::VertexAttribI4uiv(GLuint indx
, const GLuint
* values
) {
1183 NOTREACHED() << "Unimplemented VertexAttribI4uiv.";
1185 void MojoGLES2Impl::VertexAttribIPointer(GLuint indx
,
1190 NOTREACHED() << "Unimplemented VertexAttribIPointer.";
1192 void MojoGLES2Impl::VertexAttribPointer(GLuint indx
,
1195 GLboolean normalized
,
1198 MojoGLES2MakeCurrent(context_
);
1199 glVertexAttribPointer(indx
, size
, type
, normalized
, stride
, ptr
);
1201 void MojoGLES2Impl::Viewport(GLint x
, GLint y
, GLsizei width
, GLsizei height
) {
1202 MojoGLES2MakeCurrent(context_
);
1203 glViewport(x
, y
, width
, height
);
1205 void MojoGLES2Impl::WaitSync(GLsync sync
, GLbitfield flags
, GLuint64 timeout
) {
1206 NOTREACHED() << "Unimplemented WaitSync.";
1208 void MojoGLES2Impl::BlitFramebufferCHROMIUM(GLint srcX0
,
1218 MojoGLES2MakeCurrent(context_
);
1219 glBlitFramebufferCHROMIUM(srcX0
, srcY0
, srcX1
, srcY1
, dstX0
, dstY0
, dstX1
,
1220 dstY1
, mask
, filter
);
1222 void MojoGLES2Impl::RenderbufferStorageMultisampleCHROMIUM(
1225 GLenum internalformat
,
1228 MojoGLES2MakeCurrent(context_
);
1229 glRenderbufferStorageMultisampleCHROMIUM(target
, samples
, internalformat
,
1232 void MojoGLES2Impl::RenderbufferStorageMultisampleEXT(GLenum target
,
1234 GLenum internalformat
,
1237 MojoGLES2MakeCurrent(context_
);
1238 glRenderbufferStorageMultisampleEXT(target
, samples
, internalformat
, width
,
1241 void MojoGLES2Impl::FramebufferTexture2DMultisampleEXT(GLenum target
,
1247 MojoGLES2MakeCurrent(context_
);
1248 glFramebufferTexture2DMultisampleEXT(target
, attachment
, textarget
, texture
,
1251 void MojoGLES2Impl::TexStorage2DEXT(GLenum target
,
1253 GLenum internalFormat
,
1256 MojoGLES2MakeCurrent(context_
);
1257 glTexStorage2DEXT(target
, levels
, internalFormat
, width
, height
);
1259 void MojoGLES2Impl::GenQueriesEXT(GLsizei n
, GLuint
* queries
) {
1260 MojoGLES2MakeCurrent(context_
);
1261 glGenQueriesEXT(n
, queries
);
1263 void MojoGLES2Impl::DeleteQueriesEXT(GLsizei n
, const GLuint
* queries
) {
1264 MojoGLES2MakeCurrent(context_
);
1265 glDeleteQueriesEXT(n
, queries
);
1267 void MojoGLES2Impl::QueryCounterEXT(GLuint id
, GLenum target
) {
1268 MojoGLES2MakeCurrent(context_
);
1269 glQueryCounterEXT(id
, target
);
1271 GLboolean
MojoGLES2Impl::IsQueryEXT(GLuint id
) {
1272 MojoGLES2MakeCurrent(context_
);
1273 return glIsQueryEXT(id
);
1275 void MojoGLES2Impl::BeginQueryEXT(GLenum target
, GLuint id
) {
1276 MojoGLES2MakeCurrent(context_
);
1277 glBeginQueryEXT(target
, id
);
1279 void MojoGLES2Impl::BeginTransformFeedback(GLenum primitivemode
) {
1280 NOTREACHED() << "Unimplemented BeginTransformFeedback.";
1282 void MojoGLES2Impl::EndQueryEXT(GLenum target
) {
1283 MojoGLES2MakeCurrent(context_
);
1284 glEndQueryEXT(target
);
1286 void MojoGLES2Impl::EndTransformFeedback() {
1287 NOTREACHED() << "Unimplemented EndTransformFeedback.";
1289 void MojoGLES2Impl::GetQueryivEXT(GLenum target
, GLenum pname
, GLint
* params
) {
1290 MojoGLES2MakeCurrent(context_
);
1291 glGetQueryivEXT(target
, pname
, params
);
1293 void MojoGLES2Impl::GetQueryObjectivEXT(GLuint id
,
1296 MojoGLES2MakeCurrent(context_
);
1297 glGetQueryObjectivEXT(id
, pname
, params
);
1299 void MojoGLES2Impl::GetQueryObjectuivEXT(GLuint id
,
1302 MojoGLES2MakeCurrent(context_
);
1303 glGetQueryObjectuivEXT(id
, pname
, params
);
1305 void MojoGLES2Impl::GetQueryObjecti64vEXT(GLuint id
,
1308 MojoGLES2MakeCurrent(context_
);
1309 glGetQueryObjecti64vEXT(id
, pname
, params
);
1311 void MojoGLES2Impl::GetQueryObjectui64vEXT(GLuint id
,
1314 MojoGLES2MakeCurrent(context_
);
1315 glGetQueryObjectui64vEXT(id
, pname
, params
);
1317 void MojoGLES2Impl::SetDisjointValueSyncCHROMIUM() {
1318 MojoGLES2MakeCurrent(context_
);
1319 glSetDisjointValueSyncCHROMIUM();
1321 void MojoGLES2Impl::InsertEventMarkerEXT(GLsizei length
, const GLchar
* marker
) {
1322 MojoGLES2MakeCurrent(context_
);
1323 glInsertEventMarkerEXT(length
, marker
);
1325 void MojoGLES2Impl::PushGroupMarkerEXT(GLsizei length
, const GLchar
* marker
) {
1326 MojoGLES2MakeCurrent(context_
);
1327 glPushGroupMarkerEXT(length
, marker
);
1329 void MojoGLES2Impl::PopGroupMarkerEXT() {
1330 MojoGLES2MakeCurrent(context_
);
1331 glPopGroupMarkerEXT();
1333 void MojoGLES2Impl::GenVertexArraysOES(GLsizei n
, GLuint
* arrays
) {
1334 MojoGLES2MakeCurrent(context_
);
1335 glGenVertexArraysOES(n
, arrays
);
1337 void MojoGLES2Impl::DeleteVertexArraysOES(GLsizei n
, const GLuint
* arrays
) {
1338 MojoGLES2MakeCurrent(context_
);
1339 glDeleteVertexArraysOES(n
, arrays
);
1341 GLboolean
MojoGLES2Impl::IsVertexArrayOES(GLuint array
) {
1342 MojoGLES2MakeCurrent(context_
);
1343 return glIsVertexArrayOES(array
);
1345 void MojoGLES2Impl::BindVertexArrayOES(GLuint array
) {
1346 MojoGLES2MakeCurrent(context_
);
1347 glBindVertexArrayOES(array
);
1349 void MojoGLES2Impl::SwapBuffers() {
1350 MojoGLES2MakeCurrent(context_
);
1353 GLuint
MojoGLES2Impl::GetMaxValueInBufferCHROMIUM(GLuint buffer_id
,
1357 MojoGLES2MakeCurrent(context_
);
1358 return glGetMaxValueInBufferCHROMIUM(buffer_id
, count
, type
, offset
);
1360 GLboolean
MojoGLES2Impl::EnableFeatureCHROMIUM(const char* feature
) {
1361 MojoGLES2MakeCurrent(context_
);
1362 return glEnableFeatureCHROMIUM(feature
);
1364 void* MojoGLES2Impl::MapBufferCHROMIUM(GLuint target
, GLenum access
) {
1365 MojoGLES2MakeCurrent(context_
);
1366 return glMapBufferCHROMIUM(target
, access
);
1368 GLboolean
MojoGLES2Impl::UnmapBufferCHROMIUM(GLuint target
) {
1369 MojoGLES2MakeCurrent(context_
);
1370 return glUnmapBufferCHROMIUM(target
);
1372 void* MojoGLES2Impl::MapBufferSubDataCHROMIUM(GLuint target
,
1376 MojoGLES2MakeCurrent(context_
);
1377 return glMapBufferSubDataCHROMIUM(target
, offset
, size
, access
);
1379 void MojoGLES2Impl::UnmapBufferSubDataCHROMIUM(const void* mem
) {
1380 MojoGLES2MakeCurrent(context_
);
1381 glUnmapBufferSubDataCHROMIUM(mem
);
1383 void* MojoGLES2Impl::MapBufferRange(GLenum target
,
1386 GLbitfield access
) {
1387 NOTREACHED() << "Unimplemented MapBufferRange.";
1390 GLboolean
MojoGLES2Impl::UnmapBuffer(GLenum target
) {
1391 NOTREACHED() << "Unimplemented UnmapBuffer.";
1394 void* MojoGLES2Impl::MapTexSubImage2DCHROMIUM(GLenum target
,
1403 MojoGLES2MakeCurrent(context_
);
1404 return glMapTexSubImage2DCHROMIUM(target
, level
, xoffset
, yoffset
, width
,
1405 height
, format
, type
, access
);
1407 void MojoGLES2Impl::UnmapTexSubImage2DCHROMIUM(const void* mem
) {
1408 MojoGLES2MakeCurrent(context_
);
1409 glUnmapTexSubImage2DCHROMIUM(mem
);
1411 void MojoGLES2Impl::ResizeCHROMIUM(GLuint width
,
1413 GLfloat scale_factor
) {
1414 MojoGLES2MakeCurrent(context_
);
1415 glResizeCHROMIUM(width
, height
, scale_factor
);
1417 const GLchar
* MojoGLES2Impl::GetRequestableExtensionsCHROMIUM() {
1418 MojoGLES2MakeCurrent(context_
);
1419 return glGetRequestableExtensionsCHROMIUM();
1421 void MojoGLES2Impl::RequestExtensionCHROMIUM(const char* extension
) {
1422 MojoGLES2MakeCurrent(context_
);
1423 glRequestExtensionCHROMIUM(extension
);
1425 void MojoGLES2Impl::RateLimitOffscreenContextCHROMIUM() {
1426 MojoGLES2MakeCurrent(context_
);
1427 glRateLimitOffscreenContextCHROMIUM();
1429 void MojoGLES2Impl::GetProgramInfoCHROMIUM(GLuint program
,
1433 MojoGLES2MakeCurrent(context_
);
1434 glGetProgramInfoCHROMIUM(program
, bufsize
, size
, info
);
1436 void MojoGLES2Impl::GetUniformBlocksCHROMIUM(GLuint program
,
1440 NOTREACHED() << "Unimplemented GetUniformBlocksCHROMIUM.";
1442 void MojoGLES2Impl::GetTransformFeedbackVaryingsCHROMIUM(GLuint program
,
1446 NOTREACHED() << "Unimplemented GetTransformFeedbackVaryingsCHROMIUM.";
1448 void MojoGLES2Impl::GetUniformsES3CHROMIUM(GLuint program
,
1452 NOTREACHED() << "Unimplemented GetUniformsES3CHROMIUM.";
1454 GLuint
MojoGLES2Impl::CreateStreamTextureCHROMIUM(GLuint texture
) {
1455 MojoGLES2MakeCurrent(context_
);
1456 return glCreateStreamTextureCHROMIUM(texture
);
1458 GLuint
MojoGLES2Impl::CreateImageCHROMIUM(ClientBuffer buffer
,
1461 GLenum internalformat
) {
1462 MojoGLES2MakeCurrent(context_
);
1463 return glCreateImageCHROMIUM(buffer
, width
, height
, internalformat
);
1465 void MojoGLES2Impl::DestroyImageCHROMIUM(GLuint image_id
) {
1466 MojoGLES2MakeCurrent(context_
);
1467 glDestroyImageCHROMIUM(image_id
);
1469 GLuint
MojoGLES2Impl::CreateGpuMemoryBufferImageCHROMIUM(GLsizei width
,
1471 GLenum internalformat
,
1473 MojoGLES2MakeCurrent(context_
);
1474 return glCreateGpuMemoryBufferImageCHROMIUM(width
, height
, internalformat
,
1477 void MojoGLES2Impl::GetTranslatedShaderSourceANGLE(GLuint shader
,
1481 MojoGLES2MakeCurrent(context_
);
1482 glGetTranslatedShaderSourceANGLE(shader
, bufsize
, length
, source
);
1484 void MojoGLES2Impl::PostSubBufferCHROMIUM(GLint x
,
1488 MojoGLES2MakeCurrent(context_
);
1489 glPostSubBufferCHROMIUM(x
, y
, width
, height
);
1491 void MojoGLES2Impl::TexImageIOSurface2DCHROMIUM(GLenum target
,
1496 MojoGLES2MakeCurrent(context_
);
1497 glTexImageIOSurface2DCHROMIUM(target
, width
, height
, ioSurfaceId
, plane
);
1499 void MojoGLES2Impl::CopyTextureCHROMIUM(GLenum target
,
1502 GLint internalformat
,
1504 GLboolean unpack_flip_y
,
1505 GLboolean unpack_premultiply_alpha
,
1506 GLboolean unpack_unmultiply_alpha
) {
1507 MojoGLES2MakeCurrent(context_
);
1508 glCopyTextureCHROMIUM(target
, source_id
, dest_id
, internalformat
, dest_type
,
1509 unpack_flip_y
, unpack_premultiply_alpha
,
1510 unpack_unmultiply_alpha
);
1512 void MojoGLES2Impl::CopySubTextureCHROMIUM(GLenum target
,
1521 GLboolean unpack_flip_y
,
1522 GLboolean unpack_premultiply_alpha
,
1523 GLboolean unpack_unmultiply_alpha
) {
1524 MojoGLES2MakeCurrent(context_
);
1525 glCopySubTextureCHROMIUM(target
, source_id
, dest_id
, xoffset
, yoffset
, x
, y
,
1526 width
, height
, unpack_flip_y
,
1527 unpack_premultiply_alpha
, unpack_unmultiply_alpha
);
1529 void MojoGLES2Impl::CompressedCopyTextureCHROMIUM(GLenum target
,
1532 MojoGLES2MakeCurrent(context_
);
1533 glCompressedCopyTextureCHROMIUM(target
, source_id
, dest_id
);
1535 void MojoGLES2Impl::CompressedCopySubTextureCHROMIUM(GLenum target
,
1544 MojoGLES2MakeCurrent(context_
);
1545 glCompressedCopySubTextureCHROMIUM(target
, source_id
, dest_id
, xoffset
,
1546 yoffset
, x
, y
, width
, height
);
1548 void MojoGLES2Impl::DrawArraysInstancedANGLE(GLenum mode
,
1551 GLsizei primcount
) {
1552 MojoGLES2MakeCurrent(context_
);
1553 glDrawArraysInstancedANGLE(mode
, first
, count
, primcount
);
1555 void MojoGLES2Impl::DrawElementsInstancedANGLE(GLenum mode
,
1558 const void* indices
,
1559 GLsizei primcount
) {
1560 MojoGLES2MakeCurrent(context_
);
1561 glDrawElementsInstancedANGLE(mode
, count
, type
, indices
, primcount
);
1563 void MojoGLES2Impl::VertexAttribDivisorANGLE(GLuint index
, GLuint divisor
) {
1564 MojoGLES2MakeCurrent(context_
);
1565 glVertexAttribDivisorANGLE(index
, divisor
);
1567 void MojoGLES2Impl::GenMailboxCHROMIUM(GLbyte
* mailbox
) {
1568 MojoGLES2MakeCurrent(context_
);
1569 glGenMailboxCHROMIUM(mailbox
);
1571 void MojoGLES2Impl::ProduceTextureCHROMIUM(GLenum target
,
1572 const GLbyte
* mailbox
) {
1573 MojoGLES2MakeCurrent(context_
);
1574 glProduceTextureCHROMIUM(target
, mailbox
);
1576 void MojoGLES2Impl::ProduceTextureDirectCHROMIUM(GLuint texture
,
1578 const GLbyte
* mailbox
) {
1579 MojoGLES2MakeCurrent(context_
);
1580 glProduceTextureDirectCHROMIUM(texture
, target
, mailbox
);
1582 void MojoGLES2Impl::ConsumeTextureCHROMIUM(GLenum target
,
1583 const GLbyte
* mailbox
) {
1584 MojoGLES2MakeCurrent(context_
);
1585 glConsumeTextureCHROMIUM(target
, mailbox
);
1587 GLuint
MojoGLES2Impl::CreateAndConsumeTextureCHROMIUM(GLenum target
,
1588 const GLbyte
* mailbox
) {
1589 MojoGLES2MakeCurrent(context_
);
1590 return glCreateAndConsumeTextureCHROMIUM(target
, mailbox
);
1592 void MojoGLES2Impl::BindUniformLocationCHROMIUM(GLuint program
,
1595 MojoGLES2MakeCurrent(context_
);
1596 glBindUniformLocationCHROMIUM(program
, location
, name
);
1598 void MojoGLES2Impl::GenValuebuffersCHROMIUM(GLsizei n
, GLuint
* buffers
) {
1599 MojoGLES2MakeCurrent(context_
);
1600 glGenValuebuffersCHROMIUM(n
, buffers
);
1602 void MojoGLES2Impl::DeleteValuebuffersCHROMIUM(GLsizei n
,
1603 const GLuint
* valuebuffers
) {
1604 MojoGLES2MakeCurrent(context_
);
1605 glDeleteValuebuffersCHROMIUM(n
, valuebuffers
);
1607 GLboolean
MojoGLES2Impl::IsValuebufferCHROMIUM(GLuint valuebuffer
) {
1608 MojoGLES2MakeCurrent(context_
);
1609 return glIsValuebufferCHROMIUM(valuebuffer
);
1611 void MojoGLES2Impl::BindValuebufferCHROMIUM(GLenum target
, GLuint valuebuffer
) {
1612 MojoGLES2MakeCurrent(context_
);
1613 glBindValuebufferCHROMIUM(target
, valuebuffer
);
1615 void MojoGLES2Impl::SubscribeValueCHROMIUM(GLenum target
, GLenum subscription
) {
1616 MojoGLES2MakeCurrent(context_
);
1617 glSubscribeValueCHROMIUM(target
, subscription
);
1619 void MojoGLES2Impl::PopulateSubscribedValuesCHROMIUM(GLenum target
) {
1620 MojoGLES2MakeCurrent(context_
);
1621 glPopulateSubscribedValuesCHROMIUM(target
);
1623 void MojoGLES2Impl::UniformValuebufferCHROMIUM(GLint location
,
1625 GLenum subscription
) {
1626 MojoGLES2MakeCurrent(context_
);
1627 glUniformValuebufferCHROMIUM(location
, target
, subscription
);
1629 void MojoGLES2Impl::BindTexImage2DCHROMIUM(GLenum target
, GLint imageId
) {
1630 MojoGLES2MakeCurrent(context_
);
1631 glBindTexImage2DCHROMIUM(target
, imageId
);
1633 void MojoGLES2Impl::ReleaseTexImage2DCHROMIUM(GLenum target
, GLint imageId
) {
1634 MojoGLES2MakeCurrent(context_
);
1635 glReleaseTexImage2DCHROMIUM(target
, imageId
);
1637 void MojoGLES2Impl::TraceBeginCHROMIUM(const char* category_name
,
1638 const char* trace_name
) {
1639 MojoGLES2MakeCurrent(context_
);
1640 glTraceBeginCHROMIUM(category_name
, trace_name
);
1642 void MojoGLES2Impl::TraceEndCHROMIUM() {
1643 MojoGLES2MakeCurrent(context_
);
1644 glTraceEndCHROMIUM();
1646 void MojoGLES2Impl::DiscardFramebufferEXT(GLenum target
,
1648 const GLenum
* attachments
) {
1649 MojoGLES2MakeCurrent(context_
);
1650 glDiscardFramebufferEXT(target
, count
, attachments
);
1652 void MojoGLES2Impl::LoseContextCHROMIUM(GLenum current
, GLenum other
) {
1653 MojoGLES2MakeCurrent(context_
);
1654 glLoseContextCHROMIUM(current
, other
);
1656 GLuint
MojoGLES2Impl::InsertSyncPointCHROMIUM() {
1657 MojoGLES2MakeCurrent(context_
);
1658 return glInsertSyncPointCHROMIUM();
1660 void MojoGLES2Impl::WaitSyncPointCHROMIUM(GLuint sync_point
) {
1661 MojoGLES2MakeCurrent(context_
);
1662 glWaitSyncPointCHROMIUM(sync_point
);
1664 void MojoGLES2Impl::DrawBuffersEXT(GLsizei count
, const GLenum
* bufs
) {
1665 MojoGLES2MakeCurrent(context_
);
1666 glDrawBuffersEXT(count
, bufs
);
1668 void MojoGLES2Impl::DiscardBackbufferCHROMIUM() {
1669 MojoGLES2MakeCurrent(context_
);
1670 glDiscardBackbufferCHROMIUM();
1672 void MojoGLES2Impl::ScheduleOverlayPlaneCHROMIUM(GLint plane_z_order
,
1673 GLenum plane_transform
,
1674 GLuint overlay_texture_id
,
1678 GLint bounds_height
,
1682 GLfloat uv_height
) {
1683 MojoGLES2MakeCurrent(context_
);
1684 glScheduleOverlayPlaneCHROMIUM(
1685 plane_z_order
, plane_transform
, overlay_texture_id
, bounds_x
, bounds_y
,
1686 bounds_width
, bounds_height
, uv_x
, uv_y
, uv_width
, uv_height
);
1688 void MojoGLES2Impl::SwapInterval(GLint interval
) {
1689 MojoGLES2MakeCurrent(context_
);
1690 glSwapInterval(interval
);
1692 void MojoGLES2Impl::FlushDriverCachesCHROMIUM() {
1693 MojoGLES2MakeCurrent(context_
);
1694 glFlushDriverCachesCHROMIUM();
1696 void MojoGLES2Impl::MatrixLoadfCHROMIUM(GLenum matrixMode
, const GLfloat
* m
) {
1697 MojoGLES2MakeCurrent(context_
);
1698 glMatrixLoadfCHROMIUM(matrixMode
, m
);
1700 void MojoGLES2Impl::MatrixLoadIdentityCHROMIUM(GLenum matrixMode
) {
1701 MojoGLES2MakeCurrent(context_
);
1702 glMatrixLoadIdentityCHROMIUM(matrixMode
);
1704 GLuint
MojoGLES2Impl::GenPathsCHROMIUM(GLsizei range
) {
1705 MojoGLES2MakeCurrent(context_
);
1706 return glGenPathsCHROMIUM(range
);
1708 void MojoGLES2Impl::DeletePathsCHROMIUM(GLuint path
, GLsizei range
) {
1709 MojoGLES2MakeCurrent(context_
);
1710 glDeletePathsCHROMIUM(path
, range
);
1712 GLboolean
MojoGLES2Impl::IsPathCHROMIUM(GLuint path
) {
1713 MojoGLES2MakeCurrent(context_
);
1714 return glIsPathCHROMIUM(path
);
1716 void MojoGLES2Impl::PathCommandsCHROMIUM(GLuint path
,
1717 GLsizei numCommands
,
1718 const GLubyte
* commands
,
1721 const GLvoid
* coords
) {
1722 MojoGLES2MakeCurrent(context_
);
1723 glPathCommandsCHROMIUM(path
, numCommands
, commands
, numCoords
, coordType
,
1726 void MojoGLES2Impl::PathParameterfCHROMIUM(GLuint path
,
1729 MojoGLES2MakeCurrent(context_
);
1730 glPathParameterfCHROMIUM(path
, pname
, value
);
1732 void MojoGLES2Impl::PathParameteriCHROMIUM(GLuint path
,
1735 MojoGLES2MakeCurrent(context_
);
1736 glPathParameteriCHROMIUM(path
, pname
, value
);
1738 void MojoGLES2Impl::PathStencilFuncCHROMIUM(GLenum func
,
1741 MojoGLES2MakeCurrent(context_
);
1742 glPathStencilFuncCHROMIUM(func
, ref
, mask
);
1744 void MojoGLES2Impl::StencilFillPathCHROMIUM(GLuint path
,
1747 MojoGLES2MakeCurrent(context_
);
1748 glStencilFillPathCHROMIUM(path
, fillMode
, mask
);
1750 void MojoGLES2Impl::StencilStrokePathCHROMIUM(GLuint path
,
1753 MojoGLES2MakeCurrent(context_
);
1754 glStencilStrokePathCHROMIUM(path
, reference
, mask
);
1756 void MojoGLES2Impl::CoverFillPathCHROMIUM(GLuint path
, GLenum coverMode
) {
1757 MojoGLES2MakeCurrent(context_
);
1758 glCoverFillPathCHROMIUM(path
, coverMode
);
1760 void MojoGLES2Impl::CoverStrokePathCHROMIUM(GLuint path
, GLenum coverMode
) {
1761 MojoGLES2MakeCurrent(context_
);
1762 glCoverStrokePathCHROMIUM(path
, coverMode
);
1764 void MojoGLES2Impl::StencilThenCoverFillPathCHROMIUM(GLuint path
,
1768 MojoGLES2MakeCurrent(context_
);
1769 glStencilThenCoverFillPathCHROMIUM(path
, fillMode
, mask
, coverMode
);
1771 void MojoGLES2Impl::StencilThenCoverStrokePathCHROMIUM(GLuint path
,
1775 MojoGLES2MakeCurrent(context_
);
1776 glStencilThenCoverStrokePathCHROMIUM(path
, reference
, mask
, coverMode
);
1778 GLenum
MojoGLES2Impl::GetGraphicsResetStatusKHR() {
1779 MojoGLES2MakeCurrent(context_
);
1780 return glGetGraphicsResetStatusKHR();
1782 void MojoGLES2Impl::BlendBarrierKHR() {
1783 MojoGLES2MakeCurrent(context_
);
1784 glBlendBarrierKHR();
1786 void MojoGLES2Impl::ApplyScreenSpaceAntialiasingCHROMIUM() {
1787 MojoGLES2MakeCurrent(context_
);
1788 glApplyScreenSpaceAntialiasingCHROMIUM();