summaryrefslogtreecommitdiffstats
path: root/src/egl/main
diff options
context:
space:
mode:
authorAdam Jackson <[email protected]>2016-09-07 17:41:56 -0400
committerAdam Jackson <[email protected]>2016-09-08 13:19:58 -0400
commita279760536be03702a3eb133c51079907a2ccc9c (patch)
treeff9cb26eb9cf2882701445467eeeac6f96118d9b /src/egl/main
parentbad80c26e794d690914e7b16a29633e5f5a92a60 (diff)
egl: Document why EGL_OPENGL{, _ES}_API are mostly identical
Signed-off-by: Adam Jackson <[email protected]> Reviewed-by: Alejandro PiƱeiro <[email protected]>
Diffstat (limited to 'src/egl/main')
-rw-r--r--src/egl/main/eglcontext.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
index ebc004d8cf2..057b60fa491 100644
--- a/src/egl/main/eglcontext.c
+++ b/src/egl/main/eglcontext.c
@@ -457,6 +457,16 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
/**
* Initialize the given _EGLContext object to defaults and/or the values
* in the attrib_list.
+ *
+ * According to EGL 1.5 Section 3.7:
+ *
+ * "EGL_OPENGL_API and EGL_OPENGL_ES_API are interchangeable for all
+ * purposes except eglCreateContext."
+ *
+ * And since we only support GL and GLES, this is the only place where the
+ * bound API matters at all. We look up the current API from the current
+ * thread, and stash that in the context we're initializing. Our caller is
+ * responsible for determining whether that's an API it supports.
*/
EGLBoolean
_eglInitContext(_EGLContext *ctx, _EGLDisplay *dpy, _EGLConfig *conf,