mirror of https://github.com/encounter/SDL.git
iOS SDL_GL_CreateContext: Clamp the multisample sample count when the requested value is too high, rather than failing to create the context.
This matches the SDL_GL_CreateContext behavior in OS X.
This commit is contained in:
parent
a506f1cbc7
commit
ecfdb10cfa
|
@ -88,12 +88,8 @@
|
||||||
GLint maxsamples = 0;
|
GLint maxsamples = 0;
|
||||||
glGetIntegerv(GL_MAX_SAMPLES, &maxsamples);
|
glGetIntegerv(GL_MAX_SAMPLES, &maxsamples);
|
||||||
|
|
||||||
/* Verify that the sample count is supported before creating any
|
/* Clamp the samples to the max supported count. */
|
||||||
* multisample Renderbuffers, to avoid generating GL errors. */
|
samples = MIN(samples, maxsamples);
|
||||||
if (samples > maxsamples) {
|
|
||||||
SDL_SetError("Failed creating OpenGL ES framebuffer: Unsupported MSAA sample count");
|
|
||||||
return nil;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sRGB) {
|
if (sRGB) {
|
||||||
|
|
Loading…
Reference in New Issue