2 * Copyright 2013 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 #ifndef GrGLNoOpInterface_DEFINED
9 #define GrGLNoOpInterface_DEFINED
11 #include "gl/GrGLDefines.h"
12 #include "gl/GrGLFunctions.h"
14 // These are constants/functions that are common to the Null and Debug GL interface implementations.
16 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendColor(GrGLclampf red,
21 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocation(GrGLuint program,
23 const GrGLchar* name);
25 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendFunc(GrGLenum sfactor,
28 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBufferSubData(GrGLenum target,
31 const GrGLvoid* data);
33 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLClear(GrGLbitfield mask);
35 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLClearColor(GrGLclampf red,
40 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLClearStencil(GrGLint s);
42 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLColorMask(GrGLboolean red,
47 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCompileShader(GrGLuint shader);
49 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCompressedTexImage2D(GrGLenum target,
51 GrGLenum internalformat,
56 const GrGLvoid* data);
58 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCompressedTexSubImage2D(GrGLenum target,
66 const GrGLvoid* data);
68 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCopyTexSubImage2D(GrGLenum target,
77 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCullFace(GrGLenum mode);
79 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDepthMask(GrGLboolean flag);
81 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisable(GrGLenum cap);
83 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisableVertexAttribArray(GrGLuint index);
85 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawArrays(GrGLenum mode, GrGLint first, GrGLsizei count);
87 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffer(GrGLenum mode);
89 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffers(GrGLsizei n,
90 const GrGLenum* bufs);
92 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawElements(GrGLenum mode,
95 const GrGLvoid* indices);
97 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnable(GrGLenum cap);
99 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnableVertexAttribArray(GrGLuint index);
101 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEndQuery(GrGLenum target);
103 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFinish();
105 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFlush();
107 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFrontFace(GrGLenum mode);
109 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLMatrixLoadf(GrGLenum, const GrGLfloat*);
111 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLMatrixLoadIdentity(GrGLenum);
113 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLineWidth(GrGLfloat width);
115 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLinkProgram(GrGLuint program);
117 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLQueryCounter(GrGLuint id,
120 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLReadBuffer(GrGLenum src);
122 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLScissor(GrGLint x,
127 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLShaderSource(GrGLuint shader,
129 #if GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE
130 const char* const * str,
134 const GrGLint* length);
136 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilFunc(GrGLenum func, GrGLint ref, GrGLuint mask);
138 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilFuncSeparate(GrGLenum face,
143 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilMask(GrGLuint mask);
145 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilMaskSeparate(GrGLenum face, GrGLuint mask);
147 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilOp(GrGLenum fail, GrGLenum zfail, GrGLenum zpass);
149 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilOpSeparate(GrGLenum face,
154 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexImage2D(GrGLenum target,
156 GrGLint internalformat,
162 const GrGLvoid* pixels);
164 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexParameteri(GrGLenum target, GrGLenum pname, GrGLint param);
166 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexParameteriv(GrGLenum target,
168 const GrGLint* params);
170 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexStorage2D(GrGLenum target,
172 GrGLenum internalformat,
176 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDiscardFramebuffer(GrGLenum target,
177 GrGLsizei numAttachments,
178 const GrGLenum* attachments);
180 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexSubImage2D(GrGLenum target,
188 const GrGLvoid* pixels);
190 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1f(GrGLint location, GrGLfloat v0);
192 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1i(GrGLint location, GrGLint v0);
194 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1fv(GrGLint location,
198 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1iv(GrGLint location,
202 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2f(GrGLint location,
206 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2i(GrGLint location, GrGLint v0, GrGLint v1);
208 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2fv(GrGLint location,
212 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2iv(GrGLint location,
216 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3f(GrGLint location,
221 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3i(GrGLint location,
226 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3fv(GrGLint location,
230 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3iv(GrGLint location,
234 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4f(GrGLint location,
240 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4i(GrGLint location,
246 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4fv(GrGLint location,
250 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4iv(GrGLint location,
254 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix2fv(GrGLint location,
256 GrGLboolean transpose,
257 const GrGLfloat* value);
259 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix3fv(GrGLint location,
261 GrGLboolean transpose,
262 const GrGLfloat* value);
264 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix4fv(GrGLint location,
266 GrGLboolean transpose,
267 const GrGLfloat* value);
269 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib1f(GrGLuint indx, const GrGLfloat value);
271 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib2fv(GrGLuint indx, const GrGLfloat* values);
273 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib3fv(GrGLuint indx, const GrGLfloat* values);
275 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib4fv(GrGLuint indx, const GrGLfloat* values);
277 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribPointer(GrGLuint indx,
280 GrGLboolean normalized,
282 const GrGLvoid* ptr);
284 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLViewport(GrGLint x,
289 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetFramebufferAttachmentParameteriv(GrGLenum target,
294 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetRenderbufferParameteriv(GrGLenum target,
298 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLRenderbufferStorage(GrGLenum target,
299 GrGLenum internalformat,
303 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLRenderbufferStorageMultisample(GrGLenum target,
305 GrGLenum internalformat,
309 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlitFramebuffer(GrGLint srcX0,
320 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLResolveMultisampleFramebuffer();
322 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocationIndexed(GrGLuint program,
323 GrGLuint colorNumber,
325 const GrGLchar * name);
327 GrGLenum GR_GL_FUNCTION_TYPE noOpGLCheckFramebufferStatus(GrGLenum target);
329 // this function can be used for all glGen*(GLsize i, GLuint*) functions
330 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGenIds(GrGLsizei n, GrGLuint* ids);
332 // this function function can be used for all glDelete*(GLsize i, const GLuint*)
333 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDeleteIds(GrGLsizei n, const GrGLuint* ids);
335 GrGLenum GR_GL_FUNCTION_TYPE noOpGLGetError();
337 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetIntegerv(GrGLenum pname, GrGLint* params);
339 // can be used for both the program and shader info logs
340 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetInfoLog(GrGLuint program,
345 // can be used for both the program and shader params
346 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetShaderOrProgramiv(GrGLuint program,
350 // Queries on bogus GLs just don't do anything at all. We could potentially make the timers work.
351 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryiv(GrGLenum GLtarget,
355 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjecti64v(GrGLuint id,
359 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectiv(GrGLuint id, GrGLenum pname, GrGLint *params);
361 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectui64v(GrGLuint id,
365 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectuiv(GrGLuint id,
369 const GrGLubyte* GR_GL_FUNCTION_TYPE noOpGLGetString(GrGLenum name);
371 const GrGLubyte* GR_GL_FUNCTION_TYPE noOpGLGetStringi(GrGLenum name, GrGLuint i);
373 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetTexLevelParameteriv(GrGLenum target,
378 GrGLint GR_GL_FUNCTION_TYPE noOpGLGetUniformLocation(GrGLuint program, const char* name);
380 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLInsertEventMarker(GrGLsizei length, const char* marker);
381 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPushGroupMarker(GrGLsizei length , const char* marker);
382 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPopGroupMarker();