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