sl@0
|
1 |
#ifndef __LEGACY_EGL_1_1_EGL_H_
|
sl@0
|
2 |
#define __LEGACY_EGL_1_1_EGL_H_
|
sl@0
|
3 |
|
sl@0
|
4 |
/**
|
sl@0
|
5 |
@publishedAll
|
sl@0
|
6 |
@released
|
sl@0
|
7 |
*/
|
sl@0
|
8 |
|
sl@0
|
9 |
/*
|
sl@0
|
10 |
** License Applicability. Except to the extent portions of this file are
|
sl@0
|
11 |
** made subject to an alternative license as permitted in the SGI Free
|
sl@0
|
12 |
** Software License B, Version 1.0 (the "License"), the contents of this
|
sl@0
|
13 |
** file are subject only to the provisions of the License. You may not use
|
sl@0
|
14 |
** this file except in compliance with the License. You may obtain a copy
|
sl@0
|
15 |
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
sl@0
|
16 |
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
sl@0
|
17 |
**
|
sl@0
|
18 |
** http://oss.sgi.com/projects/FreeB
|
sl@0
|
19 |
**
|
sl@0
|
20 |
** Note that, as provided in the License, the Software is distributed on an
|
sl@0
|
21 |
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
sl@0
|
22 |
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
sl@0
|
23 |
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
sl@0
|
24 |
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
sl@0
|
25 |
**
|
sl@0
|
26 |
** Original Code. The Original Code is: OpenGL Sample Implementation,
|
sl@0
|
27 |
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
sl@0
|
28 |
** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc.
|
sl@0
|
29 |
** Copyright in any portions created by third parties is as indicated
|
sl@0
|
30 |
** elsewhere herein. All Rights Reserved.
|
sl@0
|
31 |
**
|
sl@0
|
32 |
** Additional Notice Provisions: The application programming interfaces
|
sl@0
|
33 |
** established by SGI in conjunction with the Original Code are The
|
sl@0
|
34 |
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
|
sl@0
|
35 |
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
|
sl@0
|
36 |
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
|
sl@0
|
37 |
** Window System(R) (Version 1.3), released October 19, 1998. This software
|
sl@0
|
38 |
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
|
sl@0
|
39 |
** published by SGI, but has not been independently verified as being
|
sl@0
|
40 |
** compliant with the OpenGL(R) version 1.2.1 Specification.
|
sl@0
|
41 |
*/
|
sl@0
|
42 |
|
sl@0
|
43 |
#include <GLES/gl.h>
|
sl@0
|
44 |
#include <GLES/egltypes.h>
|
sl@0
|
45 |
|
sl@0
|
46 |
/*
|
sl@0
|
47 |
** egltypes.h is platform dependent. It defines:
|
sl@0
|
48 |
**
|
sl@0
|
49 |
** - EGL types and resources
|
sl@0
|
50 |
** - Native types
|
sl@0
|
51 |
** - EGL and native handle values
|
sl@0
|
52 |
**
|
sl@0
|
53 |
** EGL types and resources are to be typedef'ed with appropriate platform
|
sl@0
|
54 |
** dependent resource handle types. EGLint must be an integer of at least
|
sl@0
|
55 |
** 32-bit.
|
sl@0
|
56 |
**
|
sl@0
|
57 |
** NativeDisplayType, NativeWindowType and NativePixmapType are to be
|
sl@0
|
58 |
** replaced with corresponding types of the native window system in egl.h.
|
sl@0
|
59 |
**
|
sl@0
|
60 |
** EGL and native handle values must match their types.
|
sl@0
|
61 |
**
|
sl@0
|
62 |
** Example egltypes.h:
|
sl@0
|
63 |
*/
|
sl@0
|
64 |
|
sl@0
|
65 |
#if 0
|
sl@0
|
66 |
|
sl@0
|
67 |
#include <sys/types.h>
|
sl@0
|
68 |
#include <native_window_system.h>
|
sl@0
|
69 |
|
sl@0
|
70 |
/*
|
sl@0
|
71 |
** Types and resources
|
sl@0
|
72 |
*/
|
sl@0
|
73 |
typedef int EGLBoolean;
|
sl@0
|
74 |
typedef int32_t EGLint;
|
sl@0
|
75 |
typedef void *EGLDisplay;
|
sl@0
|
76 |
typedef void *EGLConfig;
|
sl@0
|
77 |
typedef void *EGLSurface;
|
sl@0
|
78 |
typedef void *EGLContext;
|
sl@0
|
79 |
|
sl@0
|
80 |
/*
|
sl@0
|
81 |
** EGL and native handle values
|
sl@0
|
82 |
*/
|
sl@0
|
83 |
#define EGL_DEFAULT_DISPLAY ((NativeDisplayType)0)
|
sl@0
|
84 |
#define EGL_NO_CONTEXT ((EGLContext)0)
|
sl@0
|
85 |
#define EGL_NO_DISPLAY ((EGLDisplay)0)
|
sl@0
|
86 |
#define EGL_NO_SURFACE ((EGLSurface)0)
|
sl@0
|
87 |
|
sl@0
|
88 |
#endif
|
sl@0
|
89 |
|
sl@0
|
90 |
/*
|
sl@0
|
91 |
** Versioning and extensions
|
sl@0
|
92 |
*/
|
sl@0
|
93 |
#define EGL_VERSION_1_0 1
|
sl@0
|
94 |
#define EGL_VERSION_1_1 1
|
sl@0
|
95 |
|
sl@0
|
96 |
/*
|
sl@0
|
97 |
** Boolean
|
sl@0
|
98 |
*/
|
sl@0
|
99 |
#define EGL_FALSE 0
|
sl@0
|
100 |
#define EGL_TRUE 1
|
sl@0
|
101 |
|
sl@0
|
102 |
/*
|
sl@0
|
103 |
** Errors
|
sl@0
|
104 |
*/
|
sl@0
|
105 |
#define EGL_SUCCESS 0x3000
|
sl@0
|
106 |
#define EGL_NOT_INITIALIZED 0x3001
|
sl@0
|
107 |
#define EGL_BAD_ACCESS 0x3002
|
sl@0
|
108 |
#define EGL_BAD_ALLOC 0x3003
|
sl@0
|
109 |
#define EGL_BAD_ATTRIBUTE 0x3004
|
sl@0
|
110 |
#define EGL_BAD_CONFIG 0x3005
|
sl@0
|
111 |
#define EGL_BAD_CONTEXT 0x3006
|
sl@0
|
112 |
#define EGL_BAD_CURRENT_SURFACE 0x3007
|
sl@0
|
113 |
#define EGL_BAD_DISPLAY 0x3008
|
sl@0
|
114 |
#define EGL_BAD_MATCH 0x3009
|
sl@0
|
115 |
#define EGL_BAD_NATIVE_PIXMAP 0x300A
|
sl@0
|
116 |
#define EGL_BAD_NATIVE_WINDOW 0x300B
|
sl@0
|
117 |
#define EGL_BAD_PARAMETER 0x300C
|
sl@0
|
118 |
#define EGL_BAD_SURFACE 0x300D
|
sl@0
|
119 |
#define EGL_CONTEXT_LOST 0x300E
|
sl@0
|
120 |
/* 0x300F - 0x301F reserved for additional errors. */
|
sl@0
|
121 |
|
sl@0
|
122 |
/*
|
sl@0
|
123 |
** Config attributes
|
sl@0
|
124 |
*/
|
sl@0
|
125 |
#define EGL_BUFFER_SIZE 0x3020
|
sl@0
|
126 |
#define EGL_ALPHA_SIZE 0x3021
|
sl@0
|
127 |
#define EGL_BLUE_SIZE 0x3022
|
sl@0
|
128 |
#define EGL_GREEN_SIZE 0x3023
|
sl@0
|
129 |
#define EGL_RED_SIZE 0x3024
|
sl@0
|
130 |
#define EGL_DEPTH_SIZE 0x3025
|
sl@0
|
131 |
#define EGL_STENCIL_SIZE 0x3026
|
sl@0
|
132 |
#define EGL_CONFIG_CAVEAT 0x3027
|
sl@0
|
133 |
#define EGL_CONFIG_ID 0x3028
|
sl@0
|
134 |
#define EGL_LEVEL 0x3029
|
sl@0
|
135 |
#define EGL_MAX_PBUFFER_HEIGHT 0x302A
|
sl@0
|
136 |
#define EGL_MAX_PBUFFER_PIXELS 0x302B
|
sl@0
|
137 |
#define EGL_MAX_PBUFFER_WIDTH 0x302C
|
sl@0
|
138 |
#define EGL_NATIVE_RENDERABLE 0x302D
|
sl@0
|
139 |
#define EGL_NATIVE_VISUAL_ID 0x302E
|
sl@0
|
140 |
#define EGL_NATIVE_VISUAL_TYPE 0x302F
|
sl@0
|
141 |
/*#define EGL_PRESERVED_RESOURCES 0x3030*/
|
sl@0
|
142 |
#define EGL_SAMPLES 0x3031
|
sl@0
|
143 |
#define EGL_SAMPLE_BUFFERS 0x3032
|
sl@0
|
144 |
#define EGL_SURFACE_TYPE 0x3033
|
sl@0
|
145 |
#define EGL_TRANSPARENT_TYPE 0x3034
|
sl@0
|
146 |
#define EGL_TRANSPARENT_BLUE_VALUE 0x3035
|
sl@0
|
147 |
#define EGL_TRANSPARENT_GREEN_VALUE 0x3036
|
sl@0
|
148 |
#define EGL_TRANSPARENT_RED_VALUE 0x3037
|
sl@0
|
149 |
|
sl@0
|
150 |
#define EGL_NONE 0x3038 /* Also a config value */
|
sl@0
|
151 |
#define EGL_BIND_TO_TEXTURE_RGB 0x3039
|
sl@0
|
152 |
#define EGL_BIND_TO_TEXTURE_RGBA 0x303A
|
sl@0
|
153 |
#define EGL_MIN_SWAP_INTERVAL 0x303B
|
sl@0
|
154 |
#define EGL_MAX_SWAP_INTERVAL 0x303C
|
sl@0
|
155 |
|
sl@0
|
156 |
/*
|
sl@0
|
157 |
** Config values
|
sl@0
|
158 |
*/
|
sl@0
|
159 |
#define EGL_DONT_CARE ((EGLint) -1)
|
sl@0
|
160 |
|
sl@0
|
161 |
#define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */
|
sl@0
|
162 |
#define EGL_NON_CONFORMANT_CONFIG 0x3051 /* " */
|
sl@0
|
163 |
#define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */
|
sl@0
|
164 |
#define EGL_NO_TEXTURE 0x305C /* EGL_TEXTURE_FORMAT/TARGET value */
|
sl@0
|
165 |
#define EGL_TEXTURE_RGB 0x305D /* EGL_TEXTURE_FORMAT value */
|
sl@0
|
166 |
#define EGL_TEXTURE_RGBA 0x305E /* " */
|
sl@0
|
167 |
#define EGL_TEXTURE_2D 0x305F /* EGL_TEXTURE_TARGET value */
|
sl@0
|
168 |
|
sl@0
|
169 |
/*
|
sl@0
|
170 |
** Config attribute mask bits
|
sl@0
|
171 |
*/
|
sl@0
|
172 |
#define EGL_PBUFFER_BIT 0x01 /* EGL_SURFACE_TYPE mask bit */
|
sl@0
|
173 |
#define EGL_PIXMAP_BIT 0x02 /* " */
|
sl@0
|
174 |
#define EGL_WINDOW_BIT 0x04 /* " */
|
sl@0
|
175 |
|
sl@0
|
176 |
/*
|
sl@0
|
177 |
** String names
|
sl@0
|
178 |
*/
|
sl@0
|
179 |
#define EGL_VENDOR 0x3053
|
sl@0
|
180 |
#define EGL_VERSION 0x3054
|
sl@0
|
181 |
#define EGL_EXTENSIONS 0x3055
|
sl@0
|
182 |
|
sl@0
|
183 |
/*
|
sl@0
|
184 |
** Surface attributes
|
sl@0
|
185 |
*/
|
sl@0
|
186 |
#define EGL_HEIGHT 0x3056
|
sl@0
|
187 |
#define EGL_WIDTH 0x3057
|
sl@0
|
188 |
#define EGL_LARGEST_PBUFFER 0x3058
|
sl@0
|
189 |
#define EGL_TEXTURE_FORMAT 0x3080 /* For pbuffers bound as textures */
|
sl@0
|
190 |
#define EGL_TEXTURE_TARGET 0x3081 /* " */
|
sl@0
|
191 |
#define EGL_MIPMAP_TEXTURE 0x3082 /* " */
|
sl@0
|
192 |
#define EGL_MIPMAP_LEVEL 0x3083 /* " */
|
sl@0
|
193 |
|
sl@0
|
194 |
/*
|
sl@0
|
195 |
** BindTexImage / ReleaseTexImage buffer target
|
sl@0
|
196 |
*/
|
sl@0
|
197 |
#define EGL_BACK_BUFFER 0x3084
|
sl@0
|
198 |
|
sl@0
|
199 |
/*
|
sl@0
|
200 |
** Current surfaces
|
sl@0
|
201 |
*/
|
sl@0
|
202 |
#define EGL_DRAW 0x3059
|
sl@0
|
203 |
#define EGL_READ 0x305A
|
sl@0
|
204 |
|
sl@0
|
205 |
/*
|
sl@0
|
206 |
** Engines
|
sl@0
|
207 |
*/
|
sl@0
|
208 |
#define EGL_CORE_NATIVE_ENGINE 0x305B
|
sl@0
|
209 |
|
sl@0
|
210 |
/* 0x305C-0x3FFFF reserved for future use */
|
sl@0
|
211 |
|
sl@0
|
212 |
/*
|
sl@0
|
213 |
** Functions
|
sl@0
|
214 |
*/
|
sl@0
|
215 |
#ifdef __cplusplus
|
sl@0
|
216 |
extern "C" {
|
sl@0
|
217 |
#endif
|
sl@0
|
218 |
|
sl@0
|
219 |
GLAPI EGLint GL_APIENTRY eglGetError (void);
|
sl@0
|
220 |
|
sl@0
|
221 |
GLAPI EGLDisplay GL_APIENTRY eglGetDisplay (NativeDisplayType display);
|
sl@0
|
222 |
GLAPI EGLBoolean GL_APIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor);
|
sl@0
|
223 |
GLAPI EGLBoolean GL_APIENTRY eglTerminate (EGLDisplay dpy);
|
sl@0
|
224 |
GLAPI const char * GL_APIENTRY eglQueryString (EGLDisplay dpy, EGLint name);
|
sl@0
|
225 |
#ifdef __cplusplus
|
sl@0
|
226 |
GLAPI void (* GL_APIENTRY eglGetProcAddress (const char *procname))(...);
|
sl@0
|
227 |
#else
|
sl@0
|
228 |
GLAPI void (* GL_APIENTRY eglGetProcAddress (const char *procname))();
|
sl@0
|
229 |
#endif
|
sl@0
|
230 |
|
sl@0
|
231 |
GLAPI EGLBoolean GL_APIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
|
sl@0
|
232 |
GLAPI EGLBoolean GL_APIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
|
sl@0
|
233 |
GLAPI EGLBoolean GL_APIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
|
sl@0
|
234 |
|
sl@0
|
235 |
GLAPI EGLSurface GL_APIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list);
|
sl@0
|
236 |
GLAPI EGLSurface GL_APIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint *attrib_list);
|
sl@0
|
237 |
GLAPI EGLSurface GL_APIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
|
sl@0
|
238 |
GLAPI EGLBoolean GL_APIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface);
|
sl@0
|
239 |
GLAPI EGLBoolean GL_APIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
|
sl@0
|
240 |
/* EGL 1.1 render-to-texture APIs */
|
sl@0
|
241 |
GLAPI EGLBoolean GL_APIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
|
sl@0
|
242 |
GLAPI EGLBoolean GL_APIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
|
sl@0
|
243 |
GLAPI EGLBoolean GL_APIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
|
sl@0
|
244 |
|
sl@0
|
245 |
/* EGL 1.1 swap control API */
|
sl@0
|
246 |
GLAPI EGLBoolean GL_APIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval);
|
sl@0
|
247 |
|
sl@0
|
248 |
GLAPI EGLContext GL_APIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list);
|
sl@0
|
249 |
GLAPI EGLBoolean GL_APIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx);
|
sl@0
|
250 |
GLAPI EGLBoolean GL_APIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
|
sl@0
|
251 |
GLAPI EGLContext GL_APIENTRY eglGetCurrentContext (void);
|
sl@0
|
252 |
GLAPI EGLSurface GL_APIENTRY eglGetCurrentSurface (EGLint readdraw);
|
sl@0
|
253 |
GLAPI EGLDisplay GL_APIENTRY eglGetCurrentDisplay (void);
|
sl@0
|
254 |
GLAPI EGLBoolean GL_APIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
|
sl@0
|
255 |
|
sl@0
|
256 |
GLAPI EGLBoolean GL_APIENTRY eglWaitGL (void);
|
sl@0
|
257 |
GLAPI EGLBoolean GL_APIENTRY eglWaitNative (EGLint engine);
|
sl@0
|
258 |
GLAPI EGLBoolean GL_APIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface draw);
|
sl@0
|
259 |
GLAPI EGLBoolean GL_APIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, NativePixmapType target);
|
sl@0
|
260 |
|
sl@0
|
261 |
#ifdef __cplusplus
|
sl@0
|
262 |
}
|
sl@0
|
263 |
#endif
|
sl@0
|
264 |
|
sl@0
|
265 |
#endif /* __LEGACY_EGL_1_1_EGL_H_ */
|
sl@0
|
266 |
|