1 /* 2 * Copyright (C) 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 #pragma once 17 18 #include "render_api_functions.h" 19 20 #include <KHR/khrplatform.h> 21 22 // All interfaces which can fail return an int, with zero indicating failure 23 // and anything else indicating success. 24 25 // Use KHRONOS_APICALL to control visibility, but do not use KHRONOS_APIENTRY 26 // because we don't need the functions to be __stdcall on Win32. 27 #define RENDER_APICALL KHRONOS_APICALL 28 #define RENDER_APIENTRY 29 30 #define RENDER_API_DECLARE(return_type, func_name, signature, callargs) \ 31 typedef return_type (RENDER_APIENTRY *func_name ## Fn) signature; \ 32 RENDER_APICALL return_type RENDER_APIENTRY func_name signature; 33 34 LIST_RENDER_API_FUNCTIONS(RENDER_API_DECLARE) 35 36 RENDER_APICALL emugl::RenderLibPtr RENDER_APIENTRY initLibrary(); 37