From 2fbe4c2388631b1b167bca668adcb07ab870dd1e Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 19 Jan 2010 01:24:46 +0000 Subject: [PATCH] Do not use CGL_* symbols The CGL_* defines in COGL were always meant to be private and should have never been exposed in the first place. The API in COGL has been updated to never require them starting from 1.1, but using the original GL symbols has always been the intent of the API. This commit removes the CGL_TEXTURE_RECTANGLE_ARB usage in favour of the ARB-sanctioned GL_TEXTURE_RECTANGLE_ARB enumeration value. Signed-off-by: Emmanuele Bassi https://bugzilla.gnome.org/show_bug.cgi?id=607398 --- src/compositor/mutter-shaped-texture.c | 10 +++++----- src/compositor/mutter-texture-tower.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/compositor/mutter-shaped-texture.c b/src/compositor/mutter-shaped-texture.c index 69ef501b9..8a04804c0 100755 --- a/src/compositor/mutter-shaped-texture.c +++ b/src/compositor/mutter-shaped-texture.c @@ -191,7 +191,7 @@ mutter_shaped_texture_dirty_mask (MutterShapedTexture *stex) cogl_texture_get_gl_texture (priv->mask_texture, &mask_gl_tex, &mask_gl_target); - if (mask_gl_target == CGL_TEXTURE_RECTANGLE_ARB) + if (mask_gl_target == GL_TEXTURE_RECTANGLE_ARB) glDeleteTextures (1, &mask_gl_tex); cogl_texture_unref (priv->mask_texture); @@ -254,23 +254,23 @@ mutter_shaped_texture_ensure_mask (MutterShapedTexture *stex) cogl_texture_get_gl_texture (paint_tex, NULL, &paint_gl_target); - if (paint_gl_target == CGL_TEXTURE_RECTANGLE_ARB) + if (paint_gl_target == GL_TEXTURE_RECTANGLE_ARB) { GLuint tex; glGenTextures (1, &tex); - glBindTexture (CGL_TEXTURE_RECTANGLE_ARB, tex); + glBindTexture (GL_TEXTURE_RECTANGLE_ARB, tex); glPixelStorei (GL_UNPACK_ROW_LENGTH, tex_width); glPixelStorei (GL_UNPACK_ALIGNMENT, 1); glPixelStorei (GL_UNPACK_SKIP_ROWS, 0); glPixelStorei (GL_UNPACK_SKIP_PIXELS, 0); - glTexImage2D (CGL_TEXTURE_RECTANGLE_ARB, 0, + glTexImage2D (GL_TEXTURE_RECTANGLE_ARB, 0, GL_ALPHA, tex_width, tex_height, 0, GL_ALPHA, GL_UNSIGNED_BYTE, mask_data); priv->mask_texture = cogl_texture_new_from_foreign (tex, - CGL_TEXTURE_RECTANGLE_ARB, + GL_TEXTURE_RECTANGLE_ARB, tex_width, tex_height, 0, 0, COGL_PIXEL_FORMAT_A_8); diff --git a/src/compositor/mutter-texture-tower.c b/src/compositor/mutter-texture-tower.c index ed4e22fcd..ce5be5980 100644 --- a/src/compositor/mutter-texture-tower.c +++ b/src/compositor/mutter-texture-tower.c @@ -117,7 +117,7 @@ texture_is_rectangle (CoglHandle texture) GLenum gl_target; cogl_texture_get_gl_texture (texture, &gl_tex, &gl_target); - return gl_target == CGL_TEXTURE_RECTANGLE_ARB; + return gl_target == GL_TEXTURE_RECTANGLE_ARB; } static void @@ -128,7 +128,7 @@ free_texture (CoglHandle texture) cogl_texture_get_gl_texture (texture, &gl_tex, &gl_target); - if (gl_target == CGL_TEXTURE_RECTANGLE_ARB) + if (gl_target == GL_TEXTURE_RECTANGLE_ARB) glDeleteTextures (1, &gl_tex); cogl_texture_unref (texture); @@ -401,8 +401,8 @@ texture_tower_create_texture (MutterTextureTower *tower, GLuint tex = 0; glGenTextures (1, &tex); - glBindTexture (CGL_TEXTURE_RECTANGLE_ARB, tex); - glTexImage2D (CGL_TEXTURE_RECTANGLE_ARB, 0, + glBindTexture (GL_TEXTURE_RECTANGLE_ARB, tex); + glTexImage2D (GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, width,height, #if TEXTURE_FORMAT == COGL_PIXEL_FORMAT_BGRA_8888_PRE 0, GL_BGRA, GL_UNSIGNED_BYTE, @@ -411,7 +411,7 @@ texture_tower_create_texture (MutterTextureTower *tower, #endif NULL); - tower->textures[level] = cogl_texture_new_from_foreign (tex, CGL_TEXTURE_RECTANGLE_ARB, + tower->textures[level] = cogl_texture_new_from_foreign (tex, GL_TEXTURE_RECTANGLE_ARB, width, height, 0, 0, TEXTURE_FORMAT);