blob: 597225cbe3e4dc93c203be934e70ada5908bff7d [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
commit-bot@chromium.org98168bb2013-04-11 22:00:34 +000058GrGLvoid 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
bsalomon@google.com9c58f462013-02-26 14:45:41 +000067GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCullFace(GrGLenum mode);
68
69GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDepthMask(GrGLboolean flag);
70
71GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisable(GrGLenum cap);
72
73GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisableVertexAttribArray(GrGLuint index);
74
75GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawArrays(GrGLenum mode, GrGLint first, GrGLsizei count);
76
77GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffer(GrGLenum mode);
78
79GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffers(GrGLsizei n,
80 const GrGLenum* bufs);
81
82GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawElements(GrGLenum mode,
83 GrGLsizei count,
84 GrGLenum type,
85 const GrGLvoid* indices);
86
87GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnable(GrGLenum cap);
88
89GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnableVertexAttribArray(GrGLuint index);
90
91GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEndQuery(GrGLenum target);
92
93GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFinish();
94
95GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFlush();
96
97GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFrontFace(GrGLenum mode);
98
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +000099GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLoadIdentity();
100
101GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLoadMatrixf(const GrGLfloat*);
102
bsalomon@google.com9c58f462013-02-26 14:45:41 +0000103GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLineWidth(GrGLfloat width);
104
105GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLinkProgram(GrGLuint program);
106
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +0000107GrGLvoid GR_GL_FUNCTION_TYPE noOpGLMatrixMode(GrGLenum);
108
bsalomon@google.com9c58f462013-02-26 14:45:41 +0000109GrGLvoid GR_GL_FUNCTION_TYPE noOpGLQueryCounter(GrGLuint id,
110 GrGLenum target);
111
112GrGLvoid GR_GL_FUNCTION_TYPE noOpGLReadBuffer(GrGLenum src);
113
114GrGLvoid GR_GL_FUNCTION_TYPE noOpGLScissor(GrGLint x,
115 GrGLint y,
116 GrGLsizei width,
117 GrGLsizei height);
118
119GrGLvoid GR_GL_FUNCTION_TYPE noOpGLShaderSource(GrGLuint shader,
120 GrGLsizei count,
bsalomon@google.com26fb61a2013-02-28 19:26:04 +0000121#if GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE
bsalomon@google.com9c58f462013-02-26 14:45:41 +0000122 const char* const * str,
123#else
124 const char** str,
125#endif
126 const GrGLint* length);
127
128GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilFunc(GrGLenum func, GrGLint ref, GrGLuint mask);
129
130GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilFuncSeparate(GrGLenum face,
131 GrGLenum func,
132 GrGLint ref,
133 GrGLuint mask);
134
135GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilMask(GrGLuint mask);
136
137GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilMaskSeparate(GrGLenum face, GrGLuint mask);
138
139GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilOp(GrGLenum fail, GrGLenum zfail, GrGLenum zpass);
140
141GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilOpSeparate(GrGLenum face,
142 GrGLenum fail,
143 GrGLenum zfail,
144 GrGLenum zpass);
145
146GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexImage2D(GrGLenum target,
147 GrGLint level,
148 GrGLint internalformat,
149 GrGLsizei width,
150 GrGLsizei height,
151 GrGLint border,
152 GrGLenum format,
153 GrGLenum type,
154 const GrGLvoid* pixels);
155
156GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexParameteri(GrGLenum target, GrGLenum pname, GrGLint param);
157
158GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexParameteriv(GrGLenum target,
159 GrGLenum pname,
160 const GrGLint* params);
161
162GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexStorage2D(GrGLenum target,
163 GrGLsizei levels,
164 GrGLenum internalformat,
165 GrGLsizei width,
166 GrGLsizei height);
167
skia.committer@gmail.com81521132013-04-30 07:01:03 +0000168GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDiscardFramebuffer(GrGLenum target,
169 GrGLsizei numAttachments,
robertphillips@google.coma6ffb582013-04-29 16:50:17 +0000170 const GrGLenum* attachments);
171
bsalomon@google.com9c58f462013-02-26 14:45:41 +0000172GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexSubImage2D(GrGLenum target,
173 GrGLint level,
174 GrGLint xoffset,
175 GrGLint yoffset,
176 GrGLsizei width,
177 GrGLsizei height,
178 GrGLenum format,
179 GrGLenum type,
180 const GrGLvoid* pixels);
181
182GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1f(GrGLint location, GrGLfloat v0);
183
184GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1i(GrGLint location, GrGLint v0);
185
186GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1fv(GrGLint location,
187 GrGLsizei count,
188 const GrGLfloat* v);
189
190GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1iv(GrGLint location,
191 GrGLsizei count,
192 const GrGLint* v);
193
194GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2f(GrGLint location,
195 GrGLfloat v0,
196 GrGLfloat v1);
197
198GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2i(GrGLint location, GrGLint v0, GrGLint v1);
199
200GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2fv(GrGLint location,
201 GrGLsizei count,
202 const GrGLfloat* v);
203
204GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2iv(GrGLint location,
205 GrGLsizei count,
206 const GrGLint* v);
207
208GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3f(GrGLint location,
209 GrGLfloat v0,
210 GrGLfloat v1,
211 GrGLfloat v2);
212
213GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3i(GrGLint location,
214 GrGLint v0,
215 GrGLint v1,
216 GrGLint v2);
217
218GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3fv(GrGLint location,
219 GrGLsizei count,
220 const GrGLfloat* v);
221
222GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3iv(GrGLint location,
223 GrGLsizei count,
224 const GrGLint* v);
225
226GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4f(GrGLint location,
227 GrGLfloat v0,
228 GrGLfloat v1,
229 GrGLfloat v2,
230 GrGLfloat v3);
231
232GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4i(GrGLint location,
233 GrGLint v0,
234 GrGLint v1,
235 GrGLint v2,
236 GrGLint v3);
237
238GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4fv(GrGLint location,
239 GrGLsizei count,
240 const GrGLfloat* v);
241
242GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4iv(GrGLint location,
243 GrGLsizei count,
244 const GrGLint* v);
245
246GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix2fv(GrGLint location,
247 GrGLsizei count,
248 GrGLboolean transpose,
249 const GrGLfloat* value);
250
251GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix3fv(GrGLint location,
252 GrGLsizei count,
253 GrGLboolean transpose,
254 const GrGLfloat* value);
255
256GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix4fv(GrGLint location,
257 GrGLsizei count,
258 GrGLboolean transpose,
259 const GrGLfloat* value);
260
261 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib4fv(GrGLuint indx, const GrGLfloat* values);
262
263GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribPointer(GrGLuint indx,
264 GrGLint size,
265 GrGLenum type,
266 GrGLboolean normalized,
267 GrGLsizei stride,
268 const GrGLvoid* ptr);
269
270GrGLvoid GR_GL_FUNCTION_TYPE noOpGLViewport(GrGLint x,
271 GrGLint y,
272 GrGLsizei width,
273 GrGLsizei height);
274
275 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetFramebufferAttachmentParameteriv(GrGLenum target,
276 GrGLenum attachment,
277 GrGLenum pname,
278 GrGLint* params);
279
280GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetRenderbufferParameteriv(GrGLenum target,
281 GrGLenum pname,
282 GrGLint* params);
283
284GrGLvoid GR_GL_FUNCTION_TYPE noOpGLRenderbufferStorage(GrGLenum target,
285 GrGLenum internalformat,
286 GrGLsizei width,
287 GrGLsizei height);
288
289GrGLvoid GR_GL_FUNCTION_TYPE noOpGLRenderbufferStorageMultisample(GrGLenum target,
290 GrGLsizei samples,
291 GrGLenum internalformat,
292 GrGLsizei width,
293 GrGLsizei height);
294
295GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlitFramebuffer(GrGLint srcX0,
296 GrGLint srcY0,
297 GrGLint srcX1,
298 GrGLint srcY1,
299 GrGLint dstX0,
300 GrGLint dstY0,
301 GrGLint dstX1,
302 GrGLint dstY1,
303 GrGLbitfield mask,
304 GrGLenum filter);
305
306GrGLvoid GR_GL_FUNCTION_TYPE noOpGLResolveMultisampleFramebuffer();
307
308GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocationIndexed(GrGLuint program,
309 GrGLuint colorNumber,
310 GrGLuint index,
311 const GrGLchar * name);
312
313GrGLenum GR_GL_FUNCTION_TYPE noOpGLCheckFramebufferStatus(GrGLenum target);
314
315// this function can be used for all glGen*(GLsize i, GLuint*) functions
316GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGenIds(GrGLsizei n, GrGLuint* ids);
317
318// this function function can be used for all glDelete*(GLsize i, const GLuint*)
319GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDeleteIds(GrGLsizei n, const GrGLuint* ids);
320
321GrGLenum GR_GL_FUNCTION_TYPE noOpGLGetError();
322
323GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetIntegerv(GrGLenum pname, GrGLint* params);
324
325// can be used for both the program and shader info logs
326GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetInfoLog(GrGLuint program,
327 GrGLsizei bufsize,
328 GrGLsizei* length,
329 char* infolog);
330
331// can be used for both the program and shader params
332GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetShaderOrProgramiv(GrGLuint program,
333 GrGLenum pname,
334 GrGLint* params);
335
336// Queries on bogus GLs just don't do anything at all. We could potentially make the timers work.
337GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryiv(GrGLenum GLtarget,
338 GrGLenum pname,
339 GrGLint *params);
340
341GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjecti64v(GrGLuint id,
342 GrGLenum pname,
343 GrGLint64 *params);
344
345GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectiv(GrGLuint id, GrGLenum pname, GrGLint *params);
346
347GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectui64v(GrGLuint id,
348 GrGLenum pname,
349 GrGLuint64 *params);
350
351GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectuiv(GrGLuint id,
352 GrGLenum pname,
353 GrGLuint *params);
354
355const GrGLubyte* GR_GL_FUNCTION_TYPE noOpGLGetString(GrGLenum name);
356
bsalomon@google.com1744f972013-02-26 21:46:32 +0000357const GrGLubyte* GR_GL_FUNCTION_TYPE noOpGLGetStringi(GrGLenum name, GrGLuint i);
358
bsalomon@google.com9c58f462013-02-26 14:45:41 +0000359GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetTexLevelParameteriv(GrGLenum target,
360 GrGLint level,
361 GrGLenum pname,
362 GrGLint* params);
363
364GrGLint GR_GL_FUNCTION_TYPE noOpGLGetUniformLocation(GrGLuint program, const char* name);
365
commit-bot@chromium.orga3baf3b2014-02-21 18:45:30 +0000366GrGLvoid GR_GL_FUNCTION_TYPE noOpGLInsertEventMarker(GrGLsizei length, const char* marker);
367GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPushGroupMarker(GrGLsizei length , const char* marker);
368GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPopGroupMarker();
369
bsalomon@google.com9c58f462013-02-26 14:45:41 +0000370#endif