os/graphics/opengles/openglesinterface/include/legacy_egl_1_1/egl.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/opengles/openglesinterface/include/legacy_egl_1_1/egl.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,266 @@
     1.4 +#ifndef __LEGACY_EGL_1_1_EGL_H_
     1.5 +#define __LEGACY_EGL_1_1_EGL_H_
     1.6 +
     1.7 +/**
     1.8 +@publishedAll
     1.9 +@released
    1.10 +*/
    1.11 +
    1.12 +/*
    1.13 +** License Applicability. Except to the extent portions of this file are
    1.14 +** made subject to an alternative license as permitted in the SGI Free
    1.15 +** Software License B, Version 1.0 (the "License"), the contents of this
    1.16 +** file are subject only to the provisions of the License. You may not use
    1.17 +** this file except in compliance with the License. You may obtain a copy
    1.18 +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
    1.19 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
    1.20 +**
    1.21 +** http://oss.sgi.com/projects/FreeB
    1.22 +**
    1.23 +** Note that, as provided in the License, the Software is distributed on an
    1.24 +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
    1.25 +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
    1.26 +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
    1.27 +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
    1.28 +**
    1.29 +** Original Code. The Original Code is: OpenGL Sample Implementation,
    1.30 +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
    1.31 +** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc.
    1.32 +** Copyright in any portions created by third parties is as indicated
    1.33 +** elsewhere herein. All Rights Reserved.
    1.34 +**
    1.35 +** Additional Notice Provisions: The application programming interfaces
    1.36 +** established by SGI in conjunction with the Original Code are The
    1.37 +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
    1.38 +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
    1.39 +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
    1.40 +** Window System(R) (Version 1.3), released October 19, 1998. This software
    1.41 +** was created using the OpenGL(R) version 1.2.1 Sample Implementation
    1.42 +** published by SGI, but has not been independently verified as being
    1.43 +** compliant with the OpenGL(R) version 1.2.1 Specification.
    1.44 +*/
    1.45 +
    1.46 +#include <GLES/gl.h>
    1.47 +#include <GLES/egltypes.h>
    1.48 +
    1.49 +/*
    1.50 +** egltypes.h is platform dependent. It defines:
    1.51 +**
    1.52 +**     - EGL types and resources
    1.53 +**     - Native types
    1.54 +**     - EGL and native handle values
    1.55 +**
    1.56 +** EGL types and resources are to be typedef'ed with appropriate platform
    1.57 +** dependent resource handle types. EGLint must be an integer of at least
    1.58 +** 32-bit.
    1.59 +**
    1.60 +** NativeDisplayType, NativeWindowType and NativePixmapType are to be
    1.61 +** replaced with corresponding types of the native window system in egl.h.
    1.62 +**
    1.63 +** EGL and native handle values must match their types.
    1.64 +**
    1.65 +** Example egltypes.h:
    1.66 +*/
    1.67 +
    1.68 +#if 0
    1.69 +
    1.70 +#include <sys/types.h>
    1.71 +#include <native_window_system.h>
    1.72 +
    1.73 +/*
    1.74 +** Types and resources
    1.75 +*/
    1.76 +typedef int EGLBoolean;
    1.77 +typedef int32_t EGLint;
    1.78 +typedef void *EGLDisplay;
    1.79 +typedef void *EGLConfig;
    1.80 +typedef void *EGLSurface;
    1.81 +typedef void *EGLContext;
    1.82 +
    1.83 +/*
    1.84 +** EGL and native handle values
    1.85 +*/
    1.86 +#define EGL_DEFAULT_DISPLAY ((NativeDisplayType)0)
    1.87 +#define EGL_NO_CONTEXT ((EGLContext)0)
    1.88 +#define EGL_NO_DISPLAY ((EGLDisplay)0)
    1.89 +#define EGL_NO_SURFACE ((EGLSurface)0)
    1.90 +
    1.91 +#endif
    1.92 +
    1.93 +/*
    1.94 +** Versioning and extensions
    1.95 +*/
    1.96 +#define EGL_VERSION_1_0                1
    1.97 +#define EGL_VERSION_1_1		       1
    1.98 +
    1.99 +/*
   1.100 +** Boolean
   1.101 +*/
   1.102 +#define EGL_FALSE                      0
   1.103 +#define EGL_TRUE                       1
   1.104 +
   1.105 +/*
   1.106 +** Errors
   1.107 +*/
   1.108 +#define EGL_SUCCESS                    0x3000
   1.109 +#define EGL_NOT_INITIALIZED            0x3001
   1.110 +#define EGL_BAD_ACCESS                 0x3002
   1.111 +#define EGL_BAD_ALLOC                  0x3003
   1.112 +#define EGL_BAD_ATTRIBUTE              0x3004
   1.113 +#define EGL_BAD_CONFIG                 0x3005
   1.114 +#define EGL_BAD_CONTEXT                0x3006
   1.115 +#define EGL_BAD_CURRENT_SURFACE        0x3007
   1.116 +#define EGL_BAD_DISPLAY                0x3008
   1.117 +#define EGL_BAD_MATCH                  0x3009
   1.118 +#define EGL_BAD_NATIVE_PIXMAP          0x300A
   1.119 +#define EGL_BAD_NATIVE_WINDOW          0x300B
   1.120 +#define EGL_BAD_PARAMETER              0x300C
   1.121 +#define EGL_BAD_SURFACE                0x300D
   1.122 +#define EGL_CONTEXT_LOST	       0x300E
   1.123 +/* 0x300F - 0x301F reserved for additional errors. */
   1.124 +
   1.125 +/*
   1.126 +** Config attributes
   1.127 +*/
   1.128 +#define EGL_BUFFER_SIZE                0x3020
   1.129 +#define EGL_ALPHA_SIZE                 0x3021
   1.130 +#define EGL_BLUE_SIZE                  0x3022
   1.131 +#define EGL_GREEN_SIZE                 0x3023
   1.132 +#define EGL_RED_SIZE                   0x3024
   1.133 +#define EGL_DEPTH_SIZE                 0x3025
   1.134 +#define EGL_STENCIL_SIZE               0x3026
   1.135 +#define EGL_CONFIG_CAVEAT              0x3027
   1.136 +#define EGL_CONFIG_ID                  0x3028
   1.137 +#define EGL_LEVEL                      0x3029
   1.138 +#define EGL_MAX_PBUFFER_HEIGHT         0x302A
   1.139 +#define EGL_MAX_PBUFFER_PIXELS         0x302B
   1.140 +#define EGL_MAX_PBUFFER_WIDTH          0x302C
   1.141 +#define EGL_NATIVE_RENDERABLE          0x302D
   1.142 +#define EGL_NATIVE_VISUAL_ID           0x302E
   1.143 +#define EGL_NATIVE_VISUAL_TYPE         0x302F
   1.144 +/*#define EGL_PRESERVED_RESOURCES        0x3030*/
   1.145 +#define EGL_SAMPLES                    0x3031
   1.146 +#define EGL_SAMPLE_BUFFERS             0x3032
   1.147 +#define EGL_SURFACE_TYPE               0x3033
   1.148 +#define EGL_TRANSPARENT_TYPE           0x3034
   1.149 +#define EGL_TRANSPARENT_BLUE_VALUE     0x3035
   1.150 +#define EGL_TRANSPARENT_GREEN_VALUE    0x3036
   1.151 +#define EGL_TRANSPARENT_RED_VALUE      0x3037
   1.152 +
   1.153 +#define EGL_NONE		       0x3038	/* Also a config value */
   1.154 +#define EGL_BIND_TO_TEXTURE_RGB        0x3039
   1.155 +#define EGL_BIND_TO_TEXTURE_RGBA       0x303A
   1.156 +#define EGL_MIN_SWAP_INTERVAL	       0x303B
   1.157 +#define EGL_MAX_SWAP_INTERVAL	       0x303C
   1.158 +
   1.159 +/*
   1.160 +** Config values
   1.161 +*/
   1.162 +#define EGL_DONT_CARE		       ((EGLint) -1)
   1.163 +
   1.164 +#define EGL_SLOW_CONFIG		       0x3050	/* EGL_CONFIG_CAVEAT value */
   1.165 +#define EGL_NON_CONFORMANT_CONFIG      0x3051	/* " */
   1.166 +#define EGL_TRANSPARENT_RGB	       0x3052	/* EGL_TRANSPARENT_TYPE value */
   1.167 +#define EGL_NO_TEXTURE		       0x305C	/* EGL_TEXTURE_FORMAT/TARGET value */
   1.168 +#define EGL_TEXTURE_RGB		       0x305D	/* EGL_TEXTURE_FORMAT value */
   1.169 +#define EGL_TEXTURE_RGBA	       0x305E	/* " */
   1.170 +#define EGL_TEXTURE_2D		       0x305F	/* EGL_TEXTURE_TARGET value */
   1.171 +
   1.172 +/*
   1.173 +** Config attribute mask bits
   1.174 +*/
   1.175 +#define EGL_PBUFFER_BIT		       0x01	/* EGL_SURFACE_TYPE mask bit */
   1.176 +#define EGL_PIXMAP_BIT		       0x02	/* " */
   1.177 +#define EGL_WINDOW_BIT		       0x04	/* " */
   1.178 +
   1.179 +/*
   1.180 +** String names
   1.181 +*/
   1.182 +#define EGL_VENDOR                     0x3053
   1.183 +#define EGL_VERSION                    0x3054
   1.184 +#define EGL_EXTENSIONS                 0x3055
   1.185 +
   1.186 +/*
   1.187 +** Surface attributes
   1.188 +*/
   1.189 +#define EGL_HEIGHT                     0x3056
   1.190 +#define EGL_WIDTH                      0x3057
   1.191 +#define EGL_LARGEST_PBUFFER            0x3058
   1.192 +#define EGL_TEXTURE_FORMAT	       0x3080	/* For pbuffers bound as textures */
   1.193 +#define EGL_TEXTURE_TARGET	       0x3081	/* " */
   1.194 +#define EGL_MIPMAP_TEXTURE	       0x3082	/* " */
   1.195 +#define EGL_MIPMAP_LEVEL	       0x3083	/* " */
   1.196 +
   1.197 +/*
   1.198 +** BindTexImage / ReleaseTexImage buffer target
   1.199 +*/
   1.200 +#define EGL_BACK_BUFFER		       0x3084
   1.201 +
   1.202 +/*
   1.203 +** Current surfaces
   1.204 +*/
   1.205 +#define EGL_DRAW                       0x3059
   1.206 +#define EGL_READ                       0x305A
   1.207 +
   1.208 +/*
   1.209 +** Engines
   1.210 +*/
   1.211 +#define EGL_CORE_NATIVE_ENGINE         0x305B
   1.212 +
   1.213 +/* 0x305C-0x3FFFF reserved for future use */
   1.214 +
   1.215 +/*
   1.216 +** Functions
   1.217 +*/
   1.218 +#ifdef __cplusplus
   1.219 +extern "C" {
   1.220 +#endif
   1.221 +
   1.222 +GLAPI EGLint GL_APIENTRY eglGetError (void);
   1.223 +
   1.224 +GLAPI EGLDisplay GL_APIENTRY eglGetDisplay (NativeDisplayType display);
   1.225 +GLAPI EGLBoolean GL_APIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor);
   1.226 +GLAPI EGLBoolean GL_APIENTRY eglTerminate (EGLDisplay dpy);
   1.227 +GLAPI const char * GL_APIENTRY eglQueryString (EGLDisplay dpy, EGLint name);
   1.228 +#ifdef __cplusplus
   1.229 +GLAPI void (* GL_APIENTRY eglGetProcAddress (const char *procname))(...);
   1.230 +#else
   1.231 +GLAPI void (* GL_APIENTRY eglGetProcAddress (const char *procname))();
   1.232 +#endif
   1.233 +
   1.234 +GLAPI EGLBoolean GL_APIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
   1.235 +GLAPI EGLBoolean GL_APIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
   1.236 +GLAPI EGLBoolean GL_APIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
   1.237 +
   1.238 +GLAPI EGLSurface GL_APIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list);
   1.239 +GLAPI EGLSurface GL_APIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint *attrib_list);
   1.240 +GLAPI EGLSurface GL_APIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
   1.241 +GLAPI EGLBoolean GL_APIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface);
   1.242 +GLAPI EGLBoolean GL_APIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
   1.243 +/* EGL 1.1 render-to-texture APIs */
   1.244 +GLAPI EGLBoolean GL_APIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
   1.245 +GLAPI EGLBoolean GL_APIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
   1.246 +GLAPI EGLBoolean GL_APIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
   1.247 +
   1.248 +/* EGL 1.1 swap control API */
   1.249 +GLAPI EGLBoolean GL_APIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval);
   1.250 +
   1.251 +GLAPI EGLContext GL_APIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list);
   1.252 +GLAPI EGLBoolean GL_APIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx);
   1.253 +GLAPI EGLBoolean GL_APIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
   1.254 +GLAPI EGLContext GL_APIENTRY eglGetCurrentContext (void);
   1.255 +GLAPI EGLSurface GL_APIENTRY eglGetCurrentSurface (EGLint readdraw);
   1.256 +GLAPI EGLDisplay GL_APIENTRY eglGetCurrentDisplay (void);
   1.257 +GLAPI EGLBoolean GL_APIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
   1.258 +
   1.259 +GLAPI EGLBoolean GL_APIENTRY eglWaitGL (void);
   1.260 +GLAPI EGLBoolean GL_APIENTRY eglWaitNative (EGLint engine);
   1.261 +GLAPI EGLBoolean GL_APIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface draw);
   1.262 +GLAPI EGLBoolean GL_APIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, NativePixmapType target);
   1.263 +
   1.264 +#ifdef __cplusplus
   1.265 +}
   1.266 +#endif
   1.267 +
   1.268 +#endif /* __LEGACY_EGL_1_1_EGL_H_ */
   1.269 +