1 // Copyright (c) 2011 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.
6 #include "webkit/glue/gl_bindings_skia_cmd_buffer.h"
8 #ifndef GL_GLEXT_PROTOTYPES
9 #define GL_GLEXT_PROTOTYPES
11 #include "third_party/khronos/GLES2/gl2.h"
12 #include "third_party/khronos/GLES2/gl2ext.h"
13 #include "third_party/skia/include/gpu/gl/GrGLInterface.h"
15 namespace webkit_glue
{
17 GrGLInterface
* CreateCommandBufferSkiaGLBinding() {
18 GrGLInterface
* interface
= new GrGLInterface
;
19 interface
->fBindingsExported
= kES2_GrGLBinding
;
20 interface
->fActiveTexture
= glActiveTexture
;
21 interface
->fAttachShader
= glAttachShader
;
22 interface
->fBindAttribLocation
= glBindAttribLocation
;
23 interface
->fBindBuffer
= glBindBuffer
;
24 interface
->fBindTexture
= glBindTexture
;
25 interface
->fBlendColor
= glBlendColor
;
26 interface
->fBlendFunc
= glBlendFunc
;
27 interface
->fBufferData
= glBufferData
;
28 interface
->fBufferSubData
= glBufferSubData
;
29 interface
->fClear
= glClear
;
30 interface
->fClearColor
= glClearColor
;
31 interface
->fClearStencil
= glClearStencil
;
32 interface
->fColorMask
= glColorMask
;
33 interface
->fCompileShader
= glCompileShader
;
34 interface
->fCompressedTexImage2D
= glCompressedTexImage2D
;
35 interface
->fCreateProgram
= glCreateProgram
;
36 interface
->fCreateShader
= glCreateShader
;
37 interface
->fCullFace
= glCullFace
;
38 interface
->fDeleteBuffers
= glDeleteBuffers
;
39 interface
->fDeleteProgram
= glDeleteProgram
;
40 interface
->fDeleteShader
= glDeleteShader
;
41 interface
->fDeleteTextures
= glDeleteTextures
;
42 interface
->fDepthMask
= glDepthMask
;
43 interface
->fDisable
= glDisable
;
44 interface
->fDisableVertexAttribArray
= glDisableVertexAttribArray
;
45 interface
->fDrawArrays
= glDrawArrays
;
46 interface
->fDrawElements
= glDrawElements
;
47 interface
->fEnable
= glEnable
;
48 interface
->fEnableVertexAttribArray
= glEnableVertexAttribArray
;
49 interface
->fFinish
= glFinish
;
50 interface
->fFlush
= glFlush
;
51 interface
->fFrontFace
= glFrontFace
;
52 interface
->fGenBuffers
= glGenBuffers
;
53 interface
->fGenTextures
= glGenTextures
;
54 interface
->fGetBufferParameteriv
= glGetBufferParameteriv
;
55 interface
->fGetError
= glGetError
;
56 interface
->fGetIntegerv
= glGetIntegerv
;
57 interface
->fGetProgramInfoLog
= glGetProgramInfoLog
;
58 interface
->fGetProgramiv
= glGetProgramiv
;
59 interface
->fGetShaderInfoLog
= glGetShaderInfoLog
;
60 interface
->fGetShaderiv
= glGetShaderiv
;
61 interface
->fGetString
= glGetString
;
62 interface
->fGetUniformLocation
= glGetUniformLocation
;
63 interface
->fLineWidth
= glLineWidth
;
64 interface
->fLinkProgram
= glLinkProgram
;
65 interface
->fPixelStorei
= glPixelStorei
;
66 interface
->fReadPixels
= glReadPixels
;
67 interface
->fScissor
= glScissor
;
68 interface
->fShaderSource
= glShaderSource
;
69 interface
->fStencilFunc
= glStencilFunc
;
70 interface
->fStencilFuncSeparate
= glStencilFuncSeparate
;
71 interface
->fStencilMask
= glStencilMask
;
72 interface
->fStencilMaskSeparate
= glStencilMaskSeparate
;
73 interface
->fStencilOp
= glStencilOp
;
74 interface
->fStencilOpSeparate
= glStencilOpSeparate
;
75 interface
->fTexImage2D
= glTexImage2D
;
76 interface
->fTexParameteri
= glTexParameteri
;
77 interface
->fTexParameteriv
= glTexParameteriv
;
78 interface
->fTexStorage2D
= glTexStorage2DEXT
;
79 interface
->fTexSubImage2D
= glTexSubImage2D
;
80 interface
->fUniform1f
= glUniform1f
;
81 interface
->fUniform1i
= glUniform1i
;
82 interface
->fUniform1fv
= glUniform1fv
;
83 interface
->fUniform1iv
= glUniform1iv
;
84 interface
->fUniform2f
= glUniform2f
;
85 interface
->fUniform2i
= glUniform2i
;
86 interface
->fUniform2fv
= glUniform2fv
;
87 interface
->fUniform2iv
= glUniform2iv
;
88 interface
->fUniform3f
= glUniform3f
;
89 interface
->fUniform3i
= glUniform3i
;
90 interface
->fUniform3fv
= glUniform3fv
;
91 interface
->fUniform3iv
= glUniform3iv
;
92 interface
->fUniform4f
= glUniform4f
;
93 interface
->fUniform4i
= glUniform4i
;
94 interface
->fUniform4fv
= glUniform4fv
;
95 interface
->fUniform4iv
= glUniform4iv
;
96 interface
->fUniformMatrix2fv
= glUniformMatrix2fv
;
97 interface
->fUniformMatrix3fv
= glUniformMatrix3fv
;
98 interface
->fUniformMatrix4fv
= glUniformMatrix4fv
;
99 interface
->fUseProgram
= glUseProgram
;
100 interface
->fVertexAttrib4fv
= glVertexAttrib4fv
;
101 interface
->fVertexAttribPointer
= glVertexAttribPointer
;
102 interface
->fViewport
= glViewport
;
103 interface
->fBindFramebuffer
= glBindFramebuffer
;
104 interface
->fBindRenderbuffer
= glBindRenderbuffer
;
105 interface
->fCheckFramebufferStatus
= glCheckFramebufferStatus
;
106 interface
->fDeleteFramebuffers
= glDeleteFramebuffers
;
107 interface
->fDeleteRenderbuffers
= glDeleteRenderbuffers
;
108 interface
->fFramebufferRenderbuffer
= glFramebufferRenderbuffer
;
109 interface
->fFramebufferTexture2D
= glFramebufferTexture2D
;
110 interface
->fGenFramebuffers
= glGenFramebuffers
;
111 interface
->fGenRenderbuffers
= glGenRenderbuffers
;
112 interface
->fGetFramebufferAttachmentParameteriv
=
113 glGetFramebufferAttachmentParameteriv
;
114 interface
->fGetRenderbufferParameteriv
= glGetRenderbufferParameteriv
;
115 interface
->fRenderbufferStorage
= glRenderbufferStorage
;
116 interface
->fRenderbufferStorageMultisample
=
117 glRenderbufferStorageMultisampleEXT
;
118 interface
->fBlitFramebuffer
= glBlitFramebufferEXT
;
122 } // namespace webkit_glue