1 /* 2 * Copyright 2011 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 #ifndef _SYSTEM_COMMON_EGL_CLIENT_IFACE_H 18 #define _SYSTEM_COMMON_EGL_CLIENT_IFACE_H 19 20 struct EGLThreadInfo; // defined in ThreadInfo.h 21 22 typedef struct { 23 EGLThreadInfo* (*getThreadInfo)(); 24 const char* (*getGLString)(int glEnum); 25 } EGLClient_eglInterface; 26 27 typedef struct { 28 void* (*getProcAddress)(const char *funcName); 29 void (*init)(); 30 void (*finish)(); 31 void (*getIntegerv)(unsigned int pname, int* param); 32 } EGLClient_glesInterface; 33 34 // 35 // Any GLES/GLES2 client API library should define a function named "init_emul_gles" 36 // with the following prototype, 37 // It will be called by EGL after loading the GLES library for initialization 38 // and exchanging interface function pointers. 39 // 40 typedef EGLClient_glesInterface *(*init_emul_gles_t)(EGLClient_eglInterface *eglIface); 41 42 #endif 43