• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2013 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef GrGLNoOpInterface_DEFINED
9 #define GrGLNoOpInterface_DEFINED
10 
11 #include "gl/GrGLDefines.h"
12 #include "gl/GrGLTypes.h"
13 
14 // These are constants/functions that are common to the Null and Debug GL interface implementations.
15 
16 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocation(GrGLuint program,
17                                                         GrGLuint colorNumber,
18                                                         const GrGLchar* name);
19 
20 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendColor(GrGLclampf red,
21                                               GrGLclampf green,
22                                               GrGLclampf blue,
23                                               GrGLclampf alpha);
24 
25 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendEquation(GrGLenum mode);
26 
27 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendFunc(GrGLenum sfactor,
28                                              GrGLenum dfactor);
29 
30 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBufferSubData(GrGLenum target,
31                                                  GrGLintptr offset,
32                                                  GrGLsizeiptr size,
33                                                  const GrGLvoid* data);
34 
35 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLClear(GrGLbitfield mask);
36 
37 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLClearColor(GrGLclampf red,
38                                               GrGLclampf green,
39                                               GrGLclampf blue,
40                                               GrGLclampf alpha);
41 
42 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLClearStencil(GrGLint s);
43 
44 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLColorMask(GrGLboolean red,
45                                              GrGLboolean green,
46                                              GrGLboolean blue,
47                                              GrGLboolean alpha);
48 
49 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCompileShader(GrGLuint shader);
50 
51 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCompressedTexImage2D(GrGLenum target,
52                                                         GrGLint level,
53                                                         GrGLenum internalformat,
54                                                         GrGLsizei width,
55                                                         GrGLsizei height,
56                                                         GrGLint border,
57                                                         GrGLsizei imageSize,
58                                                         const GrGLvoid* data);
59 
60 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCompressedTexSubImage2D(GrGLenum target,
61                                                            GrGLint level,
62                                                            GrGLint xoffset,
63                                                            GrGLint yoffset,
64                                                            GrGLsizei width,
65                                                            GrGLsizei height,
66                                                            GrGLenum format,
67                                                            GrGLsizei imageSize,
68                                                            const GrGLvoid* data);
69 
70 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCopyTexSubImage2D(GrGLenum target,
71                                                      GrGLint level,
72                                                      GrGLint xoffset,
73                                                      GrGLint yoffset,
74                                                      GrGLint x,
75                                                      GrGLint y,
76                                                      GrGLsizei width,
77                                                      GrGLsizei height);
78 
79 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCullFace(GrGLenum mode);
80 
81 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDepthMask(GrGLboolean flag);
82 
83 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisable(GrGLenum cap);
84 
85 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisableVertexAttribArray(GrGLuint index);
86 
87 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawArrays(GrGLenum mode, GrGLint first, GrGLsizei count);
88 
89 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawArraysInstanced(GrGLenum mode,
90                                                        GrGLint first,
91                                                        GrGLsizei count,
92                                                        GrGLsizei primcount);
93 
94 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffer(GrGLenum mode);
95 
96 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffers(GrGLsizei n,
97                                                 const GrGLenum* bufs);
98 
99 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawElements(GrGLenum mode,
100                                                 GrGLsizei count,
101                                                 GrGLenum type,
102                                                 const GrGLvoid* indices);
103 
104 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawElementsInstanced(GrGLenum mode,
105                                                          GrGLsizei count,
106                                                          GrGLenum type,
107                                                          const GrGLvoid* indices,
108                                                          GrGLsizei primcount);
109 
110 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnable(GrGLenum cap);
111 
112 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnableVertexAttribArray(GrGLuint index);
113 
114 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEndQuery(GrGLenum target);
115 
116 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFinish();
117 
118 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFlush();
119 
120 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFrontFace(GrGLenum mode);
121 
122 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLMatrixLoadf(GrGLenum, const GrGLfloat*);
123 
124 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLMatrixLoadIdentity(GrGLenum);
125 
126 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLineWidth(GrGLfloat width);
127 
128 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLinkProgram(GrGLuint program);
129 
130 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLQueryCounter(GrGLuint id,
131                                                 GrGLenum target);
132 
133 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLReadBuffer(GrGLenum src);
134 
135 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLScissor(GrGLint x,
136                                            GrGLint y,
137                                            GrGLsizei width,
138                                            GrGLsizei height);
139 
140 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLShaderSource(GrGLuint shader,
141                                                 GrGLsizei count,
142 #if GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE
143                                                 const char* const * str,
144 #else
145                                                 const char** str,
146 #endif
147                                                 const GrGLint* length);
148 
149 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilFunc(GrGLenum func, GrGLint ref, GrGLuint mask);
150 
151 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilFuncSeparate(GrGLenum face,
152                                                        GrGLenum func,
153                                                        GrGLint ref,
154                                                        GrGLuint mask);
155 
156 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilMask(GrGLuint mask);
157 
158 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilMaskSeparate(GrGLenum face, GrGLuint mask);
159 
160 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilOp(GrGLenum fail, GrGLenum zfail, GrGLenum zpass);
161 
162 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilOpSeparate(GrGLenum face,
163                                                      GrGLenum fail,
164                                                      GrGLenum zfail,
165                                                      GrGLenum zpass);
166 
167 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexImage2D(GrGLenum target,
168                                               GrGLint level,
169                                               GrGLint internalformat,
170                                               GrGLsizei width,
171                                               GrGLsizei height,
172                                               GrGLint border,
173                                               GrGLenum format,
174                                               GrGLenum type,
175                                               const GrGLvoid* pixels);
176 
177 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexParameteri(GrGLenum target, GrGLenum pname, GrGLint param);
178 
179 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexParameteriv(GrGLenum target,
180                                                   GrGLenum pname,
181                                                   const GrGLint* params);
182 
183 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexStorage2D(GrGLenum target,
184                                                 GrGLsizei levels,
185                                                 GrGLenum internalformat,
186                                                 GrGLsizei width,
187                                                 GrGLsizei height);
188 
189 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDiscardFramebuffer(GrGLenum target,
190                                                       GrGLsizei numAttachments,
191                                                       const GrGLenum* attachments);
192 
193 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexSubImage2D(GrGLenum target,
194                                                  GrGLint level,
195                                                  GrGLint xoffset,
196                                                  GrGLint yoffset,
197                                                  GrGLsizei width,
198                                                  GrGLsizei height,
199                                                  GrGLenum format,
200                                                  GrGLenum type,
201                                                  const GrGLvoid* pixels);
202 
203 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1f(GrGLint location, GrGLfloat v0);
204 
205 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1i(GrGLint location, GrGLint v0);
206 
207 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1fv(GrGLint location,
208                                               GrGLsizei count,
209                                               const GrGLfloat* v);
210 
211 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1iv(GrGLint location,
212                                               GrGLsizei count,
213                                               const GrGLint* v);
214 
215 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2f(GrGLint location,
216                                              GrGLfloat v0,
217                                              GrGLfloat v1);
218 
219 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2i(GrGLint location, GrGLint v0, GrGLint v1);
220 
221 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2fv(GrGLint location,
222                                               GrGLsizei count,
223                                               const GrGLfloat* v);
224 
225 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2iv(GrGLint location,
226                                               GrGLsizei count,
227                                               const GrGLint* v);
228 
229 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3f(GrGLint location,
230                                              GrGLfloat v0,
231                                              GrGLfloat v1,
232                                              GrGLfloat v2);
233 
234 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3i(GrGLint location,
235                                              GrGLint v0,
236                                              GrGLint v1,
237                                              GrGLint v2);
238 
239 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3fv(GrGLint location,
240                                               GrGLsizei count,
241                                               const GrGLfloat* v);
242 
243 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3iv(GrGLint location,
244                                                GrGLsizei count,
245                                                const GrGLint* v);
246 
247 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4f(GrGLint location,
248                                               GrGLfloat v0,
249                                               GrGLfloat v1,
250                                               GrGLfloat v2,
251                                               GrGLfloat v3);
252 
253 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4i(GrGLint location,
254                                              GrGLint v0,
255                                              GrGLint v1,
256                                              GrGLint v2,
257                                              GrGLint v3);
258 
259 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4fv(GrGLint location,
260                                               GrGLsizei count,
261                                               const GrGLfloat* v);
262 
263 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4iv(GrGLint location,
264                                               GrGLsizei count,
265                                               const GrGLint* v);
266 
267 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix2fv(GrGLint location,
268                                                     GrGLsizei count,
269                                                     GrGLboolean transpose,
270                                                     const GrGLfloat* value);
271 
272 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix3fv(GrGLint location,
273                                                     GrGLsizei count,
274                                                     GrGLboolean transpose,
275                                                     const GrGLfloat* value);
276 
277 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix4fv(GrGLint location,
278                                                     GrGLsizei count,
279                                                     GrGLboolean transpose,
280                                                     const GrGLfloat* value);
281 
282  GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib1f(GrGLuint indx, const GrGLfloat value);
283 
284  GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib2fv(GrGLuint indx, const GrGLfloat* values);
285 
286  GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib3fv(GrGLuint indx, const GrGLfloat* values);
287 
288  GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib4fv(GrGLuint indx, const GrGLfloat* values);
289 
290 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribIPointer(GrGLuint indx,
291                                                         GrGLint size,
292                                                         GrGLenum type,
293                                                         GrGLsizei stride,
294                                                         const GrGLvoid* ptr);
295 
296 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribPointer(GrGLuint indx,
297                                                        GrGLint size,
298                                                        GrGLenum type,
299                                                        GrGLboolean normalized,
300                                                        GrGLsizei stride,
301                                                        const GrGLvoid* ptr);
302 
303 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribDivisor(GrGLuint index, GrGLuint divisor);
304 
305 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLViewport(GrGLint x,
306                                             GrGLint y,
307                                             GrGLsizei width,
308                                             GrGLsizei height);
309 
310   GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetFramebufferAttachmentParameteriv(GrGLenum target,
311                                                                          GrGLenum attachment,
312                                                                          GrGLenum pname,
313                                                                          GrGLint* params);
314 
315 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetRenderbufferParameteriv(GrGLenum target,
316                                                               GrGLenum pname,
317                                                               GrGLint* params);
318 
319 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLRenderbufferStorage(GrGLenum target,
320                                                        GrGLenum internalformat,
321                                                        GrGLsizei width,
322                                                        GrGLsizei height);
323 
324 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLRenderbufferStorageMultisample(GrGLenum target,
325                                                                   GrGLsizei samples,
326                                                                   GrGLenum internalformat,
327                                                                   GrGLsizei width,
328                                                                   GrGLsizei height);
329 
330 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlitFramebuffer(GrGLint srcX0,
331                                                    GrGLint srcY0,
332                                                    GrGLint srcX1,
333                                                    GrGLint srcY1,
334                                                    GrGLint dstX0,
335                                                    GrGLint dstY0,
336                                                    GrGLint dstX1,
337                                                    GrGLint dstY1,
338                                                    GrGLbitfield mask,
339                                                    GrGLenum filter);
340 
341 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLResolveMultisampleFramebuffer();
342 
343 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocationIndexed(GrGLuint program,
344                                                                GrGLuint colorNumber,
345                                                                GrGLuint index,
346                                                                const GrGLchar * name);
347 
348 GrGLenum GR_GL_FUNCTION_TYPE noOpGLCheckFramebufferStatus(GrGLenum target);
349 
350 // this function can be used for all glGen*(GLsize i, GLuint*) functions
351 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGenIds(GrGLsizei n, GrGLuint* ids);
352 
353 // this function function can be used for all glDelete*(GLsize i, const GLuint*)
354 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDeleteIds(GrGLsizei n, const GrGLuint* ids);
355 
356 GrGLenum GR_GL_FUNCTION_TYPE noOpGLGetError();
357 
358 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetIntegerv(GrGLenum pname, GrGLint* params);
359 
360 // can be used for both the program and shader info logs
361 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetInfoLog(GrGLuint program,
362                                               GrGLsizei bufsize,
363                                               GrGLsizei* length,
364                                               char* infolog);
365 
366 // can be used for both the program and shader params
367 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetShaderOrProgramiv(GrGLuint program,
368                                                         GrGLenum pname,
369                                                         GrGLint* params);
370 
371 // Queries on bogus GLs just don't do anything at all. We could potentially make the timers work.
372 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryiv(GrGLenum GLtarget,
373                                               GrGLenum pname,
374                                               GrGLint *params);
375 
376 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjecti64v(GrGLuint id,
377                                                       GrGLenum pname,
378                                                       GrGLint64 *params);
379 
380 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectiv(GrGLuint id, GrGLenum pname, GrGLint *params);
381 
382 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectui64v(GrGLuint id,
383                                                        GrGLenum pname,
384                                                        GrGLuint64 *params);
385 
386 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectuiv(GrGLuint id,
387                                                      GrGLenum pname,
388                                                      GrGLuint *params);
389 
390 const GrGLubyte* GR_GL_FUNCTION_TYPE noOpGLGetString(GrGLenum name);
391 
392 const GrGLubyte* GR_GL_FUNCTION_TYPE noOpGLGetStringi(GrGLenum name, GrGLuint i);
393 
394 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetTexLevelParameteriv(GrGLenum target,
395                                                           GrGLint level,
396                                                           GrGLenum pname,
397                                                           GrGLint* params);
398 
399 GrGLint GR_GL_FUNCTION_TYPE noOpGLGetUniformLocation(GrGLuint program, const char* name);
400 
401 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLInsertEventMarker(GrGLsizei length, const char* marker);
402 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPushGroupMarker(GrGLsizei length  , const char* marker);
403 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPopGroupMarker();
404 
405 #endif
406