From 9a78ef980d89c0d18f859036d5a0cdf82acd303c Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 8 Jan 2007 16:10:34 -0700 Subject: [PATCH] Remove if (tObj) conditional so that texture units without a texture image return black (0,0,0,1) when sampled. --- src/mesa/swrast/s_context.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 749e278ffad..6e3475b130b 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.1 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -499,9 +499,10 @@ _swrast_update_texture_samplers(GLcontext *ctx) for (u = 0; u < ctx->Const.MaxTextureImageUnits; u++) { const struct gl_texture_object *tObj = ctx->Texture.Unit[u]._Current; - if (tObj) - swrast->TextureSample[u] = - _swrast_choose_texture_sample_func(ctx, tObj); + /* Note: If tObj is NULL, the sample function will be a simple + * function that just returns opaque black (0,0,0,1). + */ + swrast->TextureSample[u] = _swrast_choose_texture_sample_func(ctx, tObj); } } -- 2.30.2