CFx SDK Documentation  2023 SP0
GLES2Include.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 // GLES2 include
24 
25 #ifndef ODTRGL2INCLUDE
26 #define ODTRGL2INCLUDE
27 
28 #include "OdPlatformSettings.h"
29 
30 // Includes for OpenGL ES 2.0
31 #ifdef EMCC
32 #include<GLES2/gl2.h>
33 #elif defined(__IPHONE_OS_VERSION_MIN_REQUIRED) || defined(TARGET_IPHONE_SIMULATOR)
34 // iOS
35 #include <OpenGLES/ES2/gl.h>
36 #include <OpenGLES/ES2/glext.h>
37 #define OD_TRGL2_IOS
38 #elif defined(ANDROID) || defined(TRGL2EMUL_ENABLED) || defined(EMCC)
39 #include <GLES2/gl2.h>
40 // Includes for EGL
41 #include <EGL/egl.h>
42 // EGL is available only since 9 Android platform, define this for platform 8 and earlier
43 //#define OD_TRGL2_NOEGL
44 #else // #elif IOS/Android
45 // Windows/Linux/Mac/Sun and etc. PC OS
47 #endif
48 
49 #if defined(ANDROID) || defined(OD_TRGL2_IOS) || defined(EMCC)
50 #define OD_TRGL2_NATIVEES2
51 #endif
52 
53 // Extensions
54 #include "TrGL2Extensions.h"
55 
56 #if defined(ANDROID)
57 #define MAX_COUNTER_BEFORE_FLASH 300
58 void glesSafeDrawArrays(GLenum mode, GLint first, GLsizei count);
59 #else //ANDROID
60 #define glesSafeDrawArrays ::glDrawArrays
61 #endif //ANDROID
62 
63 #endif // ODTRGL2INCLUDE
#define glesSafeDrawArrays
Definition: GLES2Include.h:60
typedef GLenum(APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC)(GLenum target)
GLsizei GLsizei * count
Definition: gles2_ext.h:276
typedef GLint(APIENTRYP PFNGLGETATTRIBLOCATIONPROC)(GLuint program