Arun Kumar K.R | 2b75da3 | 2016-11-11 14:37:20 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2016, The Linux Foundation. All rights reserved. |
| 3 | * Not a Contribution. |
| 4 | * |
| 5 | * Copyright 2015 The Android Open Source Project |
| 6 | * |
| 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | * you may not use this file except in compliance with the License. |
| 9 | * You may obtain a copy of the License at |
| 10 | * |
| 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | * |
| 13 | * Unless required by applicable law or agreed to in writing, software |
| 14 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | * See the License for the specific language governing permissions and |
| 17 | * limitations under the License. |
| 18 | */ |
| 19 | |
| 20 | #ifndef __TONEMAPPER_GLENGINE_H__ |
| 21 | #define __TONEMAPPER_GLENGINE_H__ |
| 22 | #include <EGL/egl.h> |
| 23 | #define EGL_EGLEXT_PROTOTYPES |
| 24 | #include <EGL/eglext.h> |
| 25 | #include <GLES3/gl31.h> |
| 26 | #define GL_GLEXT_PROTOTYPES |
| 27 | #include <GLES2/gl2ext.h> |
| 28 | #include <GLES3/gl3ext.h> |
| 29 | |
| 30 | #if defined(CHECK_GL_ERRORS) |
| 31 | #define GL(func) func; |
| 32 | #define EGL(func) func; |
| 33 | #else |
| 34 | #define GL(func) \ |
| 35 | func; \ |
| 36 | checkGlError(__FILE__, __LINE__); |
| 37 | #define EGL(func) \ |
| 38 | func; \ |
| 39 | checkEglError(__FILE__, __LINE__); |
| 40 | #endif |
| 41 | |
Sushil Chauhan | 70bc2c0 | 2017-05-02 17:09:47 -0700 | [diff] [blame] | 42 | #define EGL_PROTECTED_CONTENT_EXT 0x32C0 |
| 43 | |
Arun Kumar K.R | 2b75da3 | 2016-11-11 14:37:20 -0800 | [diff] [blame] | 44 | void checkGlError(const char *file, int line); |
| 45 | void checkEglError(const char *file, int line); |
| 46 | |
Sushil Chauhan | 70bc2c0 | 2017-05-02 17:09:47 -0700 | [diff] [blame] | 47 | #endif //__TONEMAPPER_GLENGINE_H__ |