Skip to content

Commit

Permalink
OpenGL examples: use eglMakeCurrent to unbind the context/surfaces in…
Browse files Browse the repository at this point in the history
… deinitEgl
  • Loading branch information
fincs committed Sep 26, 2018
1 parent 0dd20a4 commit 5c2187c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions graphics/opengl/dynamic_resolution/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ static void deinitEgl()
{
if (s_display)
{
eglMakeCurrent(s_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (s_context)
{
eglDestroyContext(s_display, s_context);
Expand Down
1 change: 1 addition & 0 deletions graphics/opengl/es2gears/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ static void deinitEgl()
{
if (s_display)
{
eglMakeCurrent(s_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (s_context)
{
eglDestroyContext(s_display, s_context);
Expand Down
1 change: 1 addition & 0 deletions graphics/opengl/lenny/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ static void deinitEgl()
{
if (s_display)
{
eglMakeCurrent(s_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (s_context)
{
eglDestroyContext(s_display, s_context);
Expand Down
1 change: 1 addition & 0 deletions graphics/opengl/simple_triangle/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ static void deinitEgl()
{
if (s_display)
{
eglMakeCurrent(s_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (s_context)
{
eglDestroyContext(s_display, s_context);
Expand Down
1 change: 1 addition & 0 deletions graphics/opengl/textured_cube/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ static void deinitEgl()
{
if (s_display)
{
eglMakeCurrent(s_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (s_context)
{
eglDestroyContext(s_display, s_context);
Expand Down

0 comments on commit 5c2187c

Please sign in to comment.