gnome-games r8219 - trunk/aisleriot



Author: nroberts
Date: Wed Oct 29 21:00:55 2008
New Revision: 8219
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8219&view=rev

Log:
Set the Cogl color to white before rendering a card

cogl_texture_rectangle blends the texture with the current cogl color
so we need to explicitly set it to white in case another actor has
changed it.


Modified:
   trunk/aisleriot/baize.c
   trunk/aisleriot/card.c
   trunk/aisleriot/slot-renderer.c

Modified: trunk/aisleriot/baize.c
==============================================================================
--- trunk/aisleriot/baize.c	(original)
+++ trunk/aisleriot/baize.c	Wed Oct 29 21:00:55 2008
@@ -58,6 +58,7 @@
   CoglHandle tex;
   ClutterGeometry stage_geom;
   guint tex_width, tex_height;
+  static const ClutterColor white = { 0xff, 0xff, 0xff, 0xff };
 
   if ((stage = clutter_actor_get_stage (actor)) == NULL)
     return;
@@ -75,6 +76,7 @@
   clutter_actor_get_allocation_geometry (stage, &stage_geom);
 
   /* Repeat the texture to fill the size of the stage */
+  cogl_color (&white);
   cogl_texture_rectangle (tex, 0, 0,
                           CLUTTER_INT_TO_FIXED (stage_geom.width),
                           CLUTTER_INT_TO_FIXED (stage_geom.height),

Modified: trunk/aisleriot/card.c
==============================================================================
--- trunk/aisleriot/card.c	(original)
+++ trunk/aisleriot/card.c	Wed Oct 29 21:00:55 2008
@@ -150,6 +150,7 @@
   CoglHandle tex;
   ClutterFixed tex_width, tex_height;
   gboolean x_swapped = FALSE;
+  static const ClutterColor white = { 0xff, 0xff, 0xff, 0xff };
 
   g_return_if_fail (priv->cache != NULL);
 
@@ -188,6 +189,7 @@
     cogl_translate (-CLUTTER_FIXED_TO_INT (tex_width) / 2, 0, 0);
   }
 
+  cogl_color (&white);
   cogl_texture_rectangle (tex, 0, 0,
                           tex_width, tex_height,
                           0, 0, CFX_ONE, CFX_ONE);

Modified: trunk/aisleriot/slot-renderer.c
==============================================================================
--- trunk/aisleriot/slot-renderer.c	(original)
+++ trunk/aisleriot/slot-renderer.c	Wed Oct 29 21:00:55 2008
@@ -304,6 +304,7 @@
   CoglHandle cogl_tex;
   guint tex_width, tex_height;
   int cardx, cardy;
+  static const ClutterColor white = { 0xff, 0xff, 0xff, 0xff };
 
   is_highlighted = priv->show_highlight && (card_num >= priv->highlight_start);
 
@@ -318,6 +319,7 @@
                                   FALSE,
                                   &cardx, &cardy);
 
+  cogl_color (&white);
   cogl_texture_rectangle (cogl_tex,
                           CLUTTER_INT_TO_FIXED (cardx),
                           CLUTTER_INT_TO_FIXED (cardy),
@@ -347,12 +349,14 @@
   if (priv->slot->cards->len <= priv->animations->len) {
     CoglHandle cogl_tex;
     guint tex_width, tex_height;
+    static const ClutterColor white = { 0xff, 0xff, 0xff, 0xff };
 
     cogl_tex = aisleriot_card_cache_get_slot_texture (priv->cache,
                                                       priv->show_highlight);
     tex_width = cogl_texture_get_width (cogl_tex);
     tex_height = cogl_texture_get_height (cogl_tex);
 
+    cogl_color (&white);
     cogl_texture_rectangle (cogl_tex,
                             0, 0,
                             CLUTTER_INT_TO_FIXED (tex_width),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]