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