blob: 8fe9b44ea2efe6e0415168cad5845f00c3e3cfec [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
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +000073GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisableClientState(GrGLenum);
74
bsalomon@google.com9c58f462013-02-26 14:45:41 +000075GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisableVertexAttribArray(GrGLuint index);
76
77GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawArrays(GrGLenum mode, GrGLint first, GrGLsizei count);
78
79GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffer(GrGLenum mode);
80
81GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffers(GrGLsizei n,
82 const GrGLenum* bufs);
83
84GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawElements(GrGLenum mode,
85 GrGLsizei count,
86 GrGLenum type,
87 const GrGLvoid* indices);
88
89GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnable(GrGLenum cap);
90
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +000091GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnableClientState(GrGLenum cap);
92
bsalomon@google.com9c58f462013-02-26 14:45:41 +000093GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnableVertexAttribArray(GrGLuint index);
94
95GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEndQuery(GrGLenum target);
96
97GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFinish();
98
99GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFlush();
100
101GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFrontFace(GrGLenum mode);
102
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +0000103GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLoadIdentity();
104
105GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLoadMatrixf(const GrGLfloat*);
106
bsalomon@google.com9c58f462013-02-26 14:45:41 +0000107GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLineWidth(GrGLfloat width);
108
109GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLinkProgram(GrGLuint program);
110
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +0000111GrGLvoid GR_GL_FUNCTION_TYPE noOpGLMatrixMode(GrGLenum);
112
bsalomon@google.com9c58f462013-02-26 14:45:41 +0000113GrGLvoid GR_GL_FUNCTION_TYPE noOpGLQueryCounter(GrGLuint id,
114 GrGLenum target);
115
116GrGLvoid GR_GL_FUNCTION_TYPE noOpGLReadBuffer(GrGLenum src);
117
118GrGLvoid GR_GL_FUNCTION_TYPE noOpGLScissor(GrGLint x,
119 GrGLint y,
120 GrGLsizei width,
121 GrGLsizei height);
122
123GrGLvoid GR_GL_FUNCTION_TYPE noOpGLShaderSource(GrGLuint shader,
124 GrGLsizei count,
bsalomon@google.com26fb61a2013-02-28 19:26:04 +0000125#if GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE
bsalomon@google.com9c58f462013-02-26 14:45:41 +0000126 const char* const * str,
127#else
128 const char** str,
129#endif
130 const GrGLint* length);
131
132GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilFunc(GrGLenum func, GrGLint ref, GrGLuint mask);
133
134GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilFuncSeparate(GrGLenum face,
135 GrGLenum func,
136 GrGLint ref,
137 GrGLuint mask);
138
139GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilMask(GrGLuint mask);
140
141GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilMaskSeparate(GrGLenum face, GrGLuint mask);
142
143GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilOp(GrGLenum fail, GrGLenum zfail, GrGLenum zpass);
144
145GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilOpSeparate(GrGLenum face,
146 GrGLenum fail,
147 GrGLenum zfail,
148 GrGLenum zpass);
149
150GrGLvoid 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
160GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexParameteri(GrGLenum target, GrGLenum pname, GrGLint param);
161
162GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexParameteriv(GrGLenum target,
163 GrGLenum pname,
164 const GrGLint* params);
165
166GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexStorage2D(GrGLenum target,
167 GrGLsizei levels,
168 GrGLenum internalformat,
169 GrGLsizei width,
170 GrGLsizei height);
171
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +0000172GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexGenf(GrGLenum, GrGLenum, GrGLfloat);
173
174GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexGenfv(GrGLenum, GrGLenum, const GrGLfloat*);
175
176GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexGeni(GrGLenum, GrGLenum, GrGLint);
177
skia.committer@gmail.com81521132013-04-30 07:01:03 +0000178GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDiscardFramebuffer(GrGLenum target,
179 GrGLsizei numAttachments,
robertphillips@google.coma6ffb582013-04-29 16:50:17 +0000180 const GrGLenum* attachments);
181
bsalomon@google.com9c58f462013-02-26 14:45:41 +0000182GrGLvoid 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
192GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1f(GrGLint location, GrGLfloat v0);
193
194GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1i(GrGLint location, GrGLint v0);
195
196GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1fv(GrGLint location,
197 GrGLsizei count,
198 const GrGLfloat* v);
199
200GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1iv(GrGLint location,
201 GrGLsizei count,
202 const GrGLint* v);
203
204GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2f(GrGLint location,
205 GrGLfloat v0,
206 GrGLfloat v1);
207
208GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2i(GrGLint location, GrGLint v0, GrGLint v1);
209
210GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2fv(GrGLint location,
211 GrGLsizei count,
212 const GrGLfloat* v);
213
214GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2iv(GrGLint location,
215 GrGLsizei count,
216 const GrGLint* v);
217
218GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3f(GrGLint location,
219 GrGLfloat v0,
220 GrGLfloat v1,
221 GrGLfloat v2);
222
223GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3i(GrGLint location,
224 GrGLint v0,
225 GrGLint v1,
226 GrGLint v2);
227
228GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3fv(GrGLint location,
229 GrGLsizei count,
230 const GrGLfloat* v);
231
232GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3iv(GrGLint location,
233 GrGLsizei count,
234 const GrGLint* v);
235
236GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4f(GrGLint location,
237 GrGLfloat v0,
238 GrGLfloat v1,
239 GrGLfloat v2,
240 GrGLfloat v3);
241
242GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4i(GrGLint location,
243 GrGLint v0,
244 GrGLint v1,
245 GrGLint v2,
246 GrGLint v3);
247
248GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4fv(GrGLint location,
249 GrGLsizei count,
250 const GrGLfloat* v);
251
252GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4iv(GrGLint location,
253 GrGLsizei count,
254 const GrGLint* v);
255
256GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix2fv(GrGLint location,
257 GrGLsizei count,
258 GrGLboolean transpose,
259 const GrGLfloat* value);
260
261GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix3fv(GrGLint location,
262 GrGLsizei count,
263 GrGLboolean transpose,
264 const GrGLfloat* value);
265
266GrGLvoid 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
273GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribPointer(GrGLuint indx,
274 GrGLint size,
275 GrGLenum type,
276 GrGLboolean normalized,
277 GrGLsizei stride,
278 const GrGLvoid* ptr);
279
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +0000280GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexPointer(GrGLint, GrGLenum, GrGLsizei, const GrGLvoid*);
281
bsalomon@google.com9c58f462013-02-26 14:45:41 +0000282GrGLvoid 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
292GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetRenderbufferParameteriv(GrGLenum target,
293 GrGLenum pname,
294 GrGLint* params);
295
296GrGLvoid GR_GL_FUNCTION_TYPE noOpGLRenderbufferStorage(GrGLenum target,
297 GrGLenum internalformat,
298 GrGLsizei width,
299 GrGLsizei height);
300
301GrGLvoid GR_GL_FUNCTION_TYPE noOpGLRenderbufferStorageMultisample(GrGLenum target,
302 GrGLsizei samples,
303 GrGLenum internalformat,
304 GrGLsizei width,
305 GrGLsizei height);
306
307GrGLvoid 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
318GrGLvoid GR_GL_FUNCTION_TYPE noOpGLResolveMultisampleFramebuffer();
319
320GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocationIndexed(GrGLuint program,
321 GrGLuint colorNumber,
322 GrGLuint index,
323 const GrGLchar * name);
324
325GrGLenum GR_GL_FUNCTION_TYPE noOpGLCheckFramebufferStatus(GrGLenum target);
326
327// this function can be used for all glGen*(GLsize i, GLuint*) functions
328GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGenIds(GrGLsizei n, GrGLuint* ids);
329
330// this function function can be used for all glDelete*(GLsize i, const GLuint*)
331GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDeleteIds(GrGLsizei n, const GrGLuint* ids);
332
333GrGLenum GR_GL_FUNCTION_TYPE noOpGLGetError();
334
335GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetIntegerv(GrGLenum pname, GrGLint* params);
336
337// can be used for both the program and shader info logs
338GrGLvoid 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
344GrGLvoid 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.
349GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryiv(GrGLenum GLtarget,
350 GrGLenum pname,
351 GrGLint *params);
352
353GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjecti64v(GrGLuint id,
354 GrGLenum pname,
355 GrGLint64 *params);
356
357GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectiv(GrGLuint id, GrGLenum pname, GrGLint *params);
358
359GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectui64v(GrGLuint id,
360 GrGLenum pname,
361 GrGLuint64 *params);
362
363GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectuiv(GrGLuint id,
364 GrGLenum pname,
365 GrGLuint *params);
366
367const GrGLubyte* GR_GL_FUNCTION_TYPE noOpGLGetString(GrGLenum name);
368
bsalomon@google.com1744f972013-02-26 21:46:32 +0000369const GrGLubyte* GR_GL_FUNCTION_TYPE noOpGLGetStringi(GrGLenum name, GrGLuint i);
370
bsalomon@google.com9c58f462013-02-26 14:45:41 +0000371GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetTexLevelParameteriv(GrGLenum target,
372 GrGLint level,
373 GrGLenum pname,
374 GrGLint* params);
375
376GrGLint GR_GL_FUNCTION_TYPE noOpGLGetUniformLocation(GrGLuint program, const char* name);
377
378#endif