src/glcontext.c

changeset 290
2eb3813562e7
parent 257
67d7b79997df
equal deleted inserted replaced
289:237cb9038109 290:2eb3813562e7
106 glClearColor(0.0f, 0.0f, 0.0f, 1.0f); 106 glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
107 glEnable(GL_DEBUG_OUTPUT); 107 glEnable(GL_DEBUG_OUTPUT);
108 glDebugMessageCallback(asc_gl_debug_callback, NULL); 108 glDebugMessageCallback(asc_gl_debug_callback, NULL);
109 109
110 // Create the cleanup functions array 110 // Create the cleanup functions array
111 ctx->cleanup_funcs = cxArrayListCreateSimple(sizeof(struct asc_gl_context_cleanup_data), 8); 111 ctx->cleanup_funcs = cxArrayListCreate(NULL, sizeof(struct asc_gl_context_cleanup_data), 8);
112 cxDefineDestructor(ctx->cleanup_funcs, asc_gl_context_cleanup); 112 cxSetDestructor(ctx->cleanup_funcs, asc_gl_context_cleanup);
113 113
114 // Create the shaders array 114 // Create the shaders array
115 ctx->shaders = cxArrayListCreateSimple(CX_STORE_POINTERS, 32); 115 ctx->shaders = cxArrayListCreate(NULL, CX_STORE_POINTERS, 32);
116 cxDefineDestructor(ctx->shaders, asc_shader_free); 116 cxSetDestructor(ctx->shaders, asc_shader_free);
117 ctx->active_program = 0; 117 ctx->active_program = 0;
118 118
119 return true; 119 return true;
120 } else { 120 } else {
121 asc_error("glewInit failed: %s", glewGetErrorString(err)); 121 asc_error("glewInit failed: %s", glewGetErrorString(err));

mercurial