CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GLES2Include.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 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)) && !defined(TD_USING_GLU) && !defined(TD_OPEN_GLES_MISSING)
34// https://stackoverflow.com/questions/25124971/including-opengles-es2-gl-h-not-working-when-compiling-for-mac
35// iOS
36#include <OpenGLES/ES2/gl.h>
37#include <OpenGLES/ES2/glext.h>
38#define OD_TRGL2_IOS
39#elif defined(ANDROID) || defined(TRGL2EMUL_ENABLED) || defined(EMCC)
40#include <GLES2/gl2.h>
41// Includes for EGL
42#include <EGL/egl.h>
43// EGL is available only since 9 Android platform, define this for platform 8 and earlier
44//#define OD_TRGL2_NOEGL
45#else // #elif IOS/Android
46// Windows/Linux/Mac/Sun and etc. PC OS
48#endif
49
50#if defined(ANDROID) || defined(OD_TRGL2_IOS) || defined(EMCC)
51#define OD_TRGL2_NATIVEES2
52#endif
53
54#endif // ODTRGL2INCLUDE