diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-14 13:58:30 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-14 16:50:22 +0300 |
commit | 0626de2033c45c1973f5233ab137098db4b38be3 (patch) | |
tree | 6291ad7ff849f0a6f193275d61a24c830434e24f /source/blender/gpu | |
parent | 14db989e733c71569cbc4240aef3b5909c3e0e18 (diff) |
GPU: consistenly use mipmap on/off in all draw modes.
This is important for good texture paint performance.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/GPU_texture.h | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h index e58d5d92831..e53693e7b40 100644 --- a/source/blender/gpu/GPU_texture.h +++ b/source/blender/gpu/GPU_texture.h @@ -163,7 +163,7 @@ GPUTexture *GPU_texture_create_buffer( GPUTexture *GPU_texture_from_bindcode(int textarget, int bindcode); GPUTexture *GPU_texture_from_blender( - struct Image *ima, struct ImageUser *iuser, int textarget, bool is_data, double time, int mipmap); + struct Image *ima, struct ImageUser *iuser, int textarget, bool is_data, double time); GPUTexture *GPU_texture_from_preview(struct PreviewImage *prv, int mipmap); void GPU_texture_update(GPUTexture *tex, const float *pixels); diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index fdffe21b1e7..83fd689e3b7 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -288,8 +288,7 @@ GPUTexture *GPU_texture_from_blender(Image *ima, ImageUser *iuser, int textarget, bool is_data, - double UNUSED(time), - int mipmap) + double UNUSED(time)) { if (ima == NULL) { return NULL; @@ -361,6 +360,8 @@ GPUTexture *GPU_texture_from_blender(Image *ima, } } + const bool mipmap = GPU_get_mipmap(); + #ifdef WITH_DDS if (ibuf->ftype == IMB_FTYPE_DDS) GPU_create_gl_tex_compressed(&bindcode, rect, rectw, recth, textarget, mipmap, ima, ibuf); |