Wise&mystical  1.0
Project about Europe
Loading...
Searching...
No Matches
egl_context.h
Go to the documentation of this file.
1//========================================================================
2// GLFW 3.4 EGL - www.glfw.org
3//------------------------------------------------------------------------
4// Copyright (c) 2002-2006 Marcus Geelnard
5// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
6//
7// This software is provided 'as-is', without any express or implied
8// warranty. In no event will the authors be held liable for any damages
9// arising from the use of this software.
10//
11// Permission is granted to anyone to use this software for any purpose,
12// including commercial applications, and to alter it and redistribute it
13// freely, subject to the following restrictions:
14//
15// 1. The origin of this software must not be misrepresented; you must not
16// claim that you wrote the original software. If you use this software
17// in a product, an acknowledgment in the product documentation would
18// be appreciated but is not required.
19//
20// 2. Altered source versions must be plainly marked as such, and must not
21// be misrepresented as being the original software.
22//
23// 3. This notice may not be removed or altered from any source
24// distribution.
25//
26//========================================================================
27
28#if defined(_GLFW_WIN32)
29 #define EGLAPIENTRY __stdcall
30#else
31 #define EGLAPIENTRY
32#endif
33
34#define EGL_SUCCESS 0x3000
35#define EGL_NOT_INITIALIZED 0x3001
36#define EGL_BAD_ACCESS 0x3002
37#define EGL_BAD_ALLOC 0x3003
38#define EGL_BAD_ATTRIBUTE 0x3004
39#define EGL_BAD_CONFIG 0x3005
40#define EGL_BAD_CONTEXT 0x3006
41#define EGL_BAD_CURRENT_SURFACE 0x3007
42#define EGL_BAD_DISPLAY 0x3008
43#define EGL_BAD_MATCH 0x3009
44#define EGL_BAD_NATIVE_PIXMAP 0x300a
45#define EGL_BAD_NATIVE_WINDOW 0x300b
46#define EGL_BAD_PARAMETER 0x300c
47#define EGL_BAD_SURFACE 0x300d
48#define EGL_CONTEXT_LOST 0x300e
49#define EGL_COLOR_BUFFER_TYPE 0x303f
50#define EGL_RGB_BUFFER 0x308e
51#define EGL_SURFACE_TYPE 0x3033
52#define EGL_WINDOW_BIT 0x0004
53#define EGL_RENDERABLE_TYPE 0x3040
54#define EGL_OPENGL_ES_BIT 0x0001
55#define EGL_OPENGL_ES2_BIT 0x0004
56#define EGL_OPENGL_BIT 0x0008
57#define EGL_ALPHA_SIZE 0x3021
58#define EGL_BLUE_SIZE 0x3022
59#define EGL_GREEN_SIZE 0x3023
60#define EGL_RED_SIZE 0x3024
61#define EGL_DEPTH_SIZE 0x3025
62#define EGL_STENCIL_SIZE 0x3026
63#define EGL_SAMPLES 0x3031
64#define EGL_OPENGL_ES_API 0x30a0
65#define EGL_OPENGL_API 0x30a2
66#define EGL_NONE 0x3038
67#define EGL_RENDER_BUFFER 0x3086
68#define EGL_SINGLE_BUFFER 0x3085
69#define EGL_EXTENSIONS 0x3055
70#define EGL_CONTEXT_CLIENT_VERSION 0x3098
71#define EGL_NATIVE_VISUAL_ID 0x302e
72#define EGL_NO_SURFACE ((EGLSurface) 0)
73#define EGL_NO_DISPLAY ((EGLDisplay) 0)
74#define EGL_NO_CONTEXT ((EGLContext) 0)
75#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType) 0)
76
77#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002
78#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001
79#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002
80#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001
81#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31bd
82#define EGL_NO_RESET_NOTIFICATION_KHR 0x31be
83#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31bf
84#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004
85#define EGL_CONTEXT_MAJOR_VERSION_KHR 0x3098
86#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30fb
87#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30fd
88#define EGL_CONTEXT_FLAGS_KHR 0x30fc
89#define EGL_CONTEXT_OPENGL_NO_ERROR_KHR 0x31b3
90#define EGL_GL_COLORSPACE_KHR 0x309d
91#define EGL_GL_COLORSPACE_SRGB_KHR 0x3089
92#define EGL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x2097
93#define EGL_CONTEXT_RELEASE_BEHAVIOR_NONE_KHR 0
94#define EGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR 0x2098
95#define EGL_PLATFORM_X11_EXT 0x31d5
96#define EGL_PLATFORM_WAYLAND_EXT 0x31d8
97#define EGL_PLATFORM_ANGLE_ANGLE 0x3202
98#define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3203
99#define EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE 0x320d
100#define EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE 0x320e
101#define EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3207
102#define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208
103#define EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE 0x3450
104#define EGL_PLATFORM_ANGLE_TYPE_METAL_ANGLE 0x3489
105#define EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE 0x348f
106
107typedef int EGLint;
108typedef unsigned int EGLBoolean;
109typedef unsigned int EGLenum;
110typedef void* EGLConfig;
111typedef void* EGLContext;
112typedef void* EGLDisplay;
113typedef void* EGLSurface;
114
117
118// EGL function pointer typedefs
135#define eglGetConfigAttrib _glfw.egl.GetConfigAttrib
136#define eglGetConfigs _glfw.egl.GetConfigs
137#define eglGetDisplay _glfw.egl.GetDisplay
138#define eglGetError _glfw.egl.GetError
139#define eglInitialize _glfw.egl.Initialize
140#define eglTerminate _glfw.egl.Terminate
141#define eglBindAPI _glfw.egl.BindAPI
142#define eglCreateContext _glfw.egl.CreateContext
143#define eglDestroySurface _glfw.egl.DestroySurface
144#define eglDestroyContext _glfw.egl.DestroyContext
145#define eglCreateWindowSurface _glfw.egl.CreateWindowSurface
146#define eglMakeCurrent _glfw.egl.MakeCurrent
147#define eglSwapBuffers _glfw.egl.SwapBuffers
148#define eglSwapInterval _glfw.egl.SwapInterval
149#define eglQueryString _glfw.egl.QueryString
150#define eglGetProcAddress _glfw.egl.GetProcAddress
151
154#define eglGetPlatformDisplayEXT _glfw.egl.GetPlatformDisplayEXT
155#define eglCreatePlatformWindowSurfaceEXT _glfw.egl.CreatePlatformWindowSurfaceEXT
156
157// EGL-specific per-context data
158//
159typedef struct _GLFWcontextEGL
160{
164
165 void* client;
166
168
169// EGL-specific global data
170//
171typedef struct _GLFWlibraryEGL
172{
177
192
193 void* handle;
194
211
214
216
217
219void _glfwTerminateEGL(void);
221 const _GLFWctxconfig* ctxconfig,
222 const _GLFWfbconfig* fbconfig);
223#if defined(_GLFW_X11)
224GLFWbool _glfwChooseVisualEGL(const _GLFWwndconfig* wndconfig,
225 const _GLFWctxconfig* ctxconfig,
226 const _GLFWfbconfig* fbconfig,
227 Visual** visual, int* depth);
228#endif /*_GLFW_X11*/
229
EGLBoolean(EGLAPIENTRY * PFN_eglSwapInterval)(EGLDisplay, EGLint)
Definition: egl_context.h:132
EGLint(EGLAPIENTRY * PFN_eglGetError)(void)
Definition: egl_context.h:122
void * EGLSurface
Definition: egl_context.h:113
EGLSurface(EGLAPIENTRY * PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC)(EGLDisplay, EGLConfig, void *, const EGLint *)
Definition: egl_context.h:153
unsigned int EGLenum
Definition: egl_context.h:109
void * EGLContext
Definition: egl_context.h:111
void * EGLNativeDisplayType
Definition: egl_context.h:115
EGLSurface(EGLAPIENTRY * PFN_eglCreateWindowSurface)(EGLDisplay, EGLConfig, EGLNativeWindowType, const EGLint *)
Definition: egl_context.h:129
void * EGLConfig
Definition: egl_context.h:110
EGLBoolean(EGLAPIENTRY * PFN_eglBindAPI)(EGLenum)
Definition: egl_context.h:125
EGLBoolean(EGLAPIENTRY * PFN_eglDestroySurface)(EGLDisplay, EGLSurface)
Definition: egl_context.h:127
EGLContext(EGLAPIENTRY * PFN_eglCreateContext)(EGLDisplay, EGLConfig, EGLContext, const EGLint *)
Definition: egl_context.h:126
EGLBoolean(EGLAPIENTRY * PFN_eglGetConfigs)(EGLDisplay, EGLConfig *, EGLint, EGLint *)
Definition: egl_context.h:120
void * EGLNativeWindowType
Definition: egl_context.h:116
void * EGLDisplay
Definition: egl_context.h:112
EGLBoolean(EGLAPIENTRY * PFN_eglMakeCurrent)(EGLDisplay, EGLSurface, EGLSurface, EGLContext)
Definition: egl_context.h:130
EGLBoolean(EGLAPIENTRY * PFN_eglInitialize)(EGLDisplay, EGLint *, EGLint *)
Definition: egl_context.h:123
int EGLint
Definition: egl_context.h:107
EGLBoolean(EGLAPIENTRY * PFN_eglGetConfigAttrib)(EGLDisplay, EGLConfig, EGLint, EGLint *)
Definition: egl_context.h:119
EGLBoolean(EGLAPIENTRY * PFN_eglDestroyContext)(EGLDisplay, EGLContext)
Definition: egl_context.h:128
EGLBoolean(EGLAPIENTRY * PFN_eglTerminate)(EGLDisplay)
Definition: egl_context.h:124
unsigned int EGLBoolean
Definition: egl_context.h:108
#define EGLAPIENTRY
Definition: egl_context.h:31
void _glfwTerminateEGL(void)
Definition: egl_context.c:481
EGLBoolean(EGLAPIENTRY * PFN_eglSwapBuffers)(EGLDisplay, EGLSurface)
Definition: egl_context.h:131
GLFWbool _glfwInitEGL(void)
Definition: egl_context.c:303
GLFWbool _glfwCreateContextEGL(_GLFWwindow *window, const _GLFWctxconfig *ctxconfig, const _GLFWfbconfig *fbconfig)
Definition: egl_context.c:505
EGLDisplay(EGLAPIENTRY * PFN_eglGetDisplay)(EGLNativeDisplayType)
Definition: egl_context.h:121
EGLDisplay(EGLAPIENTRY * PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum, void *, const EGLint *)
Definition: egl_context.h:152
GLFWglproc(EGLAPIENTRY * PFN_eglGetProcAddress)(const char *)
Definition: egl_context.h:134
const char *(EGLAPIENTRY * PFN_eglQueryString)(EGLDisplay, EGLint)
Definition: egl_context.h:133
void(* GLFWglproc)(void)
GLFW API types.
Definition: glfw3.h:1281
int GLFWbool
Definition: internal.h:61
EGLSurface surface
Definition: egl_context.h:163
EGLContext handle
Definition: egl_context.h:162
EGLConfig config
Definition: egl_context.h:161
PFN_eglGetProcAddress GetProcAddress
Definition: egl_context.h:210
PFN_eglBindAPI BindAPI
Definition: egl_context.h:201
EGLDisplay display
Definition: egl_context.h:174
GLFWbool ANGLE_platform_angle_d3d
Definition: egl_context.h:189
GLFWbool ANGLE_platform_angle_metal
Definition: egl_context.h:191
PFN_eglGetError GetError
Definition: egl_context.h:198
GLFWbool prefix
Definition: egl_context.h:176
PFN_eglMakeCurrent MakeCurrent
Definition: egl_context.h:206
PFN_eglCreateWindowSurface CreateWindowSurface
Definition: egl_context.h:205
PFN_eglQueryString QueryString
Definition: egl_context.h:209
PFN_eglTerminate Terminate
Definition: egl_context.h:200
GLFWbool EXT_platform_wayland
Definition: egl_context.h:186
PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC CreatePlatformWindowSurfaceEXT
Definition: egl_context.h:213
GLFWbool EXT_platform_base
Definition: egl_context.h:184
PFN_eglInitialize Initialize
Definition: egl_context.h:199
GLFWbool KHR_gl_colorspace
Definition: egl_context.h:180
PFN_eglGetConfigs GetConfigs
Definition: egl_context.h:196
GLFWbool KHR_create_context_no_error
Definition: egl_context.h:179
GLFWbool ANGLE_platform_angle
Definition: egl_context.h:187
GLFWbool ANGLE_platform_angle_vulkan
Definition: egl_context.h:190
PFN_eglSwapBuffers SwapBuffers
Definition: egl_context.h:207
PFNEGLGETPLATFORMDISPLAYEXTPROC GetPlatformDisplayEXT
Definition: egl_context.h:212
PFN_eglSwapInterval SwapInterval
Definition: egl_context.h:208
PFN_eglGetDisplay GetDisplay
Definition: egl_context.h:197
GLFWbool KHR_context_flush_control
Definition: egl_context.h:182
PFN_eglCreateContext CreateContext
Definition: egl_context.h:202
GLFWbool EXT_platform_x11
Definition: egl_context.h:185
GLFWbool KHR_create_context
Definition: egl_context.h:178
PFN_eglDestroyContext DestroyContext
Definition: egl_context.h:204
PFN_eglDestroySurface DestroySurface
Definition: egl_context.h:203
GLFWbool ANGLE_platform_angle_opengl
Definition: egl_context.h:188
GLFWbool KHR_get_all_proc_addresses
Definition: egl_context.h:181
PFN_eglGetConfigAttrib GetConfigAttrib
Definition: egl_context.h:195
EGLenum platform
Definition: egl_context.h:173
GLFWbool EXT_client_extensions
Definition: egl_context.h:183