OLD | NEW |
---|---|
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "GrGLAssembleInterface.h" | 10 #include "GrGLAssembleInterface.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 | 63 |
64 GET_PROC(ActiveTexture); | 64 GET_PROC(ActiveTexture); |
65 GET_PROC(AttachShader); | 65 GET_PROC(AttachShader); |
66 GET_PROC(BindAttribLocation); | 66 GET_PROC(BindAttribLocation); |
67 GET_PROC(BindBuffer); | 67 GET_PROC(BindBuffer); |
68 if (glVer >= GR_GL_VER(3,0)) { | 68 if (glVer >= GR_GL_VER(3,0)) { |
69 GET_PROC(BindFragDataLocation); | 69 GET_PROC(BindFragDataLocation); |
70 } | 70 } |
71 GET_PROC(BeginQuery); | 71 GET_PROC(BeginQuery); |
72 GET_PROC(BindTexture); | 72 GET_PROC(BindTexture); |
73 GET_PROC(BlendFunc); | 73 |
74 if (extensions.has("GL_KHR_blend_equation_advanced")) { | |
75 GET_PROC_SUFFIX(BlendBarrier, KHR); | |
76 } | |
74 | 77 |
75 if (glVer >= GR_GL_VER(1,4) || | 78 if (glVer >= GR_GL_VER(1,4) || |
76 extensions.has("GL_ARB_imaging") || | 79 extensions.has("GL_ARB_imaging") || |
77 extensions.has("GL_EXT_blend_color")) { | 80 extensions.has("GL_EXT_blend_color")) { |
78 GET_PROC(BlendColor); | 81 GET_PROC(BlendColor); |
79 } | 82 } |
80 | 83 |
84 if (glVer >= GR_GL_VER(1,4) || | |
85 extensions.has("GL_ARB_imaging") || | |
86 extensions.has("GL_EXT_blend_subtract")) { | |
87 GET_PROC(BlendEquation); | |
Mark Kilgard
2015/04/02 22:41:43
technically, EXT_blend_subtract (which requires EX
Chris Dalton
2015/04/17 07:53:42
Agreed. However, I did it this way to mimic how gl
| |
88 } | |
89 | |
90 GET_PROC(BlendFunc); | |
81 GET_PROC(BufferData); | 91 GET_PROC(BufferData); |
82 GET_PROC(BufferSubData); | 92 GET_PROC(BufferSubData); |
83 GET_PROC(Clear); | 93 GET_PROC(Clear); |
84 GET_PROC(ClearColor); | 94 GET_PROC(ClearColor); |
85 GET_PROC(ClearStencil); | 95 GET_PROC(ClearStencil); |
86 GET_PROC(ColorMask); | 96 GET_PROC(ColorMask); |
87 GET_PROC(CompileShader); | 97 GET_PROC(CompileShader); |
88 GET_PROC(CompressedTexImage2D); | 98 GET_PROC(CompressedTexImage2D); |
89 GET_PROC(CompressedTexSubImage2D); | 99 GET_PROC(CompressedTexSubImage2D); |
90 GET_PROC(CopyTexSubImage2D); | 100 GET_PROC(CopyTexSubImage2D); |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
325 | 335 |
326 GrGLInterface* interface = SkNEW(GrGLInterface); | 336 GrGLInterface* interface = SkNEW(GrGLInterface); |
327 GrGLInterface::Functions* functions = &interface->fFunctions; | 337 GrGLInterface::Functions* functions = &interface->fFunctions; |
328 | 338 |
329 GET_PROC(ActiveTexture); | 339 GET_PROC(ActiveTexture); |
330 GET_PROC(AttachShader); | 340 GET_PROC(AttachShader); |
331 GET_PROC(BindAttribLocation); | 341 GET_PROC(BindAttribLocation); |
332 GET_PROC(BindBuffer); | 342 GET_PROC(BindBuffer); |
333 GET_PROC(BindTexture); | 343 GET_PROC(BindTexture); |
334 GET_PROC_SUFFIX(BindVertexArray, OES); | 344 GET_PROC_SUFFIX(BindVertexArray, OES); |
345 | |
346 if (extensions.has("GL_KHR_blend_equation_advanced")) { | |
347 GET_PROC_SUFFIX(BlendBarrier, KHR); | |
348 } | |
349 | |
335 GET_PROC(BlendColor); | 350 GET_PROC(BlendColor); |
351 GET_PROC(BlendEquation); | |
336 GET_PROC(BlendFunc); | 352 GET_PROC(BlendFunc); |
337 GET_PROC(BufferData); | 353 GET_PROC(BufferData); |
338 GET_PROC(BufferSubData); | 354 GET_PROC(BufferSubData); |
339 GET_PROC(Clear); | 355 GET_PROC(Clear); |
340 GET_PROC(ClearColor); | 356 GET_PROC(ClearColor); |
341 GET_PROC(ClearStencil); | 357 GET_PROC(ClearStencil); |
342 GET_PROC(ColorMask); | 358 GET_PROC(ColorMask); |
343 GET_PROC(CompileShader); | 359 GET_PROC(CompileShader); |
344 GET_PROC(CompressedTexImage2D); | 360 GET_PROC(CompressedTexImage2D); |
345 GET_PROC(CompressedTexSubImage2D); | 361 GET_PROC(CompressedTexSubImage2D); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
517 GET_PROC_SUFFIX(StencilThenCoverStrokePathInstanced, NV); | 533 GET_PROC_SUFFIX(StencilThenCoverStrokePathInstanced, NV); |
518 GET_PROC_SUFFIX(ProgramPathFragmentInputGen, NV); | 534 GET_PROC_SUFFIX(ProgramPathFragmentInputGen, NV); |
519 GET_PROC_SUFFIX(PathMemoryGlyphIndexArray, NV); | 535 GET_PROC_SUFFIX(PathMemoryGlyphIndexArray, NV); |
520 } | 536 } |
521 | 537 |
522 interface->fStandard = kGLES_GrGLStandard; | 538 interface->fStandard = kGLES_GrGLStandard; |
523 interface->fExtensions.swap(&extensions); | 539 interface->fExtensions.swap(&extensions); |
524 | 540 |
525 return interface; | 541 return interface; |
526 } | 542 } |
OLD | NEW |