blob: 3e146d330b41ccd7ede8ab2a43045c2ac19b30fb [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
269 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib4fv(GrGLuint indx, const GrGLfloat* values);
270
271GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribPointer(GrGLuint indx,
272 GrGLint size,
273 GrGLenum type,
274 GrGLboolean normalized,
275 GrGLsizei stride,
276 const GrGLvoid* ptr);
277
278GrGLvoid GR_GL_FUNCTION_TYPE noOpGLViewport(GrGLint x,
279 GrGLint y,
280 GrGLsizei width,
281 GrGLsizei height);
282
283 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetFramebufferAttachmentParameteriv(GrGLenum target,
284 GrGLenum attachment,
285 GrGLenum pname,
286 GrGLint* params);
287
288GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetRenderbufferParameteriv(GrGLenum target,
289 GrGLenum pname,
290 GrGLint* params);
291
292GrGLvoid GR_GL_FUNCTION_TYPE noOpGLRenderbufferStorage(GrGLenum target,
293 GrGLenum internalformat,
294 GrGLsizei width,
295 GrGLsizei height);
296
297GrGLvoid GR_GL_FUNCTION_TYPE noOpGLRenderbufferStorageMultisample(GrGLenum target,
298 GrGLsizei samples,
299 GrGLenum internalformat,
300 GrGLsizei width,
301 GrGLsizei height);
302
303GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlitFramebuffer(GrGLint srcX0,
304 GrGLint srcY0,
305 GrGLint srcX1,
306 GrGLint srcY1,
307 GrGLint dstX0,
308 GrGLint dstY0,
309 GrGLint dstX1,
310 GrGLint dstY1,
311 GrGLbitfield mask,
312 GrGLenum filter);
313
314GrGLvoid GR_GL_FUNCTION_TYPE noOpGLResolveMultisampleFramebuffer();
315
316GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocationIndexed(GrGLuint program,
317 GrGLuint colorNumber,
318 GrGLuint index,
319 const GrGLchar * name);
320
321GrGLenum GR_GL_FUNCTION_TYPE noOpGLCheckFramebufferStatus(GrGLenum target);
322
323// this function can be used for all glGen*(GLsize i, GLuint*) functions
324GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGenIds(GrGLsizei n, GrGLuint* ids);
325
326// this function function can be used for all glDelete*(GLsize i, const GLuint*)
327GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDeleteIds(GrGLsizei n, const GrGLuint* ids);
328
329GrGLenum GR_GL_FUNCTION_TYPE noOpGLGetError();
330
331GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetIntegerv(GrGLenum pname, GrGLint* params);
332
333// can be used for both the program and shader info logs
334GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetInfoLog(GrGLuint program,
335 GrGLsizei bufsize,
336 GrGLsizei* length,
337 char* infolog);
338
339// can be used for both the program and shader params
340GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetShaderOrProgramiv(GrGLuint program,
341 GrGLenum pname,
342 GrGLint* params);
343
344// Queries on bogus GLs just don't do anything at all. We could potentially make the timers work.
345GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryiv(GrGLenum GLtarget,
346 GrGLenum pname,
347 GrGLint *params);
348
349GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjecti64v(GrGLuint id,
350 GrGLenum pname,
351 GrGLint64 *params);
352
353GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectiv(GrGLuint id, GrGLenum pname, GrGLint *params);
354
355GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectui64v(GrGLuint id,
356 GrGLenum pname,
357 GrGLuint64 *params);
358
359GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectuiv(GrGLuint id,
360 GrGLenum pname,
361 GrGLuint *params);
362
363const GrGLubyte* GR_GL_FUNCTION_TYPE noOpGLGetString(GrGLenum name);
364
bsalomon@google.com1744f972013-02-26 21:46:32 +0000365const GrGLubyte* GR_GL_FUNCTION_TYPE noOpGLGetStringi(GrGLenum name, GrGLuint i);
366
bsalomon@google.com9c58f462013-02-26 14:45:41 +0000367GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetTexLevelParameteriv(GrGLenum target,
368 GrGLint level,
369 GrGLenum pname,
370 GrGLint* params);
371
372GrGLint GR_GL_FUNCTION_TYPE noOpGLGetUniformLocation(GrGLuint program, const char* name);
373
commit-bot@chromium.orga3baf3b2014-02-21 18:45:30 +0000374GrGLvoid GR_GL_FUNCTION_TYPE noOpGLInsertEventMarker(GrGLsizei length, const char* marker);
375GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPushGroupMarker(GrGLsizei length , const char* marker);
376GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPopGroupMarker();
377
bsalomon@google.com9c58f462013-02-26 14:45:41 +0000378#endif