OLD | NEW |
| (Empty) |
1 /* | |
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/GrGLTypes.h" | |
13 | |
14 // These are constants/functions that are common to the Null and Debug GL interf
ace implementations. | |
15 | |
16 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocation(GrGLuint program, | |
17 GrGLuint colorNumber, | |
18 const GrGLchar* name); | |
19 | |
20 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendColor(GrGLclampf red, | |
21 GrGLclampf green, | |
22 GrGLclampf blue, | |
23 GrGLclampf alpha); | |
24 | |
25 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendEquation(GrGLenum mode); | |
26 | |
27 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendFunc(GrGLenum sfactor, | |
28 GrGLenum dfactor); | |
29 | |
30 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBufferSubData(GrGLenum target, | |
31 GrGLintptr offset, | |
32 GrGLsizeiptr size, | |
33 const GrGLvoid* data); | |
34 | |
35 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLClear(GrGLbitfield mask); | |
36 | |
37 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLClearColor(GrGLclampf red, | |
38 GrGLclampf green, | |
39 GrGLclampf blue, | |
40 GrGLclampf alpha); | |
41 | |
42 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLClearStencil(GrGLint s); | |
43 | |
44 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLColorMask(GrGLboolean red, | |
45 GrGLboolean green, | |
46 GrGLboolean blue, | |
47 GrGLboolean alpha); | |
48 | |
49 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCompileShader(GrGLuint shader); | |
50 | |
51 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCompressedTexImage2D(GrGLenum target, | |
52 GrGLint level, | |
53 GrGLenum internalformat, | |
54 GrGLsizei width, | |
55 GrGLsizei height, | |
56 GrGLint border, | |
57 GrGLsizei imageSize, | |
58 const GrGLvoid* data); | |
59 | |
60 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCompressedTexSubImage2D(GrGLenum target, | |
61 GrGLint level, | |
62 GrGLint xoffset, | |
63 GrGLint yoffset, | |
64 GrGLsizei width, | |
65 GrGLsizei height, | |
66 GrGLenum format, | |
67 GrGLsizei imageSize, | |
68 const GrGLvoid* data)
; | |
69 | |
70 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCopyTexSubImage2D(GrGLenum target, | |
71 GrGLint level, | |
72 GrGLint xoffset, | |
73 GrGLint yoffset, | |
74 GrGLint x, | |
75 GrGLint y, | |
76 GrGLsizei width, | |
77 GrGLsizei height); | |
78 | |
79 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCullFace(GrGLenum mode); | |
80 | |
81 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDepthMask(GrGLboolean flag); | |
82 | |
83 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisable(GrGLenum cap); | |
84 | |
85 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisableVertexAttribArray(GrGLuint index); | |
86 | |
87 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawArrays(GrGLenum mode, GrGLint first, GrGL
sizei count); | |
88 | |
89 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawArraysInstanced(GrGLenum mode, | |
90 GrGLint first, | |
91 GrGLsizei count, | |
92 GrGLsizei primcount); | |
93 | |
94 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffer(GrGLenum mode); | |
95 | |
96 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffers(GrGLsizei n, | |
97 const GrGLenum* bufs); | |
98 | |
99 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawElements(GrGLenum mode, | |
100 GrGLsizei count, | |
101 GrGLenum type, | |
102 const GrGLvoid* indices); | |
103 | |
104 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawElementsInstanced(GrGLenum mode, | |
105 GrGLsizei count, | |
106 GrGLenum type, | |
107 const GrGLvoid* indices
, | |
108 GrGLsizei primcount); | |
109 | |
110 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnable(GrGLenum cap); | |
111 | |
112 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnableVertexAttribArray(GrGLuint index); | |
113 | |
114 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEndQuery(GrGLenum target); | |
115 | |
116 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFinish(); | |
117 | |
118 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFlush(); | |
119 | |
120 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFrontFace(GrGLenum mode); | |
121 | |
122 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLMatrixLoadf(GrGLenum, const GrGLfloat*); | |
123 | |
124 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLMatrixLoadIdentity(GrGLenum); | |
125 | |
126 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLineWidth(GrGLfloat width); | |
127 | |
128 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLinkProgram(GrGLuint program); | |
129 | |
130 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLQueryCounter(GrGLuint id, | |
131 GrGLenum target); | |
132 | |
133 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLReadBuffer(GrGLenum src); | |
134 | |
135 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLScissor(GrGLint x, | |
136 GrGLint y, | |
137 GrGLsizei width, | |
138 GrGLsizei height); | |
139 | |
140 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLShaderSource(GrGLuint shader, | |
141 GrGLsizei count, | |
142 #if GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE | |
143 const char* const * str, | |
144 #else | |
145 const char** str, | |
146 #endif | |
147 const GrGLint* length); | |
148 | |
149 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilFunc(GrGLenum func, GrGLint ref, GrGLu
int mask); | |
150 | |
151 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilFuncSeparate(GrGLenum face, | |
152 GrGLenum func, | |
153 GrGLint ref, | |
154 GrGLuint mask); | |
155 | |
156 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilMask(GrGLuint mask); | |
157 | |
158 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilMaskSeparate(GrGLenum face, GrGLuint m
ask); | |
159 | |
160 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilOp(GrGLenum fail, GrGLenum zfail, GrGL
enum zpass); | |
161 | |
162 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilOpSeparate(GrGLenum face, | |
163 GrGLenum fail, | |
164 GrGLenum zfail, | |
165 GrGLenum zpass); | |
166 | |
167 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexBuffer(GrGLenum target, | |
168 GrGLint internalformat, | |
169 GrGLuint buffer); | |
170 | |
171 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexImage2D(GrGLenum target, | |
172 GrGLint level, | |
173 GrGLint internalformat, | |
174 GrGLsizei width, | |
175 GrGLsizei height, | |
176 GrGLint border, | |
177 GrGLenum format, | |
178 GrGLenum type, | |
179 const GrGLvoid* pixels); | |
180 | |
181 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexParameteri(GrGLenum target, GrGLenum pname
, GrGLint param); | |
182 | |
183 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexParameteriv(GrGLenum target, | |
184 GrGLenum pname, | |
185 const GrGLint* params); | |
186 | |
187 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexStorage2D(GrGLenum target, | |
188 GrGLsizei levels, | |
189 GrGLenum internalformat, | |
190 GrGLsizei width, | |
191 GrGLsizei height); | |
192 | |
193 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDiscardFramebuffer(GrGLenum target, | |
194 GrGLsizei numAttachments, | |
195 const GrGLenum* attachment
s); | |
196 | |
197 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexSubImage2D(GrGLenum target, | |
198 GrGLint level, | |
199 GrGLint xoffset, | |
200 GrGLint yoffset, | |
201 GrGLsizei width, | |
202 GrGLsizei height, | |
203 GrGLenum format, | |
204 GrGLenum type, | |
205 const GrGLvoid* pixels); | |
206 | |
207 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1f(GrGLint location, GrGLfloat v0); | |
208 | |
209 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1i(GrGLint location, GrGLint v0); | |
210 | |
211 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1fv(GrGLint location, | |
212 GrGLsizei count, | |
213 const GrGLfloat* v); | |
214 | |
215 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1iv(GrGLint location, | |
216 GrGLsizei count, | |
217 const GrGLint* v); | |
218 | |
219 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2f(GrGLint location, | |
220 GrGLfloat v0, | |
221 GrGLfloat v1); | |
222 | |
223 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2i(GrGLint location, GrGLint v0, GrGLi
nt v1); | |
224 | |
225 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2fv(GrGLint location, | |
226 GrGLsizei count, | |
227 const GrGLfloat* v); | |
228 | |
229 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2iv(GrGLint location, | |
230 GrGLsizei count, | |
231 const GrGLint* v); | |
232 | |
233 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3f(GrGLint location, | |
234 GrGLfloat v0, | |
235 GrGLfloat v1, | |
236 GrGLfloat v2); | |
237 | |
238 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3i(GrGLint location, | |
239 GrGLint v0, | |
240 GrGLint v1, | |
241 GrGLint v2); | |
242 | |
243 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3fv(GrGLint location, | |
244 GrGLsizei count, | |
245 const GrGLfloat* v); | |
246 | |
247 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3iv(GrGLint location, | |
248 GrGLsizei count, | |
249 const GrGLint* v); | |
250 | |
251 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4f(GrGLint location, | |
252 GrGLfloat v0, | |
253 GrGLfloat v1, | |
254 GrGLfloat v2, | |
255 GrGLfloat v3); | |
256 | |
257 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4i(GrGLint location, | |
258 GrGLint v0, | |
259 GrGLint v1, | |
260 GrGLint v2, | |
261 GrGLint v3); | |
262 | |
263 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4fv(GrGLint location, | |
264 GrGLsizei count, | |
265 const GrGLfloat* v); | |
266 | |
267 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4iv(GrGLint location, | |
268 GrGLsizei count, | |
269 const GrGLint* v); | |
270 | |
271 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix2fv(GrGLint location, | |
272 GrGLsizei count, | |
273 GrGLboolean transpose, | |
274 const GrGLfloat* value); | |
275 | |
276 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix3fv(GrGLint location, | |
277 GrGLsizei count, | |
278 GrGLboolean transpose, | |
279 const GrGLfloat* value); | |
280 | |
281 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix4fv(GrGLint location, | |
282 GrGLsizei count, | |
283 GrGLboolean transpose, | |
284 const GrGLfloat* value); | |
285 | |
286 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib1f(GrGLuint indx, const GrGLfloa
t value); | |
287 | |
288 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib2fv(GrGLuint indx, const GrGLflo
at* values); | |
289 | |
290 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib3fv(GrGLuint indx, const GrGLflo
at* values); | |
291 | |
292 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib4fv(GrGLuint indx, const GrGLflo
at* values); | |
293 | |
294 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribIPointer(GrGLuint indx, | |
295 GrGLint size, | |
296 GrGLenum type, | |
297 GrGLsizei stride, | |
298 const GrGLvoid* ptr); | |
299 | |
300 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribPointer(GrGLuint indx, | |
301 GrGLint size, | |
302 GrGLenum type, | |
303 GrGLboolean normalized, | |
304 GrGLsizei stride, | |
305 const GrGLvoid* ptr); | |
306 | |
307 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribDivisor(GrGLuint index, GrGLuint
divisor); | |
308 | |
309 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLViewport(GrGLint x, | |
310 GrGLint y, | |
311 GrGLsizei width, | |
312 GrGLsizei height); | |
313 | |
314 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetFramebufferAttachmentParameteriv(GrGLenu
m target, | |
315 GrGLenu
m attachment, | |
316 GrGLenu
m pname, | |
317 GrGLint
* params); | |
318 | |
319 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetRenderbufferParameteriv(GrGLenum target, | |
320 GrGLenum pname, | |
321 GrGLint* params); | |
322 | |
323 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLRenderbufferStorage(GrGLenum target, | |
324 GrGLenum internalformat, | |
325 GrGLsizei width, | |
326 GrGLsizei height); | |
327 | |
328 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLRenderbufferStorageMultisample(GrGLenum targe
t, | |
329 GrGLsizei samp
les, | |
330 GrGLenum inter
nalformat, | |
331 GrGLsizei widt
h, | |
332 GrGLsizei heig
ht); | |
333 | |
334 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlitFramebuffer(GrGLint srcX0, | |
335 GrGLint srcY0, | |
336 GrGLint srcX1, | |
337 GrGLint srcY1, | |
338 GrGLint dstX0, | |
339 GrGLint dstY0, | |
340 GrGLint dstX1, | |
341 GrGLint dstY1, | |
342 GrGLbitfield mask, | |
343 GrGLenum filter); | |
344 | |
345 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLResolveMultisampleFramebuffer(); | |
346 | |
347 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocationIndexed(GrGLuint program, | |
348 GrGLuint colorNum
ber, | |
349 GrGLuint index, | |
350 const GrGLchar *
name); | |
351 | |
352 GrGLenum GR_GL_FUNCTION_TYPE noOpGLCheckFramebufferStatus(GrGLenum target); | |
353 | |
354 // this function can be used for all glGen*(GLsize i, GLuint*) functions | |
355 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGenIds(GrGLsizei n, GrGLuint* ids); | |
356 | |
357 // this function function can be used for all glDelete*(GLsize i, const GLuint*) | |
358 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDeleteIds(GrGLsizei n, const GrGLuint* ids); | |
359 | |
360 GrGLenum GR_GL_FUNCTION_TYPE noOpGLGetError(); | |
361 | |
362 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetIntegerv(GrGLenum pname, GrGLint* params); | |
363 | |
364 // can be used for both the program and shader info logs | |
365 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetInfoLog(GrGLuint program, | |
366 GrGLsizei bufsize, | |
367 GrGLsizei* length, | |
368 char* infolog); | |
369 | |
370 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetMultisamplefv(GrGLenum pname, GrGLuint ind
ex, GrGLfloat* val); | |
371 | |
372 // can be used for both the program and shader params | |
373 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetShaderOrProgramiv(GrGLuint program, | |
374 GrGLenum pname, | |
375 GrGLint* params); | |
376 | |
377 // Queries on bogus GLs just don't do anything at all. We could potentially make
the timers work. | |
378 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryiv(GrGLenum GLtarget, | |
379 GrGLenum pname, | |
380 GrGLint *params); | |
381 | |
382 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjecti64v(GrGLuint id, | |
383 GrGLenum pname, | |
384 GrGLint64 *params); | |
385 | |
386 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectiv(GrGLuint id, GrGLenum pname,
GrGLint *params); | |
387 | |
388 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectui64v(GrGLuint id, | |
389 GrGLenum pname, | |
390 GrGLuint64 *params); | |
391 | |
392 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectuiv(GrGLuint id, | |
393 GrGLenum pname, | |
394 GrGLuint *params); | |
395 | |
396 const GrGLubyte* GR_GL_FUNCTION_TYPE noOpGLGetString(GrGLenum name); | |
397 | |
398 const GrGLubyte* GR_GL_FUNCTION_TYPE noOpGLGetStringi(GrGLenum name, GrGLuint i)
; | |
399 | |
400 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetTexLevelParameteriv(GrGLenum target, | |
401 GrGLint level, | |
402 GrGLenum pname, | |
403 GrGLint* params); | |
404 | |
405 GrGLint GR_GL_FUNCTION_TYPE noOpGLGetUniformLocation(GrGLuint program, const cha
r* name); | |
406 | |
407 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLInsertEventMarker(GrGLsizei length, const cha
r* marker); | |
408 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPushGroupMarker(GrGLsizei length , const cha
r* marker); | |
409 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPopGroupMarker(); | |
410 | |
411 #endif | |
OLD | NEW |