Question

The question is regarding OpenGL ES 2.0 and EGL 1.4.

I'm trying to understand if there is a spec requirement of the behavior of GL commands after eglTerminate was called. I mean if there is any GL error or it can be an exception.

Is there any definition of an expected behavior in this case, or should GL commands not be influenced by EGL commands at all?

Thanks

Was it helpful?

Solution

Calling eglTerminate flags all EGL resources associated with the EGLDisplay you are terminating for deletion. This includes any surfaces and contexts, which would certainly affect the behaviour of an OpenGL ES context in your case.

Regarding expected behaviour, the spec wording you're after is the following (from http://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf - eglTerminate, page 17):

Use of bound contexts and surfaces (that is, continuing to issue com- mands to a bound client API context) will not result in interruption or termination of applications, but rendering results are undefined, and client APIs may generate errors.

i.e. if your context is still current when you terminate the display, any subsequent OpenGL ES calls made on that context are undefined - they may raise OpenGL ES errors, or result in incorrect rendering, but should not cause an exception.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top