OpenGL examples: use eglMakeCurrent to unbind the context/surfaces in deinitEgl

This commit is contained in:
fincs 2018-09-26 20:12:25 +02:00
parent 0dd20a470d
commit 5c2187ca44
5 changed files with 5 additions and 0 deletions

View File

@ -155,6 +155,7 @@ static void deinitEgl()
{ {
if (s_display) if (s_display)
{ {
eglMakeCurrent(s_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (s_context) if (s_context)
{ {
eglDestroyContext(s_display, s_context); eglDestroyContext(s_display, s_context);

View File

@ -174,6 +174,7 @@ static void deinitEgl()
{ {
if (s_display) if (s_display)
{ {
eglMakeCurrent(s_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (s_context) if (s_context)
{ {
eglDestroyContext(s_display, s_context); eglDestroyContext(s_display, s_context);

View File

@ -152,6 +152,7 @@ static void deinitEgl()
{ {
if (s_display) if (s_display)
{ {
eglMakeCurrent(s_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (s_context) if (s_context)
{ {
eglDestroyContext(s_display, s_context); eglDestroyContext(s_display, s_context);

View File

@ -139,6 +139,7 @@ static void deinitEgl()
{ {
if (s_display) if (s_display)
{ {
eglMakeCurrent(s_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (s_context) if (s_context)
{ {
eglDestroyContext(s_display, s_context); eglDestroyContext(s_display, s_context);

View File

@ -152,6 +152,7 @@ static void deinitEgl()
{ {
if (s_display) if (s_display)
{ {
eglMakeCurrent(s_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (s_context) if (s_context)
{ {
eglDestroyContext(s_display, s_context); eglDestroyContext(s_display, s_context);