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