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:
Diffstat (limited to 'source/blender/draw/intern/draw_manager_texture.c')
-rw-r--r--source/blender/draw/intern/draw_manager_texture.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/draw/intern/draw_manager_texture.c b/source/blender/draw/intern/draw_manager_texture.c
index 083d5224e16..8562a5ba8fb 100644
--- a/source/blender/draw/intern/draw_manager_texture.c
+++ b/source/blender/draw/intern/draw_manager_texture.c
@@ -81,7 +81,8 @@ GPUTexture *DRW_texture_create_1d(int w,
DRWTextureFlag flags,
const float *fpixels)
{
- GPUTexture *tex = GPU_texture_create_1d(w, format, fpixels, NULL);
+ int mips = (flags & DRW_TEX_MIPMAP) ? 9999 : 1;
+ GPUTexture *tex = GPU_texture_create_1d(__func__, w, mips, format, fpixels);
drw_texture_set_parameters(tex, flags);
return tex;
@@ -90,7 +91,8 @@ GPUTexture *DRW_texture_create_1d(int w,
GPUTexture *DRW_texture_create_2d(
int w, int h, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels)
{
- GPUTexture *tex = GPU_texture_create_2d(w, h, format, fpixels, NULL);
+ int mips = (flags & DRW_TEX_MIPMAP) ? 9999 : 1;
+ GPUTexture *tex = GPU_texture_create_2d(__func__, w, h, mips, format, fpixels);
drw_texture_set_parameters(tex, flags);
return tex;
@@ -99,7 +101,8 @@ GPUTexture *DRW_texture_create_2d(
GPUTexture *DRW_texture_create_2d_array(
int w, int h, int d, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels)
{
- GPUTexture *tex = GPU_texture_create_2d_array(w, h, d, format, fpixels, NULL);
+ int mips = (flags & DRW_TEX_MIPMAP) ? 9999 : 1;
+ GPUTexture *tex = GPU_texture_create_2d_array(__func__, w, h, d, mips, format, fpixels);
drw_texture_set_parameters(tex, flags);
return tex;
@@ -108,7 +111,8 @@ GPUTexture *DRW_texture_create_2d_array(
GPUTexture *DRW_texture_create_3d(
int w, int h, int d, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels)
{
- GPUTexture *tex = GPU_texture_create_3d(w, h, d, format, fpixels, NULL);
+ int mips = (flags & DRW_TEX_MIPMAP) ? 9999 : 1;
+ GPUTexture *tex = GPU_texture_create_3d(__func__, w, h, d, mips, format, fpixels);
drw_texture_set_parameters(tex, flags);
return tex;
@@ -119,7 +123,8 @@ GPUTexture *DRW_texture_create_cube(int w,
DRWTextureFlag flags,
const float *fpixels)
{
- GPUTexture *tex = GPU_texture_create_cube(w, format, fpixels, NULL);
+ int mips = (flags & DRW_TEX_MIPMAP) ? 9999 : 1;
+ GPUTexture *tex = GPU_texture_create_cube(__func__, w, mips, format, fpixels);
drw_texture_set_parameters(tex, flags);
return tex;
}
@@ -127,7 +132,8 @@ GPUTexture *DRW_texture_create_cube(int w,
GPUTexture *DRW_texture_create_cube_array(
int w, int d, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels)
{
- GPUTexture *tex = GPU_texture_create_cube_array(w, d, format, fpixels, NULL);
+ int mips = (flags & DRW_TEX_MIPMAP) ? 9999 : 1;
+ GPUTexture *tex = GPU_texture_create_cube_array(__func__, w, d, mips, format, fpixels);
drw_texture_set_parameters(tex, flags);
return tex;
}