CFx SDK Documentation
2026 SP0
Loading...
Searching...
No Matches
SDK
CFx
dd_inc
Tr
render
gl2
GLES2Include.h
Go to the documentation of this file.
1
2
// Copyright (C) 2002-2024, 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-2023 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
34
#elif __APPLE__
35
36
#include <TargetConditionals.h>
37
38
#if ((defined(TARGET_OS_IOS) && (TARGET_OS_IOS)) \
39
|| ((defined(TARGET_OS_IPHONE) && (TARGET_OS_IPHONE)) \
40
|| (defined(TARGET_IPHONE_SIMULATOR) && (TARGET_IPHONE_SIMULATOR)) \
41
|| (defined(TARGET_OS_SIMULATOR) && (TARGET_OS_SIMULATOR)))) \
42
&& !defined(TD_USING_GLU) && !defined(TD_OPEN_GLES_MISSING)
43
// iOS (device or simulator)
44
#include <OpenGLES/ES2/gl.h>
45
#include <OpenGLES/ES2/glext.h>
46
#define OD_TRGL2_IOS
47
#elif (defined(TARGET_OS_OSX) && (TARGET_OS_OSX))
48
// MacOS, moved here from other desktop platforms since it is __APPLE__ block
49
#include "
compatibility/gles2_ext.h
"
50
#else
51
#error "ERROR: Unsupported Apple platform (not iOS/iOS simulator/MacOS)"
52
#endif
53
54
#elif defined(ANDROID) || defined(TRGL2EMUL_ENABLED) || defined(EMCC)
55
#include <GLES2/gl2.h>
56
// Includes for EGL
57
#include <EGL/egl.h>
58
// EGL is available only since 9 Android platform, define this for platform 8 and earlier
59
//#define OD_TRGL2_NOEGL
60
#else
// #elif Apple/Android
61
62
// Windows/Linux/Sun and etc. PC OS
63
#include "
compatibility/gles2_ext.h
"
64
65
#endif
66
67
#if defined(ANDROID) || defined(OD_TRGL2_IOS) || defined(EMCC)
68
#define OD_TRGL2_NATIVEES2
69
#endif
70
71
#endif
// ODTRGL2INCLUDE
OdPlatformSettings.h
gles2_ext.h
Generated on Tue Apr 15 2025 11:30:06