OLD | NEW |
| (Empty) |
1 // Copyright (c) 2009 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 implements glue to a GL interface so we can mock it for unit | |
6 // testing. It has to be Desktop GL, not GLES2 as it is used to test the service | |
7 // side code. | |
8 | |
9 #ifndef GPU_COMMAND_BUFFER_SERVICE_GL_INTERFACE_H_ | |
10 #define GPU_COMMAND_BUFFER_SERVICE_GL_INTERFACE_H_ | |
11 | |
12 #include <GLES2/gl2types.h> | |
13 | |
14 // These are Desktop GL constants that we want to test that our GLES2 | |
15 // implemenation does not let through. | |
16 #define GL_PROXY_TEXTURE_CUBE_MAP 0x851B | |
17 #define GL_BGR 0x80E0 | |
18 #define GL_BGRA 0x80E1 | |
19 #define GL_UNPACK_SWAP_BYTES 0x0CF0 | |
20 #define GL_PACK_SWAP_BYTES 0x0D00 | |
21 #define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 | |
22 #define GL_QUADS 0x0007 | |
23 #define GL_POLYGON 0x0009 | |
24 #define GL_FOG 0x0B60 | |
25 #define GL_CLIP_PLANE0 0x3000 | |
26 #define GL_GENERATE_MIPMAP 0x8191 | |
27 #define GL_PIXEL_PACK_BUFFER 0x88EB | |
28 #define GL_POINT_SPRITE 0x8861 | |
29 #define GL_MIN 0x8007 | |
30 #define GL_MAX 0x8008 | |
31 #define GL_TEXTURE_1D 0x0DE0 | |
32 #define GL_TEXTURE_3D 0x806F | |
33 #define GL_DOUBLE 0x140A | |
34 #define GL_GEOMETRY_SHADER 0x8DD9 | |
35 #define GL_FOG_HINT 0x0C54 | |
36 | |
37 namespace gles2 { | |
38 | |
39 class GLInterface { | |
40 public: | |
41 virtual ~GLInterface() { | |
42 } | |
43 | |
44 static void SetGLInterface(GLInterface* gl_interface); | |
45 | |
46 static GLInterface* GetGLInterface(); | |
47 | |
48 virtual void ActiveTexture(GLenum texture) = 0; | |
49 | |
50 virtual void AttachShader(GLuint program, GLuint shader) = 0; | |
51 | |
52 virtual void BindAttribLocation( | |
53 GLuint program, GLuint index, const char* name) = 0; | |
54 | |
55 virtual void BindBuffer(GLenum target, GLuint buffer) = 0; | |
56 | |
57 virtual void BindFramebufferEXT(GLenum target, GLuint framebuffer) = 0; | |
58 | |
59 virtual void BindRenderbufferEXT(GLenum target, GLuint renderbuffer) = 0; | |
60 | |
61 virtual void BindTexture(GLenum target, GLuint texture) = 0; | |
62 | |
63 virtual void BlendColor( | |
64 GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) = 0; | |
65 | |
66 virtual void BlendEquation(GLenum mode) = 0; | |
67 | |
68 virtual void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) = 0; | |
69 | |
70 virtual void BlendFunc(GLenum sfactor, GLenum dfactor) = 0; | |
71 | |
72 virtual void BlendFuncSeparate( | |
73 GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) = 0; | |
74 | |
75 virtual void BufferData( | |
76 GLenum target, GLsizeiptr size, const void* data, GLenum usage) = 0; | |
77 | |
78 virtual void BufferSubData( | |
79 GLenum target, GLintptr offset, GLsizeiptr size, const void* data) = 0; | |
80 | |
81 virtual GLenum CheckFramebufferStatusEXT(GLenum target) = 0; | |
82 | |
83 virtual void Clear(GLbitfield mask) = 0; | |
84 | |
85 virtual void ClearColor( | |
86 GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) = 0; | |
87 | |
88 virtual void ClearDepth(GLclampf depth) = 0; | |
89 | |
90 virtual void ClearStencil(GLint s) = 0; | |
91 | |
92 virtual void ColorMask( | |
93 GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) = 0; | |
94 | |
95 virtual void CompileShader(GLuint shader) = 0; | |
96 | |
97 virtual void CompressedTexImage2D( | |
98 GLenum target, GLint level, GLenum internalformat, GLsizei width, | |
99 GLsizei height, GLint border, GLsizei imageSize, const void* data) = 0; | |
100 | |
101 virtual void CompressedTexSubImage2D( | |
102 GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, | |
103 GLsizei height, GLenum format, GLsizei imageSize, const void* data) = 0; | |
104 | |
105 virtual void CopyTexImage2D( | |
106 GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, | |
107 GLsizei width, GLsizei height, GLint border) = 0; | |
108 | |
109 virtual void CopyTexSubImage2D( | |
110 GLenum target, GLint level, GLint xoffset, GLint yoffset, | |
111 GLint x, GLint y, GLsizei width, GLsizei height) = 0; | |
112 | |
113 virtual GLuint CreateProgram() = 0; | |
114 | |
115 virtual GLuint CreateShader(GLenum type) = 0; | |
116 | |
117 virtual void CullFace(GLenum mode) = 0; | |
118 | |
119 virtual void DeleteBuffersARB(GLsizei n, const GLuint* buffers) = 0; | |
120 | |
121 virtual void DeleteFramebuffersEXT(GLsizei n, const GLuint* framebuffers) = 0; | |
122 | |
123 virtual void DeleteProgram(GLuint program) = 0; | |
124 | |
125 virtual void DeleteRenderbuffersEXT( | |
126 GLsizei n, const GLuint* renderbuffers) = 0; | |
127 | |
128 virtual void DeleteShader(GLuint shader) = 0; | |
129 | |
130 virtual void DeleteTextures(GLsizei n, const GLuint* textures) = 0; | |
131 | |
132 virtual void DepthFunc(GLenum func) = 0; | |
133 | |
134 virtual void DepthMask(GLboolean flag) = 0; | |
135 | |
136 virtual void DepthRange(GLclampf zNear, GLclampf zFar) = 0; | |
137 | |
138 virtual void DetachShader(GLuint program, GLuint shader) = 0; | |
139 | |
140 virtual void Disable(GLenum cap) = 0; | |
141 | |
142 virtual void DisableVertexAttribArray(GLuint index) = 0; | |
143 | |
144 virtual void DrawArrays(GLenum mode, GLint first, GLsizei count) = 0; | |
145 | |
146 virtual void DrawElements( | |
147 GLenum mode, GLsizei count, GLenum type, const void* indices) = 0; | |
148 | |
149 virtual void Enable(GLenum cap) = 0; | |
150 | |
151 virtual void EnableVertexAttribArray(GLuint index) = 0; | |
152 | |
153 virtual void Finish() = 0; | |
154 | |
155 virtual void Flush() = 0; | |
156 | |
157 virtual void FramebufferRenderbufferEXT( | |
158 GLenum target, GLenum attachment, GLenum renderbuffertarget, | |
159 GLuint renderbuffer) = 0; | |
160 | |
161 virtual void FramebufferTexture2DEXT( | |
162 GLenum target, GLenum attachment, GLenum textarget, GLuint texture, | |
163 GLint level) = 0; | |
164 | |
165 virtual void FrontFace(GLenum mode) = 0; | |
166 | |
167 virtual void GenBuffersARB(GLsizei n, GLuint* buffers) = 0; | |
168 | |
169 virtual void GenerateMipmapEXT(GLenum target) = 0; | |
170 | |
171 virtual void GenFramebuffersEXT(GLsizei n, GLuint* framebuffers) = 0; | |
172 | |
173 virtual void GenRenderbuffersEXT(GLsizei n, GLuint* renderbuffers) = 0; | |
174 | |
175 virtual void GenTextures(GLsizei n, GLuint* textures) = 0; | |
176 | |
177 virtual void GetActiveAttrib( | |
178 GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, | |
179 GLint* size, GLenum* type, char* name) = 0; | |
180 | |
181 virtual void GetActiveUniform( | |
182 GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, | |
183 GLint* size, GLenum* type, char* name) = 0; | |
184 | |
185 virtual void GetAttachedShaders( | |
186 GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) = 0; | |
187 | |
188 virtual GLint GetAttribLocation(GLuint program, const char* name) = 0; | |
189 | |
190 virtual void GetBooleanv(GLenum pname, GLboolean* params) = 0; | |
191 | |
192 virtual void GetBufferParameteriv( | |
193 GLenum target, GLenum pname, GLint* params) = 0; | |
194 | |
195 virtual GLenum GetError() = 0; | |
196 | |
197 virtual void GetFloatv(GLenum pname, GLfloat* params) = 0; | |
198 | |
199 virtual void GetFramebufferAttachmentParameterivEXT( | |
200 GLenum target, GLenum attachment, GLenum pname, GLint* params) = 0; | |
201 | |
202 virtual void GetIntegerv(GLenum pname, GLint* params) = 0; | |
203 | |
204 virtual void GetProgramiv(GLuint program, GLenum pname, GLint* params) = 0; | |
205 | |
206 // TODO(gman): Implement this | |
207 virtual void GetProgramInfoLog( | |
208 GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) = 0; | |
209 | |
210 virtual void GetRenderbufferParameterivEXT( | |
211 GLenum target, GLenum pname, GLint* params) = 0; | |
212 | |
213 virtual void GetShaderiv(GLuint shader, GLenum pname, GLint* params) = 0; | |
214 | |
215 // TODO(gman): Implement this | |
216 virtual void GetShaderInfoLog( | |
217 GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) = 0; | |
218 | |
219 virtual void GetShaderPrecisionFormat( | |
220 GLenum shadertype, GLenum precisiontype, GLint* range, | |
221 GLint* precision) = 0; | |
222 | |
223 // TODO(gman): Implement this | |
224 virtual void GetShaderSource( | |
225 GLuint shader, GLsizei bufsize, GLsizei* length, char* source) = 0; | |
226 | |
227 virtual const GLubyte* GetString(GLenum name) = 0; | |
228 | |
229 virtual void GetTexParameterfv( | |
230 GLenum target, GLenum pname, GLfloat* params) = 0; | |
231 | |
232 virtual void GetTexParameteriv( | |
233 GLenum target, GLenum pname, GLint* params) = 0; | |
234 | |
235 virtual void GetUniformfv( | |
236 GLuint program, GLint location, GLfloat* params) = 0; | |
237 | |
238 virtual void GetUniformiv(GLuint program, GLint location, GLint* params) = 0; | |
239 | |
240 virtual GLint GetUniformLocation(GLuint program, const char* name) = 0; | |
241 | |
242 virtual void GetVertexAttribfv( | |
243 GLuint index, GLenum pname, GLfloat* params) = 0; | |
244 | |
245 virtual void GetVertexAttribiv(GLuint index, GLenum pname, GLint* params) = 0; | |
246 | |
247 virtual void GetVertexAttribPointerv( | |
248 GLuint index, GLenum pname, void** pointer) = 0; | |
249 | |
250 virtual void Hint(GLenum target, GLenum mode) = 0; | |
251 | |
252 virtual GLboolean IsBuffer(GLuint buffer) = 0; | |
253 | |
254 virtual GLboolean IsEnabled(GLenum cap) = 0; | |
255 | |
256 virtual GLboolean IsFramebuffer(GLuint framebuffer) = 0; | |
257 | |
258 virtual GLboolean IsProgram(GLuint program) = 0; | |
259 | |
260 virtual GLboolean IsRenderbuffer(GLuint renderbuffer) = 0; | |
261 | |
262 virtual GLboolean IsShader(GLuint shader) = 0; | |
263 | |
264 virtual GLboolean IsTexture(GLuint texture) = 0; | |
265 | |
266 virtual void LineWidth(GLfloat width) = 0; | |
267 | |
268 virtual void LinkProgram(GLuint program) = 0; | |
269 | |
270 virtual void PixelStorei(GLenum pname, GLint param) = 0; | |
271 | |
272 virtual void PolygonOffset(GLfloat factor, GLfloat units) = 0; | |
273 | |
274 virtual void ReadPixels( | |
275 GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, | |
276 GLenum type, void* pixels) = 0; | |
277 | |
278 virtual void ReleaseShaderCompiler(void) = 0; | |
279 | |
280 virtual void RenderbufferStorageEXT( | |
281 GLenum target, GLenum internalformat, GLsizei width, GLsizei height) = 0; | |
282 | |
283 virtual void SampleCoverage(GLclampf value, GLboolean invert) = 0; | |
284 | |
285 virtual void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) = 0; | |
286 | |
287 virtual void ShaderBinary( | |
288 GLsizei n, const GLuint* shaders, GLenum binaryformat, | |
289 const void* binary, GLsizei length) = 0; | |
290 | |
291 virtual void ShaderSource( | |
292 GLuint shader, GLsizei count, const char** str, const | |
293 GLint* length) = 0; | |
294 | |
295 virtual void StencilFunc(GLenum func, GLint ref, GLuint mask) = 0; | |
296 | |
297 virtual void StencilFuncSeparate( | |
298 GLenum face, GLenum func, GLint ref, GLuint mask) = 0; | |
299 | |
300 virtual void StencilMask(GLuint mask) = 0; | |
301 | |
302 virtual void StencilMaskSeparate(GLenum face, GLuint mask) = 0; | |
303 | |
304 virtual void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) = 0; | |
305 | |
306 virtual void StencilOpSeparate( | |
307 GLenum face, GLenum fail, GLenum zfail, GLenum zpass) = 0; | |
308 | |
309 virtual void TexImage2D( | |
310 GLenum target, GLint level, GLint internalformat, GLsizei width, | |
311 GLsizei height, GLint border, GLenum format, GLenum type, | |
312 const void* pixels) = 0; | |
313 | |
314 virtual void TexParameterf(GLenum target, GLenum pname, GLfloat param) = 0; | |
315 | |
316 virtual void TexParameterfv( | |
317 GLenum target, GLenum pname, const GLfloat* params) = 0; | |
318 | |
319 virtual void TexParameteri(GLenum target, GLenum pname, GLint param) = 0; | |
320 | |
321 virtual void TexParameteriv( | |
322 GLenum target, GLenum pname, const GLint* params) = 0; | |
323 | |
324 virtual void TexSubImage2D( | |
325 GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, | |
326 GLsizei height, GLenum format, GLenum type, const void* pixels) = 0; | |
327 | |
328 virtual void Uniform1f(GLint location, GLfloat x) = 0; | |
329 | |
330 virtual void Uniform1fv(GLint location, GLsizei count, const GLfloat* v) = 0; | |
331 | |
332 virtual void Uniform1i(GLint location, GLint x) = 0; | |
333 | |
334 virtual void Uniform1iv(GLint location, GLsizei count, const GLint* v) = 0; | |
335 | |
336 virtual void Uniform2f(GLint location, GLfloat x, GLfloat y) = 0; | |
337 | |
338 virtual void Uniform2fv(GLint location, GLsizei count, const GLfloat* v) = 0; | |
339 | |
340 virtual void Uniform2i(GLint location, GLint x, GLint y) = 0; | |
341 | |
342 virtual void Uniform2iv(GLint location, GLsizei count, const GLint* v) = 0; | |
343 | |
344 virtual void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) = 0; | |
345 | |
346 virtual void Uniform3fv(GLint location, GLsizei count, const GLfloat* v) = 0; | |
347 | |
348 virtual void Uniform3i(GLint location, GLint x, GLint y, GLint z) = 0; | |
349 | |
350 virtual void Uniform3iv(GLint location, GLsizei count, const GLint* v) = 0; | |
351 | |
352 virtual void Uniform4f( | |
353 GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) = 0; | |
354 | |
355 virtual void Uniform4fv(GLint location, GLsizei count, const GLfloat* v) = 0; | |
356 | |
357 virtual void Uniform4i( | |
358 GLint location, GLint x, GLint y, GLint z, GLint w) = 0; | |
359 | |
360 virtual void Uniform4iv(GLint location, GLsizei count, const GLint* v) = 0; | |
361 | |
362 virtual void UniformMatrix2fv( | |
363 GLint location, GLsizei count, GLboolean transpose, | |
364 const GLfloat* value) = 0; | |
365 | |
366 virtual void UniformMatrix3fv( | |
367 GLint location, GLsizei count, GLboolean transpose, | |
368 const GLfloat* value) = 0; | |
369 | |
370 virtual void UniformMatrix4fv( | |
371 GLint location, GLsizei count, GLboolean transpose, | |
372 const GLfloat* value) = 0; | |
373 | |
374 virtual void UseProgram(GLuint program) = 0; | |
375 | |
376 virtual void ValidateProgram(GLuint program) = 0; | |
377 | |
378 virtual void VertexAttrib1f(GLuint indx, GLfloat x) = 0; | |
379 | |
380 virtual void VertexAttrib1fv(GLuint indx, const GLfloat* values) = 0; | |
381 | |
382 virtual void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) = 0; | |
383 | |
384 virtual void VertexAttrib2fv(GLuint indx, const GLfloat* values) = 0; | |
385 | |
386 virtual void VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) = 0; | |
387 | |
388 virtual void VertexAttrib3fv(GLuint indx, const GLfloat* values) = 0; | |
389 | |
390 virtual void VertexAttrib4f( | |
391 GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) = 0; | |
392 | |
393 virtual void VertexAttrib4fv(GLuint indx, const GLfloat* values) = 0; | |
394 | |
395 virtual void VertexAttribPointer( | |
396 GLuint indx, GLint size, GLenum type, GLboolean normalized, | |
397 GLsizei stride, const void* ptr) = 0; | |
398 | |
399 virtual void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) = 0; | |
400 | |
401 virtual void SwapBuffers() = 0; | |
402 | |
403 virtual GLuint GetMaxValueInBuffer( | |
404 GLuint buffer_id, GLsizei count, GLenum type, GLuint offset) = 0; | |
405 | |
406 private: | |
407 static GLInterface* interface_; | |
408 }; | |
409 | |
410 } // namespace gles2 | |
411 | |
412 #define GL_IFACE_GET_FUN(name) ::gles2::GLInterface::GetGLInterface()->name | |
413 | |
414 #define glActiveTexture GL_IFACE_GET_FUN(ActiveTexture) | |
415 #define glAttachShader GL_IFACE_GET_FUN(AttachShader) | |
416 #define glBindAttribLocation GL_IFACE_GET_FUN(BindAttribLocation) | |
417 #define glBindBuffer GL_IFACE_GET_FUN(BindBuffer) | |
418 #define glBindFramebufferEXT GL_IFACE_GET_FUN(BindFramebufferEXT) | |
419 #define glBindRenderbufferEXT GL_IFACE_GET_FUN(BindRenderbufferEXT) | |
420 #define glBindTexture GL_IFACE_GET_FUN(BindTexture) | |
421 #define glBlendColor GL_IFACE_GET_FUN(BlendColor) | |
422 #define glBlendEquation GL_IFACE_GET_FUN(BlendEquation) | |
423 #define glBlendEquationSeparate GL_IFACE_GET_FUN(BlendEquationSeparate) | |
424 #define glBlendFunc GL_IFACE_GET_FUN(BlendFunc) | |
425 #define glBlendFuncSeparate GL_IFACE_GET_FUN(BlendFuncSeparate) | |
426 #define glBufferData GL_IFACE_GET_FUN(BufferData) | |
427 #define glBufferSubData GL_IFACE_GET_FUN(BufferSubData) | |
428 #define glCheckFramebufferStatusEXT GL_IFACE_GET_FUN(CheckFramebufferStatusEXT) | |
429 #define glClear GL_IFACE_GET_FUN(Clear) | |
430 #define glClearColor GL_IFACE_GET_FUN(ClearColor) | |
431 #define glClearDepth GL_IFACE_GET_FUN(ClearDepth) | |
432 #define glClearStencil GL_IFACE_GET_FUN(ClearStencil) | |
433 #define glColorMask GL_IFACE_GET_FUN(ColorMask) | |
434 #define glCompileShader GL_IFACE_GET_FUN(CompileShader) | |
435 #define glCompressedTexImage2D GL_IFACE_GET_FUN(CompressedTexImage2D) | |
436 #define glCompressedTexSubImage2D GL_IFACE_GET_FUN(CompressedTexSubImage2D) | |
437 #define glCopyTexImage2D GL_IFACE_GET_FUN(CopyTexImage2D) | |
438 #define glCopyTexSubImage2D GL_IFACE_GET_FUN(CopyTexSubImage2D) | |
439 #define glCreateProgram GL_IFACE_GET_FUN(CreateProgram) | |
440 #define glCreateShader GL_IFACE_GET_FUN(CreateShader) | |
441 #define glCullFace GL_IFACE_GET_FUN(CullFace) | |
442 #define glDeleteBuffersARB GL_IFACE_GET_FUN(DeleteBuffersARB) | |
443 #define glDeleteFramebuffersEXT GL_IFACE_GET_FUN(DeleteFramebuffersEXT) | |
444 #define glDeleteProgram GL_IFACE_GET_FUN(DeleteProgram) | |
445 #define glDeleteRenderbuffersEXT GL_IFACE_GET_FUN(DeleteRenderbuffersEXT) | |
446 #define glDeleteShader GL_IFACE_GET_FUN(DeleteShader) | |
447 #define glDeleteTextures GL_IFACE_GET_FUN(DeleteTextures) | |
448 #define glDepthFunc GL_IFACE_GET_FUN(DepthFunc) | |
449 #define glDepthMask GL_IFACE_GET_FUN(DepthMask) | |
450 #define glDepthRange GL_IFACE_GET_FUN(DepthRange) | |
451 #define glDetachShader GL_IFACE_GET_FUN(DetachShader) | |
452 #define glDisable GL_IFACE_GET_FUN(Disable) | |
453 #define glDisableVertexAttribArray GL_IFACE_GET_FUN(DisableVertexAttribArray) | |
454 #define glDrawArrays GL_IFACE_GET_FUN(DrawArrays) | |
455 #define glDrawElements GL_IFACE_GET_FUN(DrawElements) | |
456 #define glEnable GL_IFACE_GET_FUN(Enable) | |
457 #define glEnableVertexAttribArray GL_IFACE_GET_FUN(EnableVertexAttribArray) | |
458 #define glFinish GL_IFACE_GET_FUN(Finish) | |
459 #define glFlush GL_IFACE_GET_FUN(Flush) | |
460 #define glFramebufferRenderbufferEXT \ | |
461 GL_IFACE_GET_FUN(FramebufferRenderbufferEXT) | |
462 #define glFramebufferTexture2DEXT GL_IFACE_GET_FUN(FramebufferTexture2DEXT) | |
463 #define glFrontFace GL_IFACE_GET_FUN(FrontFace) | |
464 #define glGenBuffersARB GL_IFACE_GET_FUN(GenBuffersARB) | |
465 #define glGenerateMipmapEXT GL_IFACE_GET_FUN(GenerateMipmapEXT) | |
466 #define glGenFramebuffersEXT GL_IFACE_GET_FUN(GenFramebuffersEXT) | |
467 #define glGenRenderbuffersEXT GL_IFACE_GET_FUN(GenRenderbuffersEXT) | |
468 #define glGenTextures GL_IFACE_GET_FUN(GenTextures) | |
469 #define glGetActiveAttrib GL_IFACE_GET_FUN(GetActiveAttrib) | |
470 #define glGetActiveUniform GL_IFACE_GET_FUN(GetActiveUniform) | |
471 #define glGetAttachedShaders GL_IFACE_GET_FUN(GetAttachedShaders) | |
472 #define glGetAttribLocation GL_IFACE_GET_FUN(GetAttribLocation) | |
473 #define glGetBooleanv GL_IFACE_GET_FUN(GetBooleanv) | |
474 #define glGetBufferParameteriv GL_IFACE_GET_FUN(GetBufferParameteriv) | |
475 #define glGetError GL_IFACE_GET_FUN(GetError) | |
476 #define glGetFloatv GL_IFACE_GET_FUN(GetFloatv) | |
477 #define glGetFramebufferAttachmentParameterivEXT \ | |
478 GL_IFACE_GET_FUN(GetFramebufferAttachmentParameterivEXT) | |
479 #define glGetIntegerv GL_IFACE_GET_FUN(GetIntegerv) | |
480 #define glGetProgramiv GL_IFACE_GET_FUN(GetProgramiv) | |
481 #define glGetProgramInfoLog GL_IFACE_GET_FUN(GetProgramInfoLog) | |
482 #define glGetRenderbufferParameterivEXT \ | |
483 GL_IFACE_GET_FUN(GetRenderbufferParameterivEXT) | |
484 #define glGetShaderiv GL_IFACE_GET_FUN(GetShaderiv) | |
485 #define glGetShaderInfoLog GL_IFACE_GET_FUN(GetShaderInfoLog) | |
486 #define glGetShaderPrecisionFormat GL_IFACE_GET_FUN(GetShaderPrecisionFormat) | |
487 #define glGetShaderSource GL_IFACE_GET_FUN(GetShaderSource) | |
488 #define glGetString GL_IFACE_GET_FUN(GetString) | |
489 #define glGetTexParameterfv GL_IFACE_GET_FUN(GetTexParameterfv) | |
490 #define glGetTexParameteriv GL_IFACE_GET_FUN(GetTexParameteriv) | |
491 #define glGetUniformfv GL_IFACE_GET_FUN(GetUniformfv) | |
492 #define glGetUniformiv GL_IFACE_GET_FUN(GetUniformiv) | |
493 #define glGetUniformLocation GL_IFACE_GET_FUN(GetUniformLocation) | |
494 #define glGetVertexAttribfv GL_IFACE_GET_FUN(GetVertexAttribfv) | |
495 #define glGetVertexAttribiv GL_IFACE_GET_FUN(GetVertexAttribiv) | |
496 #define glGetVertexAttribPointerv GL_IFACE_GET_FUN(GetVertexAttribPointerv) | |
497 #define glHint GL_IFACE_GET_FUN(Hint) | |
498 #define glIsBuffer GL_IFACE_GET_FUN(IsBuffer) | |
499 #define glIsEnabled GL_IFACE_GET_FUN(IsEnabled) | |
500 #define glIsFramebufferEXT GL_IFACE_GET_FUN(IsFramebufferEXT) | |
501 #define glIsProgram GL_IFACE_GET_FUN(IsProgram) | |
502 #define glIsRenderbufferEXT GL_IFACE_GET_FUN(IsRenderbufferEXT) | |
503 #define glIsShader GL_IFACE_GET_FUN(IsShader) | |
504 #define glIsTexture GL_IFACE_GET_FUN(IsTexture) | |
505 #define glLineWidth GL_IFACE_GET_FUN(LineWidth) | |
506 #define glLinkProgram GL_IFACE_GET_FUN(LinkProgram) | |
507 #define glPixelStorei GL_IFACE_GET_FUN(PixelStorei) | |
508 #define glPolygonOffset GL_IFACE_GET_FUN(PolygonOffset) | |
509 #define glReadPixels GL_IFACE_GET_FUN(ReadPixels) | |
510 #define glReleaseShaderCompiler GL_IFACE_GET_FUN(ReleaseShaderCompiler) | |
511 #define glRenderbufferStorageEXT GL_IFACE_GET_FUN(RenderbufferStorageEXT) | |
512 #define glSampleCoverage GL_IFACE_GET_FUN(SampleCoverage) | |
513 #define glScissor GL_IFACE_GET_FUN(Scissor) | |
514 #define glShaderBinary GL_IFACE_GET_FUN(ShaderBinary) | |
515 #define glShaderSource GL_IFACE_GET_FUN(ShaderSource) | |
516 #define glStencilFunc GL_IFACE_GET_FUN(StencilFunc) | |
517 #define glStencilFuncSeparate GL_IFACE_GET_FUN(StencilFuncSeparate) | |
518 #define glStencilMask GL_IFACE_GET_FUN(StencilMask) | |
519 #define glStencilMaskSeparate GL_IFACE_GET_FUN(StencilMaskSeparate) | |
520 #define glStencilOp GL_IFACE_GET_FUN(StencilOp) | |
521 #define glStencilOpSeparate GL_IFACE_GET_FUN(StencilOpSeparate) | |
522 #define glTexImage2D GL_IFACE_GET_FUN(TexImage2D) | |
523 #define glTexParameterf GL_IFACE_GET_FUN(TexParameterf) | |
524 #define glTexParameterfv GL_IFACE_GET_FUN(TexParameterfv) | |
525 #define glTexParameteri GL_IFACE_GET_FUN(TexParameteri) | |
526 #define glTexParameteriv GL_IFACE_GET_FUN(TexParameteriv) | |
527 #define glTexSubImage2D GL_IFACE_GET_FUN(TexSubImage2D) | |
528 #define glUniform1f GL_IFACE_GET_FUN(Uniform1f) | |
529 #define glUniform1fv GL_IFACE_GET_FUN(Uniform1fv) | |
530 #define glUniform1i GL_IFACE_GET_FUN(Uniform1i) | |
531 #define glUniform1iv GL_IFACE_GET_FUN(Uniform1iv) | |
532 #define glUniform2f GL_IFACE_GET_FUN(Uniform2f) | |
533 #define glUniform2fv GL_IFACE_GET_FUN(Uniform2fv) | |
534 #define glUniform2i GL_IFACE_GET_FUN(Uniform2i) | |
535 #define glUniform2iv GL_IFACE_GET_FUN(Uniform2iv) | |
536 #define glUniform3f GL_IFACE_GET_FUN(Uniform3f) | |
537 #define glUniform3fv GL_IFACE_GET_FUN(Uniform3fv) | |
538 #define glUniform3i GL_IFACE_GET_FUN(Uniform3i) | |
539 #define glUniform3iv GL_IFACE_GET_FUN(Uniform3iv) | |
540 #define glUniform4f GL_IFACE_GET_FUN(Uniform4f) | |
541 #define glUniform4fv GL_IFACE_GET_FUN(Uniform4fv) | |
542 #define glUniform4i GL_IFACE_GET_FUN(Uniform4i) | |
543 #define glUniform4iv GL_IFACE_GET_FUN(Uniform4iv) | |
544 #define glUniformMatrix2fv GL_IFACE_GET_FUN(UniformMatrix2fv) | |
545 #define glUniformMatrix3fv GL_IFACE_GET_FUN(UniformMatrix3fv) | |
546 #define glUniformMatrix4fv GL_IFACE_GET_FUN(UniformMatrix4fv) | |
547 #define glUseProgram GL_IFACE_GET_FUN(UseProgram) | |
548 #define glValidateProgram GL_IFACE_GET_FUN(ValidateProgram) | |
549 #define glVertexAttrib1f GL_IFACE_GET_FUN(VertexAttrib1f) | |
550 #define glVertexAttrib1fv GL_IFACE_GET_FUN(VertexAttrib1fv) | |
551 #define glVertexAttrib2f GL_IFACE_GET_FUN(VertexAttrib2f) | |
552 #define glVertexAttrib2fv GL_IFACE_GET_FUN(VertexAttrib2fv) | |
553 #define glVertexAttrib3f GL_IFACE_GET_FUN(VertexAttrib3f) | |
554 #define glVertexAttrib3fv GL_IFACE_GET_FUN(VertexAttrib3fv) | |
555 #define glVertexAttrib4f GL_IFACE_GET_FUN(VertexAttrib4f) | |
556 #define glVertexAttrib4fv GL_IFACE_GET_FUN(VertexAttrib4fv) | |
557 #define glVertexAttribPointer GL_IFACE_GET_FUN(VertexAttribPointer) | |
558 #define glViewport GL_IFACE_GET_FUN(Viewport) | |
559 | |
560 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_INTERFACE_H_ | |
561 | |
562 | |
563 | |
OLD | NEW |