bsalomon@google.com | 9c58f46 | 2013-02-26 14:45:41 +0000 | [diff] [blame] | 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/GrGLFunctions.h" |
| 13 | |
| 14 | // These are constants/functions that are common to the Null and Debug GL interface implementations. |
| 15 | |
| 16 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendColor(GrGLclampf red, |
| 17 | GrGLclampf green, |
| 18 | GrGLclampf blue, |
| 19 | GrGLclampf alpha); |
| 20 | |
| 21 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocation(GrGLuint program, |
| 22 | GrGLuint colorNumber, |
| 23 | const GrGLchar* name); |
| 24 | |
| 25 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendFunc(GrGLenum sfactor, |
| 26 | GrGLenum dfactor); |
| 27 | |
| 28 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBufferSubData(GrGLenum target, |
| 29 | GrGLintptr offset, |
| 30 | GrGLsizeiptr size, |
| 31 | const GrGLvoid* data); |
| 32 | |
| 33 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLClear(GrGLbitfield mask); |
| 34 | |
| 35 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLClearColor(GrGLclampf red, |
| 36 | GrGLclampf green, |
| 37 | GrGLclampf blue, |
| 38 | GrGLclampf alpha); |
| 39 | |
| 40 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLClearStencil(GrGLint s); |
| 41 | |
| 42 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLColorMask(GrGLboolean red, |
| 43 | GrGLboolean green, |
| 44 | GrGLboolean blue, |
| 45 | GrGLboolean alpha); |
| 46 | |
| 47 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCompileShader(GrGLuint shader); |
| 48 | |
| 49 | GrGLvoid 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 | |
krajcevski | 37d20f7 | 2014-06-11 10:38:47 -0700 | [diff] [blame] | 58 | GrGLvoid 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.org | 98168bb | 2013-04-11 22:00:34 +0000 | [diff] [blame] | 68 | GrGLvoid 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.com | 9c58f46 | 2013-02-26 14:45:41 +0000 | [diff] [blame] | 77 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLCullFace(GrGLenum mode); |
| 78 | |
| 79 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDepthMask(GrGLboolean flag); |
| 80 | |
| 81 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisable(GrGLenum cap); |
| 82 | |
| 83 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisableVertexAttribArray(GrGLuint index); |
| 84 | |
| 85 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawArrays(GrGLenum mode, GrGLint first, GrGLsizei count); |
| 86 | |
| 87 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffer(GrGLenum mode); |
| 88 | |
| 89 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffers(GrGLsizei n, |
| 90 | const GrGLenum* bufs); |
| 91 | |
| 92 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawElements(GrGLenum mode, |
| 93 | GrGLsizei count, |
| 94 | GrGLenum type, |
| 95 | const GrGLvoid* indices); |
| 96 | |
| 97 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnable(GrGLenum cap); |
| 98 | |
| 99 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnableVertexAttribArray(GrGLuint index); |
| 100 | |
| 101 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEndQuery(GrGLenum target); |
| 102 | |
| 103 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFinish(); |
| 104 | |
| 105 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFlush(); |
| 106 | |
| 107 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLFrontFace(GrGLenum mode); |
| 108 | |
commit-bot@chromium.org | f669672 | 2014-04-25 06:21:30 +0000 | [diff] [blame] | 109 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLMatrixLoadf(GrGLenum, const GrGLfloat*); |
commit-bot@chromium.org | 46fbfe0 | 2013-08-30 15:52:12 +0000 | [diff] [blame] | 110 | |
commit-bot@chromium.org | f669672 | 2014-04-25 06:21:30 +0000 | [diff] [blame] | 111 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLMatrixLoadIdentity(GrGLenum); |
commit-bot@chromium.org | 46fbfe0 | 2013-08-30 15:52:12 +0000 | [diff] [blame] | 112 | |
bsalomon@google.com | 9c58f46 | 2013-02-26 14:45:41 +0000 | [diff] [blame] | 113 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLineWidth(GrGLfloat width); |
| 114 | |
| 115 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLLinkProgram(GrGLuint program); |
| 116 | |
| 117 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLQueryCounter(GrGLuint id, |
| 118 | GrGLenum target); |
| 119 | |
| 120 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLReadBuffer(GrGLenum src); |
| 121 | |
| 122 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLScissor(GrGLint x, |
| 123 | GrGLint y, |
| 124 | GrGLsizei width, |
| 125 | GrGLsizei height); |
| 126 | |
| 127 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLShaderSource(GrGLuint shader, |
| 128 | GrGLsizei count, |
bsalomon@google.com | 26fb61a | 2013-02-28 19:26:04 +0000 | [diff] [blame] | 129 | #if GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE |
bsalomon@google.com | 9c58f46 | 2013-02-26 14:45:41 +0000 | [diff] [blame] | 130 | const char* const * str, |
| 131 | #else |
| 132 | const char** str, |
| 133 | #endif |
| 134 | const GrGLint* length); |
| 135 | |
| 136 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilFunc(GrGLenum func, GrGLint ref, GrGLuint mask); |
| 137 | |
| 138 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilFuncSeparate(GrGLenum face, |
| 139 | GrGLenum func, |
| 140 | GrGLint ref, |
| 141 | GrGLuint mask); |
| 142 | |
| 143 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilMask(GrGLuint mask); |
| 144 | |
| 145 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilMaskSeparate(GrGLenum face, GrGLuint mask); |
| 146 | |
| 147 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilOp(GrGLenum fail, GrGLenum zfail, GrGLenum zpass); |
| 148 | |
| 149 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLStencilOpSeparate(GrGLenum face, |
| 150 | GrGLenum fail, |
| 151 | GrGLenum zfail, |
| 152 | GrGLenum zpass); |
| 153 | |
| 154 | GrGLvoid 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 | |
| 164 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexParameteri(GrGLenum target, GrGLenum pname, GrGLint param); |
| 165 | |
| 166 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexParameteriv(GrGLenum target, |
| 167 | GrGLenum pname, |
| 168 | const GrGLint* params); |
| 169 | |
| 170 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexStorage2D(GrGLenum target, |
| 171 | GrGLsizei levels, |
| 172 | GrGLenum internalformat, |
| 173 | GrGLsizei width, |
| 174 | GrGLsizei height); |
| 175 | |
skia.committer@gmail.com | 8152113 | 2013-04-30 07:01:03 +0000 | [diff] [blame] | 176 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDiscardFramebuffer(GrGLenum target, |
| 177 | GrGLsizei numAttachments, |
robertphillips@google.com | a6ffb58 | 2013-04-29 16:50:17 +0000 | [diff] [blame] | 178 | const GrGLenum* attachments); |
| 179 | |
bsalomon@google.com | 9c58f46 | 2013-02-26 14:45:41 +0000 | [diff] [blame] | 180 | GrGLvoid 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 | |
| 190 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1f(GrGLint location, GrGLfloat v0); |
| 191 | |
| 192 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1i(GrGLint location, GrGLint v0); |
| 193 | |
| 194 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1fv(GrGLint location, |
| 195 | GrGLsizei count, |
| 196 | const GrGLfloat* v); |
| 197 | |
| 198 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform1iv(GrGLint location, |
| 199 | GrGLsizei count, |
| 200 | const GrGLint* v); |
| 201 | |
| 202 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2f(GrGLint location, |
| 203 | GrGLfloat v0, |
| 204 | GrGLfloat v1); |
| 205 | |
| 206 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2i(GrGLint location, GrGLint v0, GrGLint v1); |
| 207 | |
| 208 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2fv(GrGLint location, |
| 209 | GrGLsizei count, |
| 210 | const GrGLfloat* v); |
| 211 | |
| 212 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform2iv(GrGLint location, |
| 213 | GrGLsizei count, |
| 214 | const GrGLint* v); |
| 215 | |
| 216 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3f(GrGLint location, |
| 217 | GrGLfloat v0, |
| 218 | GrGLfloat v1, |
| 219 | GrGLfloat v2); |
| 220 | |
| 221 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3i(GrGLint location, |
| 222 | GrGLint v0, |
| 223 | GrGLint v1, |
| 224 | GrGLint v2); |
| 225 | |
| 226 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3fv(GrGLint location, |
| 227 | GrGLsizei count, |
| 228 | const GrGLfloat* v); |
| 229 | |
| 230 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform3iv(GrGLint location, |
| 231 | GrGLsizei count, |
| 232 | const GrGLint* v); |
| 233 | |
| 234 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4f(GrGLint location, |
| 235 | GrGLfloat v0, |
| 236 | GrGLfloat v1, |
| 237 | GrGLfloat v2, |
| 238 | GrGLfloat v3); |
| 239 | |
| 240 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4i(GrGLint location, |
| 241 | GrGLint v0, |
| 242 | GrGLint v1, |
| 243 | GrGLint v2, |
| 244 | GrGLint v3); |
| 245 | |
| 246 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4fv(GrGLint location, |
| 247 | GrGLsizei count, |
| 248 | const GrGLfloat* v); |
| 249 | |
| 250 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniform4iv(GrGLint location, |
| 251 | GrGLsizei count, |
| 252 | const GrGLint* v); |
| 253 | |
| 254 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix2fv(GrGLint location, |
| 255 | GrGLsizei count, |
| 256 | GrGLboolean transpose, |
| 257 | const GrGLfloat* value); |
| 258 | |
| 259 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix3fv(GrGLint location, |
| 260 | GrGLsizei count, |
| 261 | GrGLboolean transpose, |
| 262 | const GrGLfloat* value); |
| 263 | |
| 264 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix4fv(GrGLint location, |
| 265 | GrGLsizei count, |
| 266 | GrGLboolean transpose, |
| 267 | const GrGLfloat* value); |
| 268 | |
egdaniel | 27c1521 | 2014-10-24 15:00:50 -0700 | [diff] [blame] | 269 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib1f(GrGLuint indx, const GrGLfloat value); |
| 270 | |
| 271 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib2fv(GrGLuint indx, const GrGLfloat* values); |
| 272 | |
| 273 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib3fv(GrGLuint indx, const GrGLfloat* values); |
| 274 | |
bsalomon@google.com | 9c58f46 | 2013-02-26 14:45:41 +0000 | [diff] [blame] | 275 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib4fv(GrGLuint indx, const GrGLfloat* values); |
| 276 | |
| 277 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribPointer(GrGLuint indx, |
| 278 | GrGLint size, |
| 279 | GrGLenum type, |
| 280 | GrGLboolean normalized, |
| 281 | GrGLsizei stride, |
| 282 | const GrGLvoid* ptr); |
| 283 | |
| 284 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLViewport(GrGLint x, |
| 285 | GrGLint y, |
| 286 | GrGLsizei width, |
| 287 | GrGLsizei height); |
| 288 | |
| 289 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetFramebufferAttachmentParameteriv(GrGLenum target, |
| 290 | GrGLenum attachment, |
| 291 | GrGLenum pname, |
| 292 | GrGLint* params); |
| 293 | |
| 294 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetRenderbufferParameteriv(GrGLenum target, |
| 295 | GrGLenum pname, |
| 296 | GrGLint* params); |
| 297 | |
| 298 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLRenderbufferStorage(GrGLenum target, |
| 299 | GrGLenum internalformat, |
| 300 | GrGLsizei width, |
| 301 | GrGLsizei height); |
| 302 | |
| 303 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLRenderbufferStorageMultisample(GrGLenum target, |
| 304 | GrGLsizei samples, |
| 305 | GrGLenum internalformat, |
| 306 | GrGLsizei width, |
| 307 | GrGLsizei height); |
| 308 | |
| 309 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlitFramebuffer(GrGLint srcX0, |
| 310 | GrGLint srcY0, |
| 311 | GrGLint srcX1, |
| 312 | GrGLint srcY1, |
| 313 | GrGLint dstX0, |
| 314 | GrGLint dstY0, |
| 315 | GrGLint dstX1, |
| 316 | GrGLint dstY1, |
| 317 | GrGLbitfield mask, |
| 318 | GrGLenum filter); |
| 319 | |
| 320 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLResolveMultisampleFramebuffer(); |
| 321 | |
| 322 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocationIndexed(GrGLuint program, |
| 323 | GrGLuint colorNumber, |
| 324 | GrGLuint index, |
| 325 | const GrGLchar * name); |
| 326 | |
| 327 | GrGLenum GR_GL_FUNCTION_TYPE noOpGLCheckFramebufferStatus(GrGLenum target); |
| 328 | |
| 329 | // this function can be used for all glGen*(GLsize i, GLuint*) functions |
| 330 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGenIds(GrGLsizei n, GrGLuint* ids); |
| 331 | |
| 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); |
| 334 | |
| 335 | GrGLenum GR_GL_FUNCTION_TYPE noOpGLGetError(); |
| 336 | |
| 337 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetIntegerv(GrGLenum pname, GrGLint* params); |
| 338 | |
| 339 | // can be used for both the program and shader info logs |
| 340 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetInfoLog(GrGLuint program, |
| 341 | GrGLsizei bufsize, |
| 342 | GrGLsizei* length, |
| 343 | char* infolog); |
| 344 | |
| 345 | // can be used for both the program and shader params |
| 346 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetShaderOrProgramiv(GrGLuint program, |
| 347 | GrGLenum pname, |
| 348 | GrGLint* params); |
| 349 | |
| 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, |
| 352 | GrGLenum pname, |
| 353 | GrGLint *params); |
| 354 | |
| 355 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjecti64v(GrGLuint id, |
| 356 | GrGLenum pname, |
| 357 | GrGLint64 *params); |
| 358 | |
| 359 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectiv(GrGLuint id, GrGLenum pname, GrGLint *params); |
| 360 | |
| 361 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectui64v(GrGLuint id, |
| 362 | GrGLenum pname, |
| 363 | GrGLuint64 *params); |
| 364 | |
| 365 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetQueryObjectuiv(GrGLuint id, |
| 366 | GrGLenum pname, |
| 367 | GrGLuint *params); |
| 368 | |
| 369 | const GrGLubyte* GR_GL_FUNCTION_TYPE noOpGLGetString(GrGLenum name); |
| 370 | |
bsalomon@google.com | 1744f97 | 2013-02-26 21:46:32 +0000 | [diff] [blame] | 371 | const GrGLubyte* GR_GL_FUNCTION_TYPE noOpGLGetStringi(GrGLenum name, GrGLuint i); |
| 372 | |
bsalomon@google.com | 9c58f46 | 2013-02-26 14:45:41 +0000 | [diff] [blame] | 373 | GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetTexLevelParameteriv(GrGLenum target, |
| 374 | GrGLint level, |
| 375 | GrGLenum pname, |
| 376 | GrGLint* params); |
| 377 | |
| 378 | GrGLint GR_GL_FUNCTION_TYPE noOpGLGetUniformLocation(GrGLuint program, const char* name); |
| 379 | |
commit-bot@chromium.org | a3baf3b | 2014-02-21 18:45:30 +0000 | [diff] [blame] | 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(); |
| 383 | |
bsalomon@google.com | 9c58f46 | 2013-02-26 14:45:41 +0000 | [diff] [blame] | 384 | #endif |