This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/gpu
Antonis Ryakiotakis 68c365e2f0 Index: source/blender/gpu/intern/gpu_draw.c
===================================================================
--- source/blender/gpu/intern/gpu_draw.c	(revision 47568)
+++ source/blender/gpu/intern/gpu_draw.c	(working copy)
@@ -230,11 +230,12 @@
 	Image *ima, *curima;
 
 	int domipmap, linearmipmap;
+	int texpaint; /* store this so that new images created while texture painting won't be set to mipmapped */
 
 	int alphablend;
 	float anisotropic;
 	MTFace *lasttface;
-} GTS = {0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 1, 0, -1, 1.f, NULL};
+} GTS = {0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 1, 0, 0, -1, 1.f, NULL};
 
 /* Mipmap settings */
 
@@ -256,7 +257,7 @@
 
 static int gpu_get_mipmap(void)
 {
-	return GTS.domipmap;
+	return GTS.domipmap && !GTS.texpaint;
 }
 
 static GLenum gpu_get_mipmap_filter(int mag)
@@ -730,6 +731,8 @@
 	if (!GTS.domipmap)
 		return;
 
+	GTS.texpaint = !mipmap;
+
 	if (mipmap) {
 		for (ima=G.main->image.first; ima; ima=ima->id.next) {
 			if (ima->bindcode) {
2012-06-08 13:06:06 +00:00
..
2012-06-06 22:38:39 +00:00
2012-05-01 06:50:43 +00:00