OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #include "GrGLAssembleInterface.h" | 9 #include "gl/GrGLAssembleInterface.h" |
10 #include "GrGLUtil.h" | 10 #include "GrGLUtil.h" |
11 | 11 |
12 #define GET_PROC(F) functions->f ## F = (GrGL ## F ## Proc) get(ctx, "gl" #F) | 12 #define GET_PROC(F) functions->f ## F = (GrGL ## F ## Proc) get(ctx, "gl" #F) |
13 #define GET_PROC_SUFFIX(F, S) functions->f ## F = (GrGL ## F ## Proc) get(ctx, "
gl" #F #S) | 13 #define GET_PROC_SUFFIX(F, S) functions->f ## F = (GrGL ## F ## Proc) get(ctx, "
gl" #F #S) |
14 #define GET_PROC_LOCAL(F) GrGL ## F ## Proc F = (GrGL ## F ## Proc) get(ctx, "gl
" #F) | 14 #define GET_PROC_LOCAL(F) GrGL ## F ## Proc F = (GrGL ## F ## Proc) get(ctx, "gl
" #F) |
15 | 15 |
16 #define GET_EGL_PROC_SUFFIX(F, S) functions->fEGL ## F = (GrEGL ## F ## Proc) ge
t(ctx, "egl" #F #S) | 16 #define GET_EGL_PROC_SUFFIX(F, S) functions->fEGL ## F = (GrEGL ## F ## Proc) ge
t(ctx, "egl" #F #S) |
17 | 17 |
18 const GrGLInterface* GrGLAssembleInterface(void* ctx, GrGLGetProc get) { | 18 const GrGLInterface* GrGLAssembleInterface(void* ctx, GrGLGetProc get) { |
19 GET_PROC_LOCAL(GetString); | 19 GET_PROC_LOCAL(GetString); |
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 | 898 |
899 if (extensions.has("GL_OES_sample_shading")) { | 899 if (extensions.has("GL_OES_sample_shading")) { |
900 GET_PROC_SUFFIX(MinSampleShading, OES); | 900 GET_PROC_SUFFIX(MinSampleShading, OES); |
901 } | 901 } |
902 | 902 |
903 interface->fStandard = kGLES_GrGLStandard; | 903 interface->fStandard = kGLES_GrGLStandard; |
904 interface->fExtensions.swap(&extensions); | 904 interface->fExtensions.swap(&extensions); |
905 | 905 |
906 return interface; | 906 return interface; |
907 } | 907 } |
OLD | NEW |