From 6e14b72284e10ca14bc61c577a3fa57bb63d1a4f Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 12 Jan 2011 16:56:52 +0000 Subject: [PATCH] cogl-atlas-texture: Don't disable atlas if can't read texture data Previously atlasing would be disabled if the GL driver does not support reading back texture data. This meant that atlasing would not happen on GLES. However we also require that the driver support FBOs and the texture data is only read back as a fallback if the FBO fails. Therefore the atlas should be ok on GLES 2 which has FBO support in core. --- cogl/cogl-atlas-texture.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cogl/cogl-atlas-texture.c b/cogl/cogl-atlas-texture.c index e9b4e6b12..51b2ad42e 100644 --- a/cogl/cogl-atlas-texture.c +++ b/cogl/cogl-atlas-texture.c @@ -552,11 +552,9 @@ _cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp, if (bmp_width < 1 || bmp_height < 1) return COGL_INVALID_HANDLE; - /* If we can't use FBOs or we can't read back texture data then it - will be too slow to migrate textures and we shouldn't use the - atlas */ - if (!cogl_features_available (COGL_FEATURE_TEXTURE_READ_PIXELS) || - !cogl_features_available (COGL_FEATURE_OFFSCREEN)) + /* If we can't use FBOs then it will be too slow to migrate textures + and we shouldn't use the atlas */ + if (!cogl_features_available (COGL_FEATURE_OFFSCREEN)) return COGL_INVALID_HANDLE; COGL_NOTE (ATLAS, "Adding texture of size %ix%i", bmp_width, bmp_height);