[cogl-material] Restore the GL_TEXTURE_ENV_MODE after material_rectangle

The rest of Cogl expects the texture mode to be GL_MODULATE so it
needs to be restored after calling cogl_material_rectangle. Otherwise
cogl_texture_rectangle will fail to blend with the Cogl color properly
and all of the labels will be black.
This commit is contained in:
Neil Roberts 2009-01-06 18:24:57 +00:00
parent 606d34f2aa
commit 12ea2933bd

View File

@ -2595,6 +2595,10 @@ cogl_material_rectangle (CoglFixed x1,
GE (glDisable (GL_TEXTURE_2D));
}
/* The rest of Cogl expects the texture mode to be GL_MODULATE so we
need to restore that */
GE( glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) );
/* XXX: a bit over precautious. For one we don't support lighting yet
* so there's no real need to reset the material properties. */
#if 0