CFx SDK Documentation
2024 SP0
Loading...
Searching...
No Matches
SDK
CFx
dd_inc
TD_GL.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
24
#include "
OdPlatform.h
"
25
26
// iOS
27
#if defined(__APPLE__) && (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) || TARGET_IPHONE_SIMULATOR)
28
29
#ifndef TD_OPENGL_ES
30
#define TD_OPENGL_ES
31
#endif
32
33
#endif
34
35
// Android
36
#if defined(ANDROID)
37
38
#ifndef TD_OPENGL_ES
39
#define TD_OPENGL_ES
40
#endif
41
42
#endif
43
44
//
45
#if !defined(TD_OPENGL_ES)
46
47
#if defined(__APPLE__)
48
49
#include <OpenGL/gl.h>
50
#ifdef TD_USING_GLU
51
#include <OpenGL/glu.h>
52
#endif
53
54
#ifdef TD_USING_GLUT
55
#include <GLUT/glut.h>
56
#endif
57
58
#define TD_STD_CALL
59
60
#if defined(TD_USE_QT_LIB)
61
#if !(defined(__IPHONE_OS_VERSION_MIN_REQUIRED))
62
#include <OpenGL/glext.h>
63
#endif
64
#endif
65
66
#elif defined sgi
67
68
#include <GL/gl.h>
69
#ifdef TD_USING_GLU
70
#include <GL/glu.h>
71
#endif
72
73
#ifdef TD_USING_GLUT
74
#include <GL/glut.h>
75
#endif
76
77
#define TD_STD_CALL
78
79
#elif defined(__linux__) || defined(EMCC)
80
81
//FELIX_CHANGE_BEGIN
82
#ifdef XENON
83
#include <glad/gl.h>
84
#else
85
#include <GL/gl.h>
86
#endif
87
//FELIX_CHANGE_END
88
89
#ifdef TD_USING_GLU
90
#include <GL/glu.h>
91
#endif
92
93
#ifdef TD_USING_GLUT
94
#include <GL/glut.h>
95
#endif
96
97
#define TD_STD_CALL
98
99
#else
100
101
#include <gl/gl.h>
102
#ifdef TD_USING_GLU
103
#include <gl/glu.h>
104
#endif
105
106
#ifdef TD_USING_GLUT
107
#include <GL/glut.h>
108
#endif
109
110
#define TD_STD_CALL __stdcall
111
112
#endif
113
114
#else
// OpenGL ES
115
116
#ifndef ANDROID
117
// for iOS
118
#include <OpenGLES/ES1/gl.h>
119
#include <OpenGLES/ES1/glext.h>
120
#else
121
// for Android
122
#include <GLES/gl.h>
123
#include <GLES/glext.h>
124
// debug log
125
// #include "../Extensions/ExRender/Android/gl_debug_driver.h"
126
#endif
127
128
#ifdef TD_USING_GLU
129
#error OpenGL ES platform does not support glu
130
#endif
131
#ifdef TD_USING_GLUT
132
#error OpenGL ES platform does not support glut
133
#endif
134
135
#define TD_STD_CALL
136
137
#endif
OdPlatform.h
Generated on Wed Apr 5 2023 17:29:24