commit-bot@chromium.org | 9add5dc | 2014-04-29 20:06:22 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 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 | #include "gl/GrGLInterface.h" |
| 9 | |
commit-bot@chromium.org | 9add5dc | 2014-04-29 20:06:22 +0000 | [diff] [blame] | 10 | typedef GrGLFuncPtr (*GrGLGetProc)(void* ctx, const char name[]); |
| 11 | |
bsalomon | a721c81 | 2014-08-26 11:35:23 -0700 | [diff] [blame] | 12 | |
| 13 | /** |
| 14 | * Generic function for creating a GrGLInterface for an either OpenGL or GLES. It calls |
| 15 | * get() to get each function address. ctx is a generic ptr passed to and interpreted by get(). |
| 16 | */ |
bsalomon | 062bd86 | 2016-03-31 10:22:20 -0700 | [diff] [blame] | 17 | SK_API const GrGLInterface* GrGLAssembleInterface(void* ctx, GrGLGetProc get); |
bsalomon | a721c81 | 2014-08-26 11:35:23 -0700 | [diff] [blame] | 18 | |
commit-bot@chromium.org | 9add5dc | 2014-04-29 20:06:22 +0000 | [diff] [blame] | 19 | /** |
| 20 | * Generic function for creating a GrGLInterface for an OpenGL (but not GLES) context. It calls |
| 21 | * get() to get each function address. ctx is a generic ptr passed to and interpreted by get(). |
| 22 | */ |
bsalomon | 062bd86 | 2016-03-31 10:22:20 -0700 | [diff] [blame] | 23 | SK_API const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get); |
bsalomon | a721c81 | 2014-08-26 11:35:23 -0700 | [diff] [blame] | 24 | |
| 25 | /** |
| 26 | * Generic function for creating a GrGLInterface for an OpenGL ES (but not Open GL) context. It |
| 27 | * calls get() to get each function address. ctx is a generic ptr passed to and interpreted by |
| 28 | * get(). |
| 29 | */ |
bsalomon | 062bd86 | 2016-03-31 10:22:20 -0700 | [diff] [blame] | 30 | SK_API const GrGLInterface* GrGLAssembleGLESInterface(void* ctx, GrGLGetProc get); |