120 |
120 |
121 cxListFree(ctx->shaders); |
121 cxListFree(ctx->shaders); |
122 cxListFree(ctx->cleanup_funcs); |
122 cxListFree(ctx->cleanup_funcs); |
123 |
123 |
124 // destroy the GL context and the window |
124 // destroy the GL context and the window |
125 SDL_GL_DeleteContext(ctx->glctx); |
125 SDL_GL_DestroyContext(ctx->glctx); |
126 ctx->glctx = NULL; |
126 ctx->glctx = NULL; |
127 } |
127 } |
128 |
128 |
129 void asc_gl_context_add_cleanup_func(AscGLContext *ctx, void(*func)(void)) { |
129 void asc_gl_context_add_cleanup_func(AscGLContext *ctx, void(*func)(void)) { |
130 struct asc_gl_context_cleanup_data *data = cxListEmplace(ctx->cleanup_funcs); |
130 struct asc_gl_context_cleanup_data *data = cxListEmplace(ctx->cleanup_funcs); |