| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 "gl/GrGLInterface.h" | 10 #include "gl/GrGLInterface.h" |
| 11 #include "gl/GrGLExtensions.h" | |
| 12 #include "../GrGLUtil.h" | 11 #include "../GrGLUtil.h" |
| 13 | 12 |
| 14 #include <dlfcn.h> | 13 #include <dlfcn.h> |
| 15 | 14 |
| 16 // We get the proc addresss of all GL functions dynamically because we sometimes
link against | 15 // We get the proc addresss of all GL functions dynamically because we sometimes
link against |
| 17 // alternative GL implementations (e.g. MESA) in addition to the native GL imple
mentation. | 16 // alternative GL implementations (e.g. MESA) in addition to the native GL imple
mentation. |
| 18 class GLLoader { | 17 class GLLoader { |
| 19 public: | 18 public: |
| 20 GLLoader() { | 19 GLLoader() { |
| 21 fLibrary = dlopen( | 20 fLibrary = dlopen( |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 GET_PROC_SUFFIX(RenderbufferStorageMultisample, EXT); | 233 GET_PROC_SUFFIX(RenderbufferStorageMultisample, EXT); |
| 235 } | 234 } |
| 236 if (extensions.has("GL_EXT_framebuffer_blit")) { | 235 if (extensions.has("GL_EXT_framebuffer_blit")) { |
| 237 GET_PROC_SUFFIX(BlitFramebuffer, EXT); | 236 GET_PROC_SUFFIX(BlitFramebuffer, EXT); |
| 238 } | 237 } |
| 239 } | 238 } |
| 240 if (ver >= GR_GL_VER(3,3) || extensions.has("GL_ARB_blend_func_extended")) { | 239 if (ver >= GR_GL_VER(3,3) || extensions.has("GL_ARB_blend_func_extended")) { |
| 241 // ARB extension doesn't use the ARB suffix on the function name | 240 // ARB extension doesn't use the ARB suffix on the function name |
| 242 GET_PROC(BindFragDataLocationIndexed); | 241 GET_PROC(BindFragDataLocationIndexed); |
| 243 } | 242 } |
| 243 |
| 244 interface->fExtensions.swap(&extensions); |
| 244 return interface; | 245 return interface; |
| 245 } | 246 } |
| OLD | NEW |