Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2012-07-29 09:59:03 +0400
committerMitchell Stokes <mogurijin@gmail.com>2012-07-29 09:59:03 +0400
commit7755873771266da847b6dd1aea5496696696eea8 (patch)
treeb47bcb40df8f6f2680bfdeeb07054b1a8c435135 /source/blender/gpu
parent0cfd402a7f7783dd29aab802b6d34412c1c11492 (diff)
Fix for [#27484] "Run-time command line options don't work in Multi-texture mode." reported by Josiah Lane (solarlune). The -g nomipmap = 1 option only changed the mipmapping option for bf_gpu, which BL_Texture wasn't checking.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/GPU_draw.h1
-rw-r--r--source/blender/gpu/intern/gpu_draw.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/gpu/GPU_draw.h b/source/blender/gpu/GPU_draw.h
index 59140b2be80..7a71f33d3d0 100644
--- a/source/blender/gpu/GPU_draw.h
+++ b/source/blender/gpu/GPU_draw.h
@@ -104,6 +104,7 @@ void GPU_render_text(struct MTFace *tface, int mode,
* - these will free textures on changes */
void GPU_set_mipmap(int mipmap);
+int GPU_get_mipmap(void);
void GPU_set_linear_mipmap(int linear);
void GPU_paint_set_mipmap(int mipmap);
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index f4e1e0c1147..456e14c8401 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -268,7 +268,7 @@ void GPU_set_linear_mipmap(int linear)
}
}
-static int gpu_get_mipmap(void)
+int GPU_get_mipmap(void)
{
return GTS.domipmap && !GTS.texpaint;
}
@@ -662,7 +662,7 @@ void GPU_create_gl_tex(unsigned int *bind, unsigned int *pix, float * frect, int
glGenTextures(1, (GLuint *)bind);
glBindTexture(GL_TEXTURE_2D, *bind);
- if (!(gpu_get_mipmap() && mipmap)) {
+ if (!(GPU_get_mipmap() && mipmap)) {
if (use_high_bit_depth)
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16, rectw, recth, 0, GL_RGBA, GL_FLOAT, frect);
else
@@ -883,7 +883,7 @@ void GPU_paint_update_image(Image *ima, int x, int y, int w, int h, int mipmap)
ibuf = BKE_image_get_ibuf(ima, NULL);
- if (ima->repbind || (gpu_get_mipmap() && mipmap) || !ima->bindcode || !ibuf ||
+ if (ima->repbind || (GPU_get_mipmap() && mipmap) || !ima->bindcode || !ibuf ||
(!is_power_of_2_i(ibuf->x) || !is_power_of_2_i(ibuf->y)) ||
(w == 0) || (h == 0))
{