michael@0: /* michael@0: * Copyright 2013 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: #ifndef GrGLNoOpInterface_DEFINED michael@0: #define GrGLNoOpInterface_DEFINED michael@0: michael@0: #include "gl/GrGLDefines.h" michael@0: #include "gl/GrGLFunctions.h" michael@0: michael@0: // These are constants/functions that are common to the Null and Debug GL interface implementations. michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendColor(GrGLclampf red, michael@0: GrGLclampf green, michael@0: GrGLclampf blue, michael@0: GrGLclampf alpha); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocation(GrGLuint program, michael@0: GrGLuint colorNumber, michael@0: const GrGLchar* name); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendFunc(GrGLenum sfactor, michael@0: GrGLenum dfactor); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBufferSubData(GrGLenum target, michael@0: GrGLintptr offset, michael@0: GrGLsizeiptr size, michael@0: const GrGLvoid* data); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLClear(GrGLbitfield mask); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLClearColor(GrGLclampf red, michael@0: GrGLclampf green, michael@0: GrGLclampf blue, michael@0: GrGLclampf alpha); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLClearStencil(GrGLint s); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLColorMask(GrGLboolean red, michael@0: GrGLboolean green, michael@0: GrGLboolean blue, michael@0: GrGLboolean alpha); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCompileShader(GrGLuint shader); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCompressedTexImage2D(GrGLenum target, michael@0: GrGLint level, michael@0: GrGLenum internalformat, michael@0: GrGLsizei width, michael@0: GrGLsizei height, michael@0: GrGLint border, michael@0: GrGLsizei imageSize, michael@0: const GrGLvoid* data); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCopyTexSubImage2D(GrGLenum target, michael@0: GrGLint level, michael@0: GrGLint xoffset, michael@0: GrGLint yoffset, michael@0: GrGLint x, michael@0: GrGLint y, michael@0: GrGLsizei width, michael@0: GrGLsizei height); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCullFace(GrGLenum mode); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDepthMask(GrGLboolean flag); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisable(GrGLenum cap); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisableVertexAttribArray(GrGLuint index); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawArrays(GrGLenum mode, GrGLint first, GrGLsizei count); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffer(GrGLenum mode); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffers(GrGLsizei n, michael@0: const GrGLenum* bufs); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawElements(GrGLenum mode, michael@0: GrGLsizei count, michael@0: GrGLenum type, michael@0: const GrGLvoid* indices); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnable(GrGLenum cap); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnableVertexAttribArray(GrGLuint index); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEndQuery(GrGLenum target); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFinish(); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFlush(); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFrontFace(GrGLenum mode); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLoadIdentity(); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLoadMatrixf(const GrGLfloat*); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLineWidth(GrGLfloat width); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLinkProgram(GrGLuint program); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLMatrixMode(GrGLenum); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLQueryCounter(GrGLuint id, michael@0: GrGLenum target); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLReadBuffer(GrGLenum src); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLScissor(GrGLint x, michael@0: GrGLint y, michael@0: GrGLsizei width, michael@0: GrGLsizei height); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLShaderSource(GrGLuint shader, michael@0: GrGLsizei count, michael@0: #if GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE michael@0: const char* const * str, michael@0: #else michael@0: const char** str, michael@0: #endif michael@0: const GrGLint* length); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilFunc(GrGLenum func, GrGLint ref, GrGLuint mask); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilFuncSeparate(GrGLenum face, michael@0: GrGLenum func, michael@0: GrGLint ref, michael@0: GrGLuint mask); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilMask(GrGLuint mask); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilMaskSeparate(GrGLenum face, GrGLuint mask); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilOp(GrGLenum fail, GrGLenum zfail, GrGLenum zpass); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilOpSeparate(GrGLenum face, michael@0: GrGLenum fail, michael@0: GrGLenum zfail, michael@0: GrGLenum zpass); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexImage2D(GrGLenum target, michael@0: GrGLint level, michael@0: GrGLint internalformat, michael@0: GrGLsizei width, michael@0: GrGLsizei height, michael@0: GrGLint border, michael@0: GrGLenum format, michael@0: GrGLenum type, michael@0: const GrGLvoid* pixels); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexParameteri(GrGLenum target, GrGLenum pname, GrGLint param); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexParameteriv(GrGLenum target, michael@0: GrGLenum pname, michael@0: const GrGLint* params); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexStorage2D(GrGLenum target, michael@0: GrGLsizei levels, michael@0: GrGLenum internalformat, michael@0: GrGLsizei width, michael@0: GrGLsizei height); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexGenf(GrGLenum, GrGLenum, GrGLfloat); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexGenfv(GrGLenum, GrGLenum, const GrGLfloat*); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexGeni(GrGLenum, GrGLenum, GrGLint); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDiscardFramebuffer(GrGLenum target, michael@0: GrGLsizei numAttachments, michael@0: const GrGLenum* attachments); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexSubImage2D(GrGLenum target, michael@0: GrGLint level, michael@0: GrGLint xoffset, michael@0: GrGLint yoffset, michael@0: GrGLsizei width, michael@0: GrGLsizei height, michael@0: GrGLenum format, michael@0: GrGLenum type, michael@0: const GrGLvoid* pixels); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1f(GrGLint location, GrGLfloat v0); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1i(GrGLint location, GrGLint v0); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1fv(GrGLint location, michael@0: GrGLsizei count, michael@0: const GrGLfloat* v); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1iv(GrGLint location, michael@0: GrGLsizei count, michael@0: const GrGLint* v); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2f(GrGLint location, michael@0: GrGLfloat v0, michael@0: GrGLfloat v1); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2i(GrGLint location, GrGLint v0, GrGLint v1); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2fv(GrGLint location, michael@0: GrGLsizei count, michael@0: const GrGLfloat* v); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2iv(GrGLint location, michael@0: GrGLsizei count, michael@0: const GrGLint* v); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3f(GrGLint location, michael@0: GrGLfloat v0, michael@0: GrGLfloat v1, michael@0: GrGLfloat v2); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3i(GrGLint location, michael@0: GrGLint v0, michael@0: GrGLint v1, michael@0: GrGLint v2); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3fv(GrGLint location, michael@0: GrGLsizei count, michael@0: const GrGLfloat* v); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3iv(GrGLint location, michael@0: GrGLsizei count, michael@0: const GrGLint* v); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4f(GrGLint location, michael@0: GrGLfloat v0, michael@0: GrGLfloat v1, michael@0: GrGLfloat v2, michael@0: GrGLfloat v3); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4i(GrGLint location, michael@0: GrGLint v0, michael@0: GrGLint v1, michael@0: GrGLint v2, michael@0: GrGLint v3); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4fv(GrGLint location, michael@0: GrGLsizei count, michael@0: const GrGLfloat* v); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4iv(GrGLint location, michael@0: GrGLsizei count, michael@0: const GrGLint* v); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix2fv(GrGLint location, michael@0: GrGLsizei count, michael@0: GrGLboolean transpose, michael@0: const GrGLfloat* value); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix3fv(GrGLint location, michael@0: GrGLsizei count, michael@0: GrGLboolean transpose, michael@0: const GrGLfloat* value); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix4fv(GrGLint location, michael@0: GrGLsizei count, michael@0: GrGLboolean transpose, michael@0: const GrGLfloat* value); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib4fv(GrGLuint indx, const GrGLfloat* values); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribPointer(GrGLuint indx, michael@0: GrGLint size, michael@0: GrGLenum type, michael@0: GrGLboolean normalized, michael@0: GrGLsizei stride, michael@0: const GrGLvoid* ptr); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLViewport(GrGLint x, michael@0: GrGLint y, michael@0: GrGLsizei width, michael@0: GrGLsizei height); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetFramebufferAttachmentParameteriv(GrGLenum target, michael@0: GrGLenum attachment, michael@0: GrGLenum pname, michael@0: GrGLint* params); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetRenderbufferParameteriv(GrGLenum target, michael@0: GrGLenum pname, michael@0: GrGLint* params); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLRenderbufferStorage(GrGLenum target, michael@0: GrGLenum internalformat, michael@0: GrGLsizei width, michael@0: GrGLsizei height); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLRenderbufferStorageMultisample(GrGLenum target, michael@0: GrGLsizei samples, michael@0: GrGLenum internalformat, michael@0: GrGLsizei width, michael@0: GrGLsizei height); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlitFramebuffer(GrGLint srcX0, michael@0: GrGLint srcY0, michael@0: GrGLint srcX1, michael@0: GrGLint srcY1, michael@0: GrGLint dstX0, michael@0: GrGLint dstY0, michael@0: GrGLint dstX1, michael@0: GrGLint dstY1, michael@0: GrGLbitfield mask, michael@0: GrGLenum filter); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLResolveMultisampleFramebuffer(); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocationIndexed(GrGLuint program, michael@0: GrGLuint colorNumber, michael@0: GrGLuint index, michael@0: const GrGLchar * name); michael@0: michael@0: GrGLenum GR_GL_FUNCTION_TYPE noOpGLCheckFramebufferStatus(GrGLenum target); michael@0: michael@0: // this function can be used for all glGen*(GLsize i, GLuint*) functions michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGenIds(GrGLsizei n, GrGLuint* ids); michael@0: michael@0: // this function function can be used for all glDelete*(GLsize i, const GLuint*) michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDeleteIds(GrGLsizei n, const GrGLuint* ids); michael@0: michael@0: GrGLenum GR_GL_FUNCTION_TYPE noOpGLGetError(); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetIntegerv(GrGLenum pname, GrGLint* params); michael@0: michael@0: // can be used for both the program and shader info logs michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetInfoLog(GrGLuint program, michael@0: GrGLsizei bufsize, michael@0: GrGLsizei* length, michael@0: char* infolog); michael@0: michael@0: // can be used for both the program and shader params michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetShaderOrProgramiv(GrGLuint program, michael@0: GrGLenum pname, michael@0: GrGLint* params); michael@0: michael@0: // Queries on bogus GLs just don't do anything at all. We could potentially make the timers work. michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryiv(GrGLenum GLtarget, michael@0: GrGLenum pname, michael@0: GrGLint *params); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjecti64v(GrGLuint id, michael@0: GrGLenum pname, michael@0: GrGLint64 *params); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectiv(GrGLuint id, GrGLenum pname, GrGLint *params); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectui64v(GrGLuint id, michael@0: GrGLenum pname, michael@0: GrGLuint64 *params); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectuiv(GrGLuint id, michael@0: GrGLenum pname, michael@0: GrGLuint *params); michael@0: michael@0: const GrGLubyte* GR_GL_FUNCTION_TYPE noOpGLGetString(GrGLenum name); michael@0: michael@0: const GrGLubyte* GR_GL_FUNCTION_TYPE noOpGLGetStringi(GrGLenum name, GrGLuint i); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetTexLevelParameteriv(GrGLenum target, michael@0: GrGLint level, michael@0: GrGLenum pname, michael@0: GrGLint* params); michael@0: michael@0: GrGLint GR_GL_FUNCTION_TYPE noOpGLGetUniformLocation(GrGLuint program, const char* name); michael@0: michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLInsertEventMarker(GrGLsizei length, const char* marker); michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPushGroupMarker(GrGLsizei length , const char* marker); michael@0: GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPopGroupMarker(); michael@0: michael@0: #endif