1.1 --- a/epoc32/include/EGL/egl.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/EGL/egl.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,52 +1,325 @@
1.4 -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 -// All rights reserved.
1.6 -// This component and the accompanying materials are made available
1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 -// which accompanies this distribution, and is available
1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 -//
1.11 -// Initial Contributors:
1.12 -// Nokia Corporation - initial contribution.
1.13 -//
1.14 -// Contributors:
1.15 -//
1.16 -// Description:
1.17 -// GLES/EGL.H
1.18 -//
1.19 -//
1.20 +/*
1.21 +** Copyright (c) 2007-2009 The Khronos Group Inc.
1.22 +**
1.23 +** Permission is hereby granted, free of charge, to any person obtaining a
1.24 +** copy of this software and/or associated documentation files (the
1.25 +** "Materials"), to deal in the Materials without restriction, including
1.26 +** without limitation the rights to use, copy, modify, merge, publish,
1.27 +** distribute, sublicense, and/or sell copies of the Materials, and to
1.28 +** permit persons to whom the Materials are furnished to do so, subject to
1.29 +** the following conditions:
1.30 +**
1.31 +** The above copyright notice and this permission notice shall be included
1.32 +** in all copies or substantial portions of the Materials.
1.33 +**
1.34 +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1.35 +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1.36 +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1.37 +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
1.38 +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
1.39 +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
1.40 +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
1.41 +*/
1.42
1.43 -#ifndef __GLES_EGL_H_
1.44 -#define __GLES_EGL_H_
1.45 +#ifndef __egl_h_
1.46 +#define __egl_h_
1.47
1.48 /**
1.49 -@publishedPartner
1.50 +@publishedAll
1.51 +@released
1.52 +*/
1.53
1.54 -__OPENGLESHEADERS_LEGACY_EGL_1_1
1.55
1.56 -The purpose of this define is to allow the staged migration to
1.57 -EGL 1.3 from EGL 1.1 taken from the perspective of OpenGL ES 1.X
1.58 +/* differences from the actual sample implemtation provided by Khronos:
1.59 +- this comment
1.60 +- the Doxygen comment with tag 'publishedAll', and tag 'released'
1.61 +- changing platform-dependant header name from <EGL/eglplatform.h> to <EGL/egltypes.h>
1.62 +- exclude via #if 0 ... #endif some native types defined in egltypes.h
1.63 +- include eglext.h file by default
1.64 + */
1.65
1.66 -If __OPENGLESHEADERS_LEGACY_EGL_1_1 is defined, then GLES/egl.h and
1.67 -GLES/egltypes.h will only provide the EGL 1.1 API; in particular no
1.68 -symbols from a later version of EGL will be seen at a source code level.
1.69 -This is considered to be legacy behaviour. If
1.70 -__OPENGLESHEADERS_LEGACY_EGL_1_1 is not defined, the GLES/egl.h
1.71 -and GLES/egltypes.h header files will re-direct to the system-wide
1.72 -EGL/egl.h. and EGL/egltypes.h respectively.
1.73
1.74 -The use of GLES/egl.h or GLES/egltypes.h by applications is considered
1.75 -legacy behaviour because applications should instead use EGL/egl.h
1.76 -or EGL/egltypes.h respectively.
1.77 +/* All platform-dependent types and macro boilerplate (such as EGLAPI
1.78 + * and EGLAPIENTRY) should go in egltypes.h.
1.79 + */
1.80 +#include <EGL/egltypes.h>
1.81
1.82 -When this legacy behaviour is desired, the define should be placed in an
1.83 -OEM-specific system-wide .hrh file. Symbian product configurations
1.84 -never set this legacy behaviour.
1.85 -*/
1.86 -#ifdef __OPENGLESHEADERS_LEGACY_EGL_1_1
1.87 -#include <GLES/legacy_egl_1_1/egl.h>
1.88 -#else
1.89 -#include <EGL/egl.h>
1.90 -#include <GLES/gl.h>
1.91 +/* The user of this API can use own extension by defining EGLEXT_LOCAL macro */
1.92 +#ifndef EGLEXT_LOCAL
1.93 +#include <EGL/eglext.h>
1.94 +#endif /* ifndef EGLEXT_LOCAL */
1.95 +
1.96 +#ifdef __cplusplus
1.97 +extern "C" {
1.98 #endif
1.99
1.100 -#endif /* __GLES_EGL_H_ */
1.101 +/* EGL Versioning */
1.102 +#define EGL_VERSION_1_0 1
1.103 +#define EGL_VERSION_1_1 1
1.104 +#define EGL_VERSION_1_2 1
1.105 +#define EGL_VERSION_1_3 1
1.106 +#define EGL_VERSION_1_4 1
1.107 +
1.108 +/* EGL Enumerants. Bitmasks and other exceptional cases aside, most
1.109 + * enums are assigned unique values starting at 0x3000.
1.110 + */
1.111 +
1.112 +/* EGL aliases */
1.113 +#define EGL_FALSE 0
1.114 +#define EGL_TRUE 1
1.115 +
1.116 +/* Out-of-band attribute value */
1.117 +#define EGL_DONT_CARE ((EGLint)-1)
1.118 +
1.119 +/* Errors / GetError return values */
1.120 +#define EGL_SUCCESS 0x3000
1.121 +#define EGL_NOT_INITIALIZED 0x3001
1.122 +#define EGL_BAD_ACCESS 0x3002
1.123 +#define EGL_BAD_ALLOC 0x3003
1.124 +#define EGL_BAD_ATTRIBUTE 0x3004
1.125 +#define EGL_BAD_CONFIG 0x3005
1.126 +#define EGL_BAD_CONTEXT 0x3006
1.127 +#define EGL_BAD_CURRENT_SURFACE 0x3007
1.128 +#define EGL_BAD_DISPLAY 0x3008
1.129 +#define EGL_BAD_MATCH 0x3009
1.130 +#define EGL_BAD_NATIVE_PIXMAP 0x300A
1.131 +#define EGL_BAD_NATIVE_WINDOW 0x300B
1.132 +#define EGL_BAD_PARAMETER 0x300C
1.133 +#define EGL_BAD_SURFACE 0x300D
1.134 +#define EGL_CONTEXT_LOST 0x300E /* EGL 1.1 - IMG_power_management */
1.135 +
1.136 +/* Reserved 0x300F-0x301F for additional errors */
1.137 +
1.138 +/* Config attributes */
1.139 +#define EGL_BUFFER_SIZE 0x3020
1.140 +#define EGL_ALPHA_SIZE 0x3021
1.141 +#define EGL_BLUE_SIZE 0x3022
1.142 +#define EGL_GREEN_SIZE 0x3023
1.143 +#define EGL_RED_SIZE 0x3024
1.144 +#define EGL_DEPTH_SIZE 0x3025
1.145 +#define EGL_STENCIL_SIZE 0x3026
1.146 +#define EGL_CONFIG_CAVEAT 0x3027
1.147 +#define EGL_CONFIG_ID 0x3028
1.148 +#define EGL_LEVEL 0x3029
1.149 +#define EGL_MAX_PBUFFER_HEIGHT 0x302A
1.150 +#define EGL_MAX_PBUFFER_PIXELS 0x302B
1.151 +#define EGL_MAX_PBUFFER_WIDTH 0x302C
1.152 +#define EGL_NATIVE_RENDERABLE 0x302D
1.153 +#define EGL_NATIVE_VISUAL_ID 0x302E
1.154 +#define EGL_NATIVE_VISUAL_TYPE 0x302F
1.155 +#define EGL_PRESERVED_RESOURCES 0x3030
1.156 +#define EGL_SAMPLES 0x3031
1.157 +#define EGL_SAMPLE_BUFFERS 0x3032
1.158 +#define EGL_SURFACE_TYPE 0x3033
1.159 +#define EGL_TRANSPARENT_TYPE 0x3034
1.160 +#define EGL_TRANSPARENT_BLUE_VALUE 0x3035
1.161 +#define EGL_TRANSPARENT_GREEN_VALUE 0x3036
1.162 +#define EGL_TRANSPARENT_RED_VALUE 0x3037
1.163 +#define EGL_NONE 0x3038 /* Attrib list terminator */
1.164 +#define EGL_BIND_TO_TEXTURE_RGB 0x3039
1.165 +#define EGL_BIND_TO_TEXTURE_RGBA 0x303A
1.166 +#define EGL_MIN_SWAP_INTERVAL 0x303B
1.167 +#define EGL_MAX_SWAP_INTERVAL 0x303C
1.168 +#define EGL_LUMINANCE_SIZE 0x303D
1.169 +#define EGL_ALPHA_MASK_SIZE 0x303E
1.170 +#define EGL_COLOR_BUFFER_TYPE 0x303F
1.171 +#define EGL_RENDERABLE_TYPE 0x3040
1.172 +#define EGL_MATCH_NATIVE_PIXMAP 0x3041 /* Pseudo-attribute (not queryable) */
1.173 +#define EGL_CONFORMANT 0x3042
1.174 +
1.175 +/* Reserved 0x3041-0x304F for additional config attributes */
1.176 +
1.177 +/* Config attribute values */
1.178 +#define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */
1.179 +#define EGL_NON_CONFORMANT_CONFIG 0x3051 /* EGL_CONFIG_CAVEAT value */
1.180 +#define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */
1.181 +#define EGL_RGB_BUFFER 0x308E /* EGL_COLOR_BUFFER_TYPE value */
1.182 +#define EGL_LUMINANCE_BUFFER 0x308F /* EGL_COLOR_BUFFER_TYPE value */
1.183 +
1.184 +/* More config attribute values, for EGL_TEXTURE_FORMAT */
1.185 +#define EGL_NO_TEXTURE 0x305C
1.186 +#define EGL_TEXTURE_RGB 0x305D
1.187 +#define EGL_TEXTURE_RGBA 0x305E
1.188 +#define EGL_TEXTURE_2D 0x305F
1.189 +
1.190 +/* Config attribute mask bits */
1.191 +#define EGL_PBUFFER_BIT 0x0001 /* EGL_SURFACE_TYPE mask bits */
1.192 +#define EGL_PIXMAP_BIT 0x0002 /* EGL_SURFACE_TYPE mask bits */
1.193 +#define EGL_WINDOW_BIT 0x0004 /* EGL_SURFACE_TYPE mask bits */
1.194 +#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 /* EGL_SURFACE_TYPE mask bits */
1.195 +#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 /* EGL_SURFACE_TYPE mask bits */
1.196 +#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 /* EGL_SURFACE_TYPE mask bits */
1.197 +#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 /* EGL_SURFACE_TYPE mask bits */
1.198 +
1.199 +#define EGL_OPENGL_ES_BIT 0x0001 /* EGL_RENDERABLE_TYPE mask bits */
1.200 +#define EGL_OPENVG_BIT 0x0002 /* EGL_RENDERABLE_TYPE mask bits */
1.201 +#define EGL_OPENGL_ES2_BIT 0x0004 /* EGL_RENDERABLE_TYPE mask bits */
1.202 +#define EGL_OPENGL_BIT 0x0008 /* EGL_RENDERABLE_TYPE mask bits */
1.203 +
1.204 +/* QueryString targets */
1.205 +#define EGL_VENDOR 0x3053
1.206 +#define EGL_VERSION 0x3054
1.207 +#define EGL_EXTENSIONS 0x3055
1.208 +#define EGL_CLIENT_APIS 0x308D
1.209 +
1.210 +/* QuerySurface / SurfaceAttrib / CreatePbufferSurface targets */
1.211 +#define EGL_HEIGHT 0x3056
1.212 +#define EGL_WIDTH 0x3057
1.213 +#define EGL_LARGEST_PBUFFER 0x3058
1.214 +#define EGL_TEXTURE_FORMAT 0x3080
1.215 +#define EGL_TEXTURE_TARGET 0x3081
1.216 +#define EGL_MIPMAP_TEXTURE 0x3082
1.217 +#define EGL_MIPMAP_LEVEL 0x3083
1.218 +#define EGL_RENDER_BUFFER 0x3086
1.219 +#define EGL_VG_COLORSPACE 0x3087
1.220 +#define EGL_VG_ALPHA_FORMAT 0x3088
1.221 +#define EGL_HORIZONTAL_RESOLUTION 0x3090
1.222 +#define EGL_VERTICAL_RESOLUTION 0x3091
1.223 +#define EGL_PIXEL_ASPECT_RATIO 0x3092
1.224 +#define EGL_SWAP_BEHAVIOR 0x3093
1.225 +#define EGL_MULTISAMPLE_RESOLVE 0x3099
1.226 +
1.227 +/* EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets */
1.228 +#define EGL_BACK_BUFFER 0x3084
1.229 +#define EGL_SINGLE_BUFFER 0x3085
1.230 +
1.231 +/* OpenVG color spaces */
1.232 +#define EGL_VG_COLORSPACE_sRGB 0x3089 /* EGL_VG_COLORSPACE value */
1.233 +#define EGL_VG_COLORSPACE_LINEAR 0x308A /* EGL_VG_COLORSPACE value */
1.234 +
1.235 +/* OpenVG alpha formats */
1.236 +#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B /* EGL_ALPHA_FORMAT value */
1.237 +#define EGL_VG_ALPHA_FORMAT_PRE 0x308C /* EGL_ALPHA_FORMAT value */
1.238 +
1.239 +/* Constant scale factor by which fractional display resolutions &
1.240 + * aspect ratio are scaled when queried as integer values.
1.241 + */
1.242 +#define EGL_DISPLAY_SCALING 10000
1.243 +
1.244 +/* Unknown display resolution/aspect ratio */
1.245 +#define EGL_UNKNOWN ((EGLint)-1)
1.246 +
1.247 +/* Back buffer swap behaviors */
1.248 +#define EGL_BUFFER_PRESERVED 0x3094 /* EGL_SWAP_BEHAVIOR value */
1.249 +#define EGL_BUFFER_DESTROYED 0x3095 /* EGL_SWAP_BEHAVIOR value */
1.250 +
1.251 +/* CreatePbufferFromClientBuffer buffer types */
1.252 +#define EGL_OPENVG_IMAGE 0x3096
1.253 +
1.254 +/* QueryContext targets */
1.255 +#define EGL_CONTEXT_CLIENT_TYPE 0x3097
1.256 +
1.257 +/* CreateContext attributes */
1.258 +#define EGL_CONTEXT_CLIENT_VERSION 0x3098
1.259 +
1.260 +/* Multisample resolution behaviors */
1.261 +#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A /* EGL_MULTISAMPLE_RESOLVE value */
1.262 +#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B /* EGL_MULTISAMPLE_RESOLVE value */
1.263 +
1.264 +/* BindAPI/QueryAPI targets */
1.265 +#define EGL_OPENGL_ES_API 0x30A0
1.266 +#define EGL_OPENVG_API 0x30A1
1.267 +#define EGL_OPENGL_API 0x30A2
1.268 +
1.269 +/* GetCurrentSurface targets */
1.270 +#define EGL_DRAW 0x3059
1.271 +#define EGL_READ 0x305A
1.272 +
1.273 +/* WaitNative engines */
1.274 +#define EGL_CORE_NATIVE_ENGINE 0x305B
1.275 +
1.276 +/* EGL 1.2 tokens renamed for consistency in EGL 1.3 */
1.277 +#define EGL_COLORSPACE EGL_VG_COLORSPACE
1.278 +#define EGL_ALPHA_FORMAT EGL_VG_ALPHA_FORMAT
1.279 +#define EGL_COLORSPACE_sRGB EGL_VG_COLORSPACE_sRGB
1.280 +#define EGL_COLORSPACE_LINEAR EGL_VG_COLORSPACE_LINEAR
1.281 +#define EGL_ALPHA_FORMAT_NONPRE EGL_VG_ALPHA_FORMAT_NONPRE
1.282 +#define EGL_ALPHA_FORMAT_PRE EGL_VG_ALPHA_FORMAT_PRE
1.283 +
1.284 +/* EGL extensions must request enum blocks from the Khronos
1.285 + * API Registrar, who maintains the enumerant registry. Submit
1.286 + * a bug in Khronos Bugzilla against task "Registry".
1.287 + */
1.288 +
1.289 +
1.290 +
1.291 +/* EGL Functions */
1.292 +
1.293 +EGLAPI EGLint EGLAPIENTRY eglGetError(void);
1.294 +
1.295 +EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id);
1.296 +EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor);
1.297 +EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy);
1.298 +
1.299 +EGLAPI const char * EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name);
1.300 +
1.301 +EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,
1.302 + EGLint config_size, EGLint *num_config);
1.303 +EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,
1.304 + EGLConfig *configs, EGLint config_size,
1.305 + EGLint *num_config);
1.306 +EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
1.307 + EGLint attribute, EGLint *value);
1.308 +
1.309 +EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
1.310 + EGLNativeWindowType win,
1.311 + const EGLint *attrib_list);
1.312 +EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
1.313 + const EGLint *attrib_list);
1.314 +EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,
1.315 + EGLNativePixmapType pixmap,
1.316 + const EGLint *attrib_list);
1.317 +EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface);
1.318 +EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface,
1.319 + EGLint attribute, EGLint *value);
1.320 +
1.321 +EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api);
1.322 +EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void);
1.323 +
1.324 +EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void);
1.325 +
1.326 +EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void);
1.327 +
1.328 +EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(
1.329 + EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
1.330 + EGLConfig config, const EGLint *attrib_list);
1.331 +
1.332 +EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface,
1.333 + EGLint attribute, EGLint value);
1.334 +EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
1.335 +EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
1.336 +
1.337 +
1.338 +EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval);
1.339 +
1.340 +
1.341 +EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config,
1.342 + EGLContext share_context,
1.343 + const EGLint *attrib_list);
1.344 +EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx);
1.345 +EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw,
1.346 + EGLSurface read, EGLContext ctx);
1.347 +
1.348 +EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void);
1.349 +EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw);
1.350 +EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void);
1.351 +EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx,
1.352 + EGLint attribute, EGLint *value);
1.353 +
1.354 +EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void);
1.355 +EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine);
1.356 +EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface);
1.357 +EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,
1.358 + EGLNativePixmapType target);
1.359 +
1.360 +#ifdef __cplusplus
1.361 +EGLAPI void (* EGLAPIENTRY eglGetProcAddress (const char *procname))(...);
1.362 +#else
1.363 +EGLAPI void (* EGLAPIENTRY eglGetProcAddress (const char *procname))();
1.364 +#endif
1.365 +
1.366 +#ifdef __cplusplus
1.367 +}
1.368 +#endif
1.369 +
1.370 +#endif /* __egl_h_ */