1 /*
2  * Copyright (C) 2018 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include <GLES/gl.h>
20 
21 #include <OpenGLESDispatch/gles_functions.h>
22 
23 #define GLES1_DISPATCH_DEFINE_TYPE(return_type, func_name, signature, callargs) \
24     typedef return_type(KHRONOS_APIENTRY* func_name##_t) signature;
25 
26 #define GLES1_DISPATCH_DECLARE_POINTER(return_type, func_name, signature, callargs) \
27     func_name##_t func_name;
28 
29 LIST_GLES1_FUNCTIONS(GLES1_DISPATCH_DEFINE_TYPE, GLES1_DISPATCH_DEFINE_TYPE)
30 
31 struct GLESv1Dispatch {
32     LIST_GLES1_FUNCTIONS(GLES1_DISPATCH_DECLARE_POINTER, GLES1_DISPATCH_DECLARE_POINTER)
33 };
34 
35 #undef GLES1_DISPATCH_DEFINE_TYPE
36 #undef GLES1_DISPATCH_DECLARE_POINTER
37 
38 bool gles1_dispatch_init();
39 
40 extern GLESv1Dispatch s_gles1;
41