summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_context.c
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-01-08 16:10:34 -0700
committerBrian <brian@yutani.localnet.net>2007-01-08 16:10:34 -0700
commit9a78ef980d89c0d18f859036d5a0cdf82acd303c (patch)
tree2d8efc4c45fd529cdaa3470a97adf0f3c49a6d0e /src/mesa/swrast/s_context.c
parent85e0634b54c8cbe65c66f2a4b118ca77cfc1b8ac (diff)
Remove if (tObj) conditional so that texture units without a texture image
return black (0,0,0,1) when sampled.
Diffstat (limited to 'src/mesa/swrast/s_context.c')
-rw-r--r--src/mesa/swrast/s_context.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index 749e278ffa..6e3475b130 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);
}
}