src/render/opengl/SDL_render_gl.c
changeset 5566 0d221d6ffac8
parent 5535 96594ac5fd1a
child 5981 75caa8a7d559
equal deleted inserted replaced
5564:7ed38a8ad304 5566:0d221d6ffac8
  1009 GL_DestroyRenderer(SDL_Renderer * renderer)
  1009 GL_DestroyRenderer(SDL_Renderer * renderer)
  1010 {
  1010 {
  1011     GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
  1011     GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
  1012 
  1012 
  1013     if (data) {
  1013     if (data) {
       
  1014         if (data->shaders) {
       
  1015             GL_DestroyShaderContext(data->shaders);
       
  1016         }
  1014         if (data->context) {
  1017         if (data->context) {
  1015             /* SDL_GL_MakeCurrent(0, NULL); *//* doesn't do anything */
  1018             /* SDL_GL_MakeCurrent(0, NULL); *//* doesn't do anything */
  1016             SDL_GL_DeleteContext(data->context);
  1019             SDL_GL_DeleteContext(data->context);
  1017         }
  1020         }
  1018         SDL_free(data);
  1021         SDL_free(data);