gallium: init default texture image to gray
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 14 Aug 2008 21:44:09 +0000 (15:44 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 14 Aug 2008 21:44:28 +0000 (15:44 -0600)
src/mesa/state_tracker/st_cb_texture.c

index f291531f81cb0a0e25295cf1ce907d5428784aae..cf194a937fc8a46476e67e878baea274cb00db81 100644 (file)
@@ -1475,6 +1475,9 @@ st_get_default_texture(struct st_context *st)
       struct gl_texture_object *texObj;
       struct gl_texture_image *texImg;
 
+      /* init image to gray */
+      memset(pixels, 127, sizeof(pixels));
+
       texObj = st->ctx->Driver.NewTextureObject(st->ctx, 0, target);
 
       texImg = _mesa_get_tex_image(st->ctx, texObj, target, 0);