mirror of
https://github.com/switchbrew/switch-examples.git
synced 2025-06-21 05:12:40 +02:00
OpenGL examples: use eglMakeCurrent to unbind the context/surfaces in deinitEgl
This commit is contained in:
parent
0dd20a470d
commit
5c2187ca44
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user