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