blob: 42f842e2b82d08c48556054b828d0fe5306af3a2 [file] [log] [blame]
commit-bot@chromium.org9add5dc2014-04-29 20:06:22 +00001/*
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.org9add5dc2014-04-29 20:06:22 +000010typedef GrGLFuncPtr (*GrGLGetProc)(void* ctx, const char name[]);
11
bsalomona721c812014-08-26 11:35:23 -070012/**
13 * Generic function for creating a GrGLInterface for an either OpenGL or GLES. It calls
14 * get() to get each function address. ctx is a generic ptr passed to and interpreted by get().
15 */
Brian Salomon94f509b2017-12-11 16:36:53 -050016SK_API sk_sp<const GrGLInterface> GrGLMakeAssembledInterface(void *ctx, GrGLGetProc get);
bsalomona721c812014-08-26 11:35:23 -070017
commit-bot@chromium.org9add5dc2014-04-29 20:06:22 +000018/**
19 * Generic function for creating a GrGLInterface for an OpenGL (but not GLES) context. It calls
20 * get() to get each function address. ctx is a generic ptr passed to and interpreted by get().
21 */
Brian Salomon94f509b2017-12-11 16:36:53 -050022SK_API sk_sp<const GrGLInterface> GrGLMakeAssembledGLInterface(void *ctx, GrGLGetProc get);
bsalomona721c812014-08-26 11:35:23 -070023
24/**
25 * Generic function for creating a GrGLInterface for an OpenGL ES (but not Open GL) context. It
26 * calls get() to get each function address. ctx is a generic ptr passed to and interpreted by
27 * get().
28 */
Brian Salomon94f509b2017-12-11 16:36:53 -050029SK_API sk_sp<const GrGLInterface> GrGLMakeAssembledGLESInterface(void *ctx, GrGLGetProc get);
30
31/** Deprecated version of GrGLMakeAssembledInterface() that returns a bare pointer. */
32SK_API const GrGLInterface* GrGLAssembleInterface(void *ctx, GrGLGetProc get);