1 // 2 // Copyright (c) 2017 The Khronos Group Inc. 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 #ifndef _gl_headers_h 17 #define _gl_headers_h 18 19 #if defined( __APPLE__ ) 20 #include <OpenGL/OpenGL.h> 21 #if defined(CGL_VERSION_1_3) 22 #include <OpenGL/gl3.h> 23 #include <OpenGL/gl3ext.h> 24 #else 25 #include <OpenGL/gl.h> 26 #include <OpenGL/glext.h> 27 #endif 28 #include <GLUT/glut.h> 29 #else 30 #ifdef _WIN32 31 #include <windows.h> 32 #endif 33 #if defined( __ANDROID__ ) 34 #ifndef GL_GLEXT_PROTOTYPES 35 #define GL_GLEXT_PROTOTYPES 36 #endif 37 #include <GLES/gl.h> 38 #include <GLES/glext.h> 39 #else 40 #include <GL/glew.h> 41 #include <GL/gl.h> 42 #endif 43 #ifdef _WIN32 44 #include <GL/glut.h> 45 #elif !defined(__ANDROID__) 46 #include <GL/freeglut.h> 47 #endif 48 49 #endif 50 51 #ifdef _WIN32 52 GLboolean gluCheckExtension(const GLubyte *extName, const GLubyte *extString); 53 // No glutGetProcAddress in the standard glut v3.7. 54 #define glutGetProcAddress(procName) wglGetProcAddress(procName) 55 #endif 56 57 58 #endif // __gl_headers_h 59 60