Remove if (tObj) conditional so that texture units without a texture image
return black (0,0,0,1) when sampled.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user