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