From c1a9d4d7a35e59428bc51e2b4c45e19a3a9758ec Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Thu, 8 Apr 2010 20:58:18 +0000 Subject: Bugfix: 21586 - UI problems with Tiled Textures (animatable for GE) The problem was present in Blender 2.49, but it didn't produce any side effect. glScale was changing the texture matrix and the matrix was never been reset. That messes up with UI drawing. --- source/blender/gpu/intern/gpu_draw.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/gpu') diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index f00126a7fab..d3a4621c793 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -1097,6 +1097,14 @@ void GPU_end_object_materials(void) GMS.matbuf= NULL; GMS.gmatbuf= NULL; GMS.blendmode= NULL; + + /* resetting the texture matrix after the glScale needed for tiled textures */ + if(GTS.tilemode) + { + glMatrixMode(GL_TEXTURE); + glLoadIdentity(); + glMatrixMode(GL_MODELVIEW); + } } /* Lights */ -- cgit v1.2.3