sl@0: #ifndef __LEGACY_EGL_1_1_EGL_H_ sl@0: #define __LEGACY_EGL_1_1_EGL_H_ sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: sl@0: /* sl@0: ** License Applicability. Except to the extent portions of this file are sl@0: ** made subject to an alternative license as permitted in the SGI Free sl@0: ** Software License B, Version 1.0 (the "License"), the contents of this sl@0: ** file are subject only to the provisions of the License. You may not use sl@0: ** this file except in compliance with the License. You may obtain a copy sl@0: ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 sl@0: ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: sl@0: ** sl@0: ** http://oss.sgi.com/projects/FreeB sl@0: ** sl@0: ** Note that, as provided in the License, the Software is distributed on an sl@0: ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS sl@0: ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND sl@0: ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A sl@0: ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. sl@0: ** sl@0: ** Original Code. The Original Code is: OpenGL Sample Implementation, sl@0: ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, sl@0: ** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc. sl@0: ** Copyright in any portions created by third parties is as indicated sl@0: ** elsewhere herein. All Rights Reserved. sl@0: ** sl@0: ** Additional Notice Provisions: The application programming interfaces sl@0: ** established by SGI in conjunction with the Original Code are The sl@0: ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released sl@0: ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version sl@0: ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X sl@0: ** Window System(R) (Version 1.3), released October 19, 1998. This software sl@0: ** was created using the OpenGL(R) version 1.2.1 Sample Implementation sl@0: ** published by SGI, but has not been independently verified as being sl@0: ** compliant with the OpenGL(R) version 1.2.1 Specification. sl@0: */ sl@0: sl@0: #include sl@0: #include sl@0: sl@0: /* sl@0: ** egltypes.h is platform dependent. It defines: sl@0: ** sl@0: ** - EGL types and resources sl@0: ** - Native types sl@0: ** - EGL and native handle values sl@0: ** sl@0: ** EGL types and resources are to be typedef'ed with appropriate platform sl@0: ** dependent resource handle types. EGLint must be an integer of at least sl@0: ** 32-bit. sl@0: ** sl@0: ** NativeDisplayType, NativeWindowType and NativePixmapType are to be sl@0: ** replaced with corresponding types of the native window system in egl.h. sl@0: ** sl@0: ** EGL and native handle values must match their types. sl@0: ** sl@0: ** Example egltypes.h: sl@0: */ sl@0: sl@0: #if 0 sl@0: sl@0: #include sl@0: #include sl@0: sl@0: /* sl@0: ** Types and resources sl@0: */ sl@0: typedef int EGLBoolean; sl@0: typedef int32_t EGLint; sl@0: typedef void *EGLDisplay; sl@0: typedef void *EGLConfig; sl@0: typedef void *EGLSurface; sl@0: typedef void *EGLContext; sl@0: sl@0: /* sl@0: ** EGL and native handle values sl@0: */ sl@0: #define EGL_DEFAULT_DISPLAY ((NativeDisplayType)0) sl@0: #define EGL_NO_CONTEXT ((EGLContext)0) sl@0: #define EGL_NO_DISPLAY ((EGLDisplay)0) sl@0: #define EGL_NO_SURFACE ((EGLSurface)0) sl@0: sl@0: #endif sl@0: sl@0: /* sl@0: ** Versioning and extensions sl@0: */ sl@0: #define EGL_VERSION_1_0 1 sl@0: #define EGL_VERSION_1_1 1 sl@0: sl@0: /* sl@0: ** Boolean sl@0: */ sl@0: #define EGL_FALSE 0 sl@0: #define EGL_TRUE 1 sl@0: sl@0: /* sl@0: ** Errors sl@0: */ sl@0: #define EGL_SUCCESS 0x3000 sl@0: #define EGL_NOT_INITIALIZED 0x3001 sl@0: #define EGL_BAD_ACCESS 0x3002 sl@0: #define EGL_BAD_ALLOC 0x3003 sl@0: #define EGL_BAD_ATTRIBUTE 0x3004 sl@0: #define EGL_BAD_CONFIG 0x3005 sl@0: #define EGL_BAD_CONTEXT 0x3006 sl@0: #define EGL_BAD_CURRENT_SURFACE 0x3007 sl@0: #define EGL_BAD_DISPLAY 0x3008 sl@0: #define EGL_BAD_MATCH 0x3009 sl@0: #define EGL_BAD_NATIVE_PIXMAP 0x300A sl@0: #define EGL_BAD_NATIVE_WINDOW 0x300B sl@0: #define EGL_BAD_PARAMETER 0x300C sl@0: #define EGL_BAD_SURFACE 0x300D sl@0: #define EGL_CONTEXT_LOST 0x300E sl@0: /* 0x300F - 0x301F reserved for additional errors. */ sl@0: sl@0: /* sl@0: ** Config attributes sl@0: */ sl@0: #define EGL_BUFFER_SIZE 0x3020 sl@0: #define EGL_ALPHA_SIZE 0x3021 sl@0: #define EGL_BLUE_SIZE 0x3022 sl@0: #define EGL_GREEN_SIZE 0x3023 sl@0: #define EGL_RED_SIZE 0x3024 sl@0: #define EGL_DEPTH_SIZE 0x3025 sl@0: #define EGL_STENCIL_SIZE 0x3026 sl@0: #define EGL_CONFIG_CAVEAT 0x3027 sl@0: #define EGL_CONFIG_ID 0x3028 sl@0: #define EGL_LEVEL 0x3029 sl@0: #define EGL_MAX_PBUFFER_HEIGHT 0x302A sl@0: #define EGL_MAX_PBUFFER_PIXELS 0x302B sl@0: #define EGL_MAX_PBUFFER_WIDTH 0x302C sl@0: #define EGL_NATIVE_RENDERABLE 0x302D sl@0: #define EGL_NATIVE_VISUAL_ID 0x302E sl@0: #define EGL_NATIVE_VISUAL_TYPE 0x302F sl@0: /*#define EGL_PRESERVED_RESOURCES 0x3030*/ sl@0: #define EGL_SAMPLES 0x3031 sl@0: #define EGL_SAMPLE_BUFFERS 0x3032 sl@0: #define EGL_SURFACE_TYPE 0x3033 sl@0: #define EGL_TRANSPARENT_TYPE 0x3034 sl@0: #define EGL_TRANSPARENT_BLUE_VALUE 0x3035 sl@0: #define EGL_TRANSPARENT_GREEN_VALUE 0x3036 sl@0: #define EGL_TRANSPARENT_RED_VALUE 0x3037 sl@0: sl@0: #define EGL_NONE 0x3038 /* Also a config value */ sl@0: #define EGL_BIND_TO_TEXTURE_RGB 0x3039 sl@0: #define EGL_BIND_TO_TEXTURE_RGBA 0x303A sl@0: #define EGL_MIN_SWAP_INTERVAL 0x303B sl@0: #define EGL_MAX_SWAP_INTERVAL 0x303C sl@0: sl@0: /* sl@0: ** Config values sl@0: */ sl@0: #define EGL_DONT_CARE ((EGLint) -1) sl@0: sl@0: #define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */ sl@0: #define EGL_NON_CONFORMANT_CONFIG 0x3051 /* " */ sl@0: #define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */ sl@0: #define EGL_NO_TEXTURE 0x305C /* EGL_TEXTURE_FORMAT/TARGET value */ sl@0: #define EGL_TEXTURE_RGB 0x305D /* EGL_TEXTURE_FORMAT value */ sl@0: #define EGL_TEXTURE_RGBA 0x305E /* " */ sl@0: #define EGL_TEXTURE_2D 0x305F /* EGL_TEXTURE_TARGET value */ sl@0: sl@0: /* sl@0: ** Config attribute mask bits sl@0: */ sl@0: #define EGL_PBUFFER_BIT 0x01 /* EGL_SURFACE_TYPE mask bit */ sl@0: #define EGL_PIXMAP_BIT 0x02 /* " */ sl@0: #define EGL_WINDOW_BIT 0x04 /* " */ sl@0: sl@0: /* sl@0: ** String names sl@0: */ sl@0: #define EGL_VENDOR 0x3053 sl@0: #define EGL_VERSION 0x3054 sl@0: #define EGL_EXTENSIONS 0x3055 sl@0: sl@0: /* sl@0: ** Surface attributes sl@0: */ sl@0: #define EGL_HEIGHT 0x3056 sl@0: #define EGL_WIDTH 0x3057 sl@0: #define EGL_LARGEST_PBUFFER 0x3058 sl@0: #define EGL_TEXTURE_FORMAT 0x3080 /* For pbuffers bound as textures */ sl@0: #define EGL_TEXTURE_TARGET 0x3081 /* " */ sl@0: #define EGL_MIPMAP_TEXTURE 0x3082 /* " */ sl@0: #define EGL_MIPMAP_LEVEL 0x3083 /* " */ sl@0: sl@0: /* sl@0: ** BindTexImage / ReleaseTexImage buffer target sl@0: */ sl@0: #define EGL_BACK_BUFFER 0x3084 sl@0: sl@0: /* sl@0: ** Current surfaces sl@0: */ sl@0: #define EGL_DRAW 0x3059 sl@0: #define EGL_READ 0x305A sl@0: sl@0: /* sl@0: ** Engines sl@0: */ sl@0: #define EGL_CORE_NATIVE_ENGINE 0x305B sl@0: sl@0: /* 0x305C-0x3FFFF reserved for future use */ sl@0: sl@0: /* sl@0: ** Functions sl@0: */ sl@0: #ifdef __cplusplus sl@0: extern "C" { sl@0: #endif sl@0: sl@0: GLAPI EGLint GL_APIENTRY eglGetError (void); sl@0: sl@0: GLAPI EGLDisplay GL_APIENTRY eglGetDisplay (NativeDisplayType display); sl@0: GLAPI EGLBoolean GL_APIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor); sl@0: GLAPI EGLBoolean GL_APIENTRY eglTerminate (EGLDisplay dpy); sl@0: GLAPI const char * GL_APIENTRY eglQueryString (EGLDisplay dpy, EGLint name); sl@0: #ifdef __cplusplus sl@0: GLAPI void (* GL_APIENTRY eglGetProcAddress (const char *procname))(...); sl@0: #else sl@0: GLAPI void (* GL_APIENTRY eglGetProcAddress (const char *procname))(); sl@0: #endif sl@0: sl@0: GLAPI EGLBoolean GL_APIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config); sl@0: GLAPI EGLBoolean GL_APIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); sl@0: GLAPI EGLBoolean GL_APIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value); sl@0: sl@0: GLAPI EGLSurface GL_APIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list); sl@0: GLAPI EGLSurface GL_APIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint *attrib_list); sl@0: GLAPI EGLSurface GL_APIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); sl@0: GLAPI EGLBoolean GL_APIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface); sl@0: GLAPI EGLBoolean GL_APIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value); sl@0: /* EGL 1.1 render-to-texture APIs */ sl@0: GLAPI EGLBoolean GL_APIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value); sl@0: GLAPI EGLBoolean GL_APIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); sl@0: GLAPI EGLBoolean GL_APIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); sl@0: sl@0: /* EGL 1.1 swap control API */ sl@0: GLAPI EGLBoolean GL_APIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval); sl@0: sl@0: GLAPI EGLContext GL_APIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list); sl@0: GLAPI EGLBoolean GL_APIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx); sl@0: GLAPI EGLBoolean GL_APIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); sl@0: GLAPI EGLContext GL_APIENTRY eglGetCurrentContext (void); sl@0: GLAPI EGLSurface GL_APIENTRY eglGetCurrentSurface (EGLint readdraw); sl@0: GLAPI EGLDisplay GL_APIENTRY eglGetCurrentDisplay (void); sl@0: GLAPI EGLBoolean GL_APIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value); sl@0: sl@0: GLAPI EGLBoolean GL_APIENTRY eglWaitGL (void); sl@0: GLAPI EGLBoolean GL_APIENTRY eglWaitNative (EGLint engine); sl@0: GLAPI EGLBoolean GL_APIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface draw); sl@0: GLAPI EGLBoolean GL_APIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, NativePixmapType target); sl@0: sl@0: #ifdef __cplusplus sl@0: } sl@0: #endif sl@0: sl@0: #endif /* __LEGACY_EGL_1_1_EGL_H_ */ sl@0: