Commit 8180927d authored by Adam Jackson's avatar Adam Jackson 🎳 Committed by Georges Basile Stavracas Neto
Browse files

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.

!489
parent 191c31b0
Pipeline #75970 passed with stages
in 5 minutes and 23 seconds
......@@ -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)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment