cogl: Bump minimum GLES version to 2.0
This is already effectively true because there is only a GLSL backend. It also implies OES_texture_npot. https://gitlab.gnome.org/GNOME/mutter/merge_requests/489
This commit is contained in:
parent
191c31b0f0
commit
8180927de2
@ -33,6 +33,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "cogl-context-private.h"
|
||||
#include "cogl-error-private.h"
|
||||
#include "cogl-feature-private.h"
|
||||
#include "cogl-renderer-private.h"
|
||||
#include "cogl-private.h"
|
||||
@ -287,6 +288,15 @@ _cogl_driver_update_features (CoglContext *context,
|
||||
gl_minor = 1;
|
||||
}
|
||||
|
||||
if (!COGL_CHECK_GL_VERSION (gl_major, gl_minor, 2, 0))
|
||||
{
|
||||
_cogl_set_error (error,
|
||||
COGL_DRIVER_ERROR,
|
||||
COGL_DRIVER_ERROR_INVALID_VERSION,
|
||||
"OpenGL ES 2.0 or better is required");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
_cogl_feature_check_ext_functions (context,
|
||||
gl_major,
|
||||
gl_minor,
|
||||
@ -314,7 +324,6 @@ _cogl_driver_update_features (CoglContext *context,
|
||||
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_ANY_GL, TRUE);
|
||||
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_ALPHA_TEXTURES, TRUE);
|
||||
|
||||
/* Both GLES 1.1 and GLES 2.0 support point sprites in core */
|
||||
flags |= COGL_FEATURE_POINT_SPRITE;
|
||||
COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_POINT_SPRITE, TRUE);
|
||||
|
||||
@ -341,30 +350,17 @@ _cogl_driver_update_features (CoglContext *context,
|
||||
COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_DEPTH_TEXTURE, TRUE);
|
||||
}
|
||||
|
||||
if (_cogl_check_extension ("GL_OES_texture_npot", gl_extensions))
|
||||
{
|
||||
flags |= (COGL_FEATURE_TEXTURE_NPOT |
|
||||
COGL_FEATURE_TEXTURE_NPOT_BASIC |
|
||||
COGL_FEATURE_TEXTURE_NPOT_MIPMAP |
|
||||
COGL_FEATURE_TEXTURE_NPOT_REPEAT);
|
||||
COGL_FLAGS_SET (context->features,
|
||||
COGL_FEATURE_ID_TEXTURE_NPOT, TRUE);
|
||||
COGL_FLAGS_SET (context->features,
|
||||
COGL_FEATURE_ID_TEXTURE_NPOT_BASIC, TRUE);
|
||||
COGL_FLAGS_SET (context->features,
|
||||
COGL_FEATURE_ID_TEXTURE_NPOT_MIPMAP, TRUE);
|
||||
COGL_FLAGS_SET (context->features,
|
||||
COGL_FEATURE_ID_TEXTURE_NPOT_REPEAT, TRUE);
|
||||
}
|
||||
else if (_cogl_check_extension ("GL_IMG_texture_npot", gl_extensions))
|
||||
{
|
||||
flags |= (COGL_FEATURE_TEXTURE_NPOT_BASIC |
|
||||
COGL_FEATURE_TEXTURE_NPOT_MIPMAP);
|
||||
COGL_FLAGS_SET (context->features,
|
||||
COGL_FEATURE_ID_TEXTURE_NPOT_BASIC, TRUE);
|
||||
COGL_FLAGS_SET (context->features,
|
||||
COGL_FEATURE_ID_TEXTURE_NPOT_MIPMAP, TRUE);
|
||||
}
|
||||
flags |= (COGL_FEATURE_TEXTURE_NPOT |
|
||||
COGL_FEATURE_TEXTURE_NPOT_BASIC |
|
||||
COGL_FEATURE_TEXTURE_NPOT_MIPMAP |
|
||||
COGL_FEATURE_TEXTURE_NPOT_REPEAT);
|
||||
COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_TEXTURE_NPOT, TRUE);
|
||||
COGL_FLAGS_SET (context->features,
|
||||
COGL_FEATURE_ID_TEXTURE_NPOT_BASIC, TRUE);
|
||||
COGL_FLAGS_SET (context->features,
|
||||
COGL_FEATURE_ID_TEXTURE_NPOT_MIPMAP, TRUE);
|
||||
COGL_FLAGS_SET (context->features,
|
||||
COGL_FEATURE_ID_TEXTURE_NPOT_REPEAT, TRUE);
|
||||
|
||||
if (context->glTexImage3D)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user