99 cxDefineDestructor(ctx->cleanup_funcs, asc_gl_context_cleanup); |
99 cxDefineDestructor(ctx->cleanup_funcs, asc_gl_context_cleanup); |
100 |
100 |
101 // Create the shaders array |
101 // Create the shaders array |
102 ctx->shaders = cxArrayListCreateSimple(CX_STORE_POINTERS, 32); |
102 ctx->shaders = cxArrayListCreateSimple(CX_STORE_POINTERS, 32); |
103 cxDefineDestructor(ctx->shaders, asc_shader_free); |
103 cxDefineDestructor(ctx->shaders, asc_shader_free); |
|
104 ctx->active_program = 0; |
104 |
105 |
105 return true; |
106 return true; |
106 } else { |
107 } else { |
107 asc_error("glewInit failed: %s", glewGetErrorString(err)); |
108 asc_error("glewInit failed: %s", glewGetErrorString(err)); |
108 SDL_GL_DeleteContext(ctx->glctx); |
109 SDL_GL_DeleteContext(ctx->glctx); |