diff --git a/cogl/cogl/driver/gl/gl/cogl-driver-gl.c b/cogl/cogl/driver/gl/gl/cogl-driver-gl.c index fb36df2b879edc4bd86db8aaeb55aa24c5a91d75..1632ada60e674e2839ea47cb2ad4569066c4d93d 100644 --- a/cogl/cogl/driver/gl/gl/cogl-driver-gl.c +++ b/cogl/cogl/driver/gl/gl/cogl-driver-gl.c @@ -111,20 +111,8 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context, switch (format) { case COGL_PIXEL_FORMAT_A_8: - /* If the driver doesn't natively support alpha textures then we - * will use a red component texture with a swizzle to implement - * the texture */ - if (_cogl_has_private_feature - (context, COGL_PRIVATE_FEATURE_ALPHA_TEXTURES) == 0) - { - glintformat = GL_RED; - glformat = GL_RED; - } - else - { - glintformat = GL_ALPHA; - glformat = GL_ALPHA; - } + glintformat = GL_RED; + glformat = GL_RED; gltype = GL_UNSIGNED_BYTE; break; case COGL_PIXEL_FORMAT_G_8: diff --git a/cogl/cogl/driver/gl/gl/cogl-texture-driver-gl.c b/cogl/cogl/driver/gl/gl/cogl-texture-driver-gl.c index c2270124f6988dfef5b2fae0435c469d9c2f2c50..026991d979d2883effe046e7e28921d09d625137 100644 --- a/cogl/cogl/driver/gl/gl/cogl-texture-driver-gl.c +++ b/cogl/cogl/driver/gl/gl/cogl-texture-driver-gl.c @@ -98,11 +98,8 @@ _cogl_texture_driver_gen (CoglContext *ctx, g_assert_not_reached(); } - /* If the driver doesn't support alpha textures directly then we'll - * fake them by setting the swizzle parameters */ - if (internal_format == COGL_PIXEL_FORMAT_A_8 && - !_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_ALPHA_TEXTURES) && - _cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_TEXTURE_SWIZZLE)) + /* GL_ALPHA is deprecated; instead, use GL_RED with a swizzle mask */ + if (internal_format == COGL_PIXEL_FORMAT_A_8) { static const GLint red_swizzle[] = { GL_ZERO, GL_ZERO, GL_ZERO, GL_RED }; diff --git a/cogl/cogl/driver/gl/gles/cogl-driver-gles.c b/cogl/cogl/driver/gl/gles/cogl-driver-gles.c index d2769a805f2826bbb96dd0fb3f743edc54db94c1..3ae26bd2339158db0c8fa4e447c53f82d27a5a46 100644 --- a/cogl/cogl/driver/gl/gles/cogl-driver-gles.c +++ b/cogl/cogl/driver/gl/gles/cogl-driver-gles.c @@ -83,8 +83,8 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context, switch (format) { case COGL_PIXEL_FORMAT_A_8: - glintformat = GL_ALPHA; - glformat = GL_ALPHA; + glintformat = GL_RED; + glformat = GL_RED; gltype = GL_UNSIGNED_BYTE; break; case COGL_PIXEL_FORMAT_G_8: