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 <ebassi@linux.intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=607398
This commit is contained in:
Emmanuele Bassi 2010-01-19 01:24:46 +00:00
parent 9543d8be10
commit 2fbe4c2388
2 changed files with 10 additions and 10 deletions

View File

@ -191,7 +191,7 @@ mutter_shaped_texture_dirty_mask (MutterShapedTexture *stex)
cogl_texture_get_gl_texture (priv->mask_texture, cogl_texture_get_gl_texture (priv->mask_texture,
&mask_gl_tex, &mask_gl_target); &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); glDeleteTextures (1, &mask_gl_tex);
cogl_texture_unref (priv->mask_texture); 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); 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; GLuint tex;
glGenTextures (1, &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_ROW_LENGTH, tex_width);
glPixelStorei (GL_UNPACK_ALIGNMENT, 1); glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
glPixelStorei (GL_UNPACK_SKIP_ROWS, 0); glPixelStorei (GL_UNPACK_SKIP_ROWS, 0);
glPixelStorei (GL_UNPACK_SKIP_PIXELS, 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, GL_ALPHA, tex_width, tex_height,
0, GL_ALPHA, GL_UNSIGNED_BYTE, mask_data); 0, GL_ALPHA, GL_UNSIGNED_BYTE, mask_data);
priv->mask_texture priv->mask_texture
= cogl_texture_new_from_foreign (tex, = cogl_texture_new_from_foreign (tex,
CGL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_RECTANGLE_ARB,
tex_width, tex_height, tex_width, tex_height,
0, 0, 0, 0,
COGL_PIXEL_FORMAT_A_8); COGL_PIXEL_FORMAT_A_8);

View File

@ -117,7 +117,7 @@ texture_is_rectangle (CoglHandle texture)
GLenum gl_target; GLenum gl_target;
cogl_texture_get_gl_texture (texture, &gl_tex, &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 static void
@ -128,7 +128,7 @@ free_texture (CoglHandle texture)
cogl_texture_get_gl_texture (texture, &gl_tex, &gl_target); 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); glDeleteTextures (1, &gl_tex);
cogl_texture_unref (texture); cogl_texture_unref (texture);
@ -401,8 +401,8 @@ texture_tower_create_texture (MutterTextureTower *tower,
GLuint tex = 0; GLuint tex = 0;
glGenTextures (1, &tex); glGenTextures (1, &tex);
glBindTexture (CGL_TEXTURE_RECTANGLE_ARB, tex); glBindTexture (GL_TEXTURE_RECTANGLE_ARB, tex);
glTexImage2D (CGL_TEXTURE_RECTANGLE_ARB, 0, glTexImage2D (GL_TEXTURE_RECTANGLE_ARB, 0,
GL_RGBA, width,height, GL_RGBA, width,height,
#if TEXTURE_FORMAT == COGL_PIXEL_FORMAT_BGRA_8888_PRE #if TEXTURE_FORMAT == COGL_PIXEL_FORMAT_BGRA_8888_PRE
0, GL_BGRA, GL_UNSIGNED_BYTE, 0, GL_BGRA, GL_UNSIGNED_BYTE,
@ -411,7 +411,7 @@ texture_tower_create_texture (MutterTextureTower *tower,
#endif #endif
NULL); 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, width, height,
0, 0, 0, 0,
TEXTURE_FORMAT); TEXTURE_FORMAT);