diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-10-12 02:16:39 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-10-12 02:16:39 +0400 |
commit | c646a80b53a75ba044d74f22d391791190660560 (patch) | |
tree | 17d144bd83a7e47bfbb7d054562e473ec0f941f1 /source/blender/gpu | |
parent | ffa67424a914caf4d2c1194044c83c904c7ea52b (diff) |
Actual fix for bug #17819, that doesn't disable the functionality, crash with tiled image textures in the game engine.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index 8fcf0457812..2cd548afe52 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -359,6 +359,8 @@ int GPU_verify_image(Image *ima, int tftile, int tfmode, int compare) else GTS.tile= tftile; + GTS.tile = MAX2(0, GTS.tile); + if(ima) { GTS.tileXRep = ima->xrep; GTS.tileYRep = ima->yrep; @@ -448,9 +450,6 @@ int GPU_verify_image(Image *ima, int tftile, int tfmode, int compare) /* for tiles, copy only part of image into buffer */ if (GTS.tilemode) { - return 0; //disabled for now, it causes crashes - //see http://projects.blender.org/tracker/index.php?func=detail&aid=17819&group_id=9&atid=125 - tilerect= MEM_mallocN(rectw*recth*sizeof(*tilerect), "tilerect"); for (y=0; y<recth; y++) { |