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