|
@@ -386,7 +386,7 @@ SDL_GLContext Cocoa_GL_CreateContext(SDL_VideoDevice *_this, SDL_Window *window)
|
|
|
[context setValues:&opaque forParameter:NSOpenGLCPSurfaceOpacity];
|
|
|
|
|
|
if (Cocoa_GL_MakeCurrent(_this, window, sdlcontext) < 0) {
|
|
|
- SDL_GL_DeleteContext(sdlcontext);
|
|
|
+ SDL_GL_DestroyContext(sdlcontext);
|
|
|
SDL_SetError("Failed making OpenGL context current");
|
|
|
return NULL;
|
|
|
}
|
|
@@ -400,27 +400,27 @@ SDL_GLContext Cocoa_GL_CreateContext(SDL_VideoDevice *_this, SDL_Window *window)
|
|
|
|
|
|
glGetStringFunc = (const GLubyte *(APIENTRY *)(GLenum))SDL_GL_GetProcAddress("glGetString");
|
|
|
if (!glGetStringFunc) {
|
|
|
- SDL_GL_DeleteContext(sdlcontext);
|
|
|
+ SDL_GL_DestroyContext(sdlcontext);
|
|
|
SDL_SetError("Failed getting OpenGL glGetString entry point");
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
glversion = (const char *)glGetStringFunc(GL_VERSION);
|
|
|
if (glversion == NULL) {
|
|
|
- SDL_GL_DeleteContext(sdlcontext);
|
|
|
+ SDL_GL_DestroyContext(sdlcontext);
|
|
|
SDL_SetError("Failed getting OpenGL context version");
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
if (SDL_sscanf(glversion, "%d.%d", &glversion_major, &glversion_minor) != 2) {
|
|
|
- SDL_GL_DeleteContext(sdlcontext);
|
|
|
+ SDL_GL_DestroyContext(sdlcontext);
|
|
|
SDL_SetError("Failed parsing OpenGL context version");
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
if ((glversion_major < _this->gl_config.major_version) ||
|
|
|
((glversion_major == _this->gl_config.major_version) && (glversion_minor < _this->gl_config.minor_version))) {
|
|
|
- SDL_GL_DeleteContext(sdlcontext);
|
|
|
+ SDL_GL_DestroyContext(sdlcontext);
|
|
|
SDL_SetError("Failed creating OpenGL context at version requested");
|
|
|
return NULL;
|
|
|
}
|