CFx SDK Documentation
2020SP3
SDK
CFx
dd_inc
TD_GL.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
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
#include <GL/gl.h>
82
#ifdef TD_USING_GLU
83
#include <GL/glu.h>
84
#endif
85
86
#ifdef TD_USING_GLUT
87
#include <GL/glut.h>
88
#endif
89
90
#define TD_STD_CALL
91
92
#else
93
94
#include <gl/gl.h>
95
#ifdef TD_USING_GLU
96
#include <gl/glu.h>
97
#endif
98
99
#ifdef TD_USING_GLUT
100
#include <GL/glut.h>
101
#endif
102
103
#define TD_STD_CALL __stdcall
104
105
#endif
106
107
#else // OpenGL ES
108
109
#ifndef ANDROID
110
// for iOS
111
#include <OpenGLES/ES1/gl.h>
112
#include <OpenGLES/ES1/glext.h>
113
#else
114
// for Android
115
#include <GLES/gl.h>
116
#include <GLES/glext.h>
117
// debug log
118
// #include "../Extensions/ExRender/Android/gl_debug_driver.h"
119
#endif
120
121
#ifdef TD_USING_GLU
122
#error OpenGL ES platform does not support glu
123
#endif
124
#ifdef TD_USING_GLUT
125
#error OpenGL ES platform does not support glut
126
#endif
127
128
#define TD_STD_CALL
129
130
#endif
OdPlatform.h
Generated on Mon Oct 12 2020 11:49:44