src/video/emscripten/SDL_emscriptenopengles.c
changeset 12579 8dc4e45fbe2b
parent 12503 806492103856
equal deleted inserted replaced
12578:b127ca09e7fe 12579:8dc4e45fbe2b
    79     }
    79     }
    80     
    80     
    81     return 0;
    81     return 0;
    82 }
    82 }
    83 
    83 
    84 void
       
    85 Emscripten_GLES_DeleteContext(_THIS, SDL_GLContext context)
       
    86 {
       
    87     /*
       
    88     WebGL contexts can't actually be deleted, so we need to reset it.
       
    89     ES2 renderer resets state on init anyway, clearing the canvas should be enough
       
    90     */
       
    91 
       
    92     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
       
    93 
       
    94     SDL_EGL_DeleteContext(_this, context);
       
    95 }
       
    96 
       
    97 SDL_EGL_CreateContext_impl(Emscripten)
    84 SDL_EGL_CreateContext_impl(Emscripten)
    98 SDL_EGL_SwapWindow_impl(Emscripten)
    85 SDL_EGL_SwapWindow_impl(Emscripten)
    99 SDL_EGL_MakeCurrent_impl(Emscripten)
    86 SDL_EGL_MakeCurrent_impl(Emscripten)
   100 
    87 
   101 void
    88 void